ప్రమాణీకరణ

బీయర్ టోకెన్‌గా API కీని పంపండి. కీ తప్పనిసరిగా members.role.assign అనుమతిని కలిగి ఉండాలి; అది లేని కీని 404 కాకుండా 403తో తిరస్కరిస్తారు.

మీ సంస్థ ఐడీ ఎక్కడ ఉందో అక్కడ

ఈ ఎండ్‌పాయింట్ మీ సంస్థ ఐడీని నేరుగా యూఆర్‌ఎల్‌లోనే orgId రూపంలో తీసుకుంటుంది. దానిని పాత్‌లో మార్చండి — దీనికి బదులుగా పనిచేసే హెడర్ లేదా క్వరీ పారామీటర్ ఏదీ లేదు.

మీ సంస్థ ఐడి (organisation id) మీ డాష్‌బోర్డ్‌లోని API కీస్ స్క్రీన్‌పై, కీ పక్కనే ఉంటుంది. మీరు చేసే ప్రతి కాల్‌లోనూ ఇదే ఐడి ఉపయోగించబడుతుంది.

ప్రయత్నించండి

కోణీయ బ్రాకెట్‌లలో ఉన్న దేన్నైనా మీ స్వంత విలువలతో భర్తీ చేయండి, మరియు కీ ప్లేస్‌హోల్డర్‌ను మీ డాష్‌బోర్డ్ నుండి తీసుకున్న కీతో భర్తీ చేయండి.

curl -X PATCH https://api.zinndigital.com/v1/orgs/{orgId}/members/{userId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "role": <string> }'

సైన్ ఇన్ చేశారా? మీ డ్యాష్‌బోర్డ్‌లోని API కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ API ద్వారా ఆభ్యర్థనను రన్ చేస్తుంది. ఈ ఎండ్‌పాయింట్‌ను API కన్సోల్‌లో తెరిచండి

వివరాలు

Sets this member's role in the organization. Requires members.role.assign on that org. ⛔ Replaces the member's roles with the one given rather than adding to them — a person may hold several Membership rows, and collapsing them can only ever reduce what they hold, so no path through this endpoint escalates by accident. Three refusals, and they are the same rules an invitation is held to: 403 if the member holds a permission the caller does not (more_privileged), 403 if the role being granted holds one (role_not_grantable — this is what stops any holder of the key promoting themselves to owner), and 409 for the org's last owner (last_owner). An unknown role is a 422, never a 403, so a typo is distinguishable from a permission you lack.

పారామీటర్లు

పేరురకంకావలసినదిఇది ఏమిటి
orgId (path)UuidఅవునుOrganization ID (UUIDv7).
userId (path)UuidఅవునుThe user to remove from the organization.

అభ్యర్థన బాడీ

పేరురకంకావలసినదిఇది ఏమిటి
rolestringఅవునుA role key from GET /v1/orgs/{orgId}/roles.

స్పందన

పేరురకంకావలసినదిఇది ఏమిటి
user_idUuidఅవునుUUIDv7 identifier — sortable by creation time (docs/02 §8).
emailstringఅవును
namestringఅవునుDisplay name; may be empty for an account that never set one.
rolesstring[]అవునుEvery role this person holds in this org, sorted.
joined_atstringఅవునుWhen their EARLIEST membership of this org was created.
is_selfbooleanఅవునుWhether this row is the calling user.
removablebooleanఅవును
not_removable_reasonOrgMemberRemovalBlock | nullఅవునుWhy not, when removable is false. Null when removable — and also null for a caller lacking members.remove, because "you cannot remove anyone here" is a fact about the caller,…
role_assignablebooleanఅవునుWhether PATCH on this member would be accepted — the caller holds members.role.assign here, does not outrank themselves, and this is not the last owner. ⛔ Which role may…

ఈ ఎండ్‌పాయింట్ తిరిగి ఇవ్వగల లోపాలు

401 · 403 · 404 · 409 · 422 · 429