Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu members.role.assign; ključ bez nje se odbija sa 403, a ne sa 404.
Gde ide ID vaše organizacije
Ovaj krajnji tačka uzima ID vaše organizacije direktno u URL-u kao orgId. Zamenite ga u putanji — ne postoji zaglavlje ili query parametar koji to može zameniti.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
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> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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.
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
orgId (path) | Uuid | Da | Organization ID (UUIDv7). |
userId (path) | Uuid | Da | The user to remove from the organization. |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
role | string | Da | A role key from `GET /v1/orgs/{orgId}/roles`. |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
user_id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
email | string | Da | — |
name | string | Da | Display name; may be empty for an account that never set one. |
roles | string[] | Da | Every role this person holds in this org, sorted. |
joined_at | string | Da | When their EARLIEST membership of this org was created. |
is_self | boolean | Da | Whether this row is the calling user. |
removable | boolean | Da | — |
not_removable_reason | OrgMemberRemovalBlock | null | Da | 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 | Da | 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… |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 409 · 422 · 429