access

PATCH /v1/orgs/{orgId}/members/{userId}

Change a member's role.

Dukkan access wuraren ƙarshe

Tabbatar da Asali

Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin members.role.assign; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.

Inda ID ɗin kungiyar ku ke zuwa

Wannan wurin shiga yana daukar ID din kungiyar ku a cikin URL din da kansa, azaman orgId. Maye gurbin shi a cikin hanyar - babu wani take ko sigar tambaya da zata yi maimakon haka.

Ana samun lambar kungiyar ku a kan shafin maɓallan API a cikin madanninku, kusa da maɓallin kansa. Shi ne lambar da ta dace a kowane kiran da kuka yi.

Gwada

May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.

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> }'

An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API

Bayani

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.

Sigogi

SunaNau'iAna buƙataAbin da yake
orgId (path)UuidEhOrganization ID (UUIDv7).
userId (path)UuidEhThe user to remove from the organization.

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
rolestringEhA role key from `GET /v1/orgs/{orgId}/roles`.

Martani

SunaNau'iAna buƙataAbin da yake
user_idUuidEhUUIDv7 identifier — sortable by creation time (docs/02 §8).
emailstringEh
namestringEhDisplay name; may be empty for an account that never set one.
rolesstring[]EhEvery role this person holds in this org, sorted.
joined_atstringEhWhen their EARLIEST membership of this org was created.
is_selfbooleanEhWhether this row is the calling user.
removablebooleanEh
not_removable_reasonOrgMemberRemovalBlock | nullEhWhy 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_assignablebooleanEhWhether `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 t…

Kuskuren da wannan matsaya za ta iya maido wa

401 · 403 · 404 · 409 · 422 · 429