members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea members.invite; o cheie care nu o are va fi respinsă cu 403, nu 404.
Unde merge ID-ul organizației tale
Acest punct final preia org_id ca câmp în corpul JSON.
ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X POST https://api.zinndigital.com/v1/members/invitations \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "email": <string>, "role": <string> }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
Invites an **email** (the person need not exist yet — users are Keycloak subjects) to join with a role. The role is validated to be one the inviter is themselves permitted to grant: a role holding any permission the inviter lacks in that organization is refused (422), so `members.invite` is not a ladder to owner. A re-invite of the same email refreshes the pending invite. Emits `member.invited` so the invitation email is sent. Requires `members.invite` in the target org.
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
email | string | Da | — |
role | string | Da | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Nu | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | string | Da | — |
org_id | string | Da | — |
org_name | string | Da | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Da | — |
role | string | Da | — |
site_grants | object[] | Da | The individual sites this invitation lends, when it was created by sharing a site with an address that had no account (`POST /v1/sites/{siteId}/collaborators`). Empty for an ord… |
status | string<pending, accepted, revoked> | Da | — |
expires_at | string | Da | — |
accepted_at | string | Nu | — |
created_at | string | Da | — |
Erori pe care le poate returna acest punct final
401 · 403 · 422 · 429