members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione members.invite; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come campo nel corpo JSON.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
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> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
email | string | Sì | — |
role | string | Sì | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | No | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | string | Sì | — |
org_id | string | Sì | — |
org_name | string | Sì | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Sì | — |
role | string | Sì | — |
site_grants | object[] | Sì | 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> | Sì | — |
expires_at | string | Sì | — |
accepted_at | string | No | — |
created_at | string | Sì | — |
Errori che questo endpoint può restituire
401 · 403 · 422 · 429