Xaqiijinta aqoonsiga
U dir furaha API ah calaamad dusha ah (bearer token). Furaha waa inuu wataa ruqadda members.role.assign; furaha aan wadan waxaa loo diidayaa 403, ee ma aha 404.
Meesha aqoonsiga ururkaagu galayo
Bankani wuxuu qaataa aqoonsiga ururkaaga URL-ka dhexdiisa, sida orgId. Ku beddel wadada dhexdeeda — ma jiro madax (header) ama cabbir weydiin (query parameter) beddeli kara.
Aqoonsiga ururkaagu wuxuu ku yaallaa shaashada furayaasha API ee dashboard-kaaga, oo ku xiga furaha laftiisa. Waa isku aqoonsi wicitaan kasta oo aad sameyso.
Isku day
Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.
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> }'Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API
Details
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.
Cabiraha
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
orgId (path) | Uuid | Haa | Organization ID (UUIDv7). |
userId (path) | Uuid | Haa | The user to remove from the organization. |
Codsiga jidhkiisa
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
role | string | Haa | A role key from `GET /v1/orgs/{orgId}/roles`. |
Jawaab
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
user_id | Uuid | Haa | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
email | string | Haa | — |
name | string | Haa | Display name; may be empty for an account that never set one. |
roles | string[] | Haa | Every role this person holds in this org, sorted. |
joined_at | string | Haa | When their EARLIEST membership of this org was created. |
is_self | boolean | Haa | Whether this row is the calling user. |
removable | boolean | Haa | — |
not_removable_reason | OrgMemberRemovalBlock | null | Haa | 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_assignable | boolean | Haa | 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 t… |
Cilladaha ay bartaani soo celin karto
401 · 403 · 404 · 409 · 422 · 429