members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie members.invite beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt verwacht org_id als een veld in de JSON-body.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw 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> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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.
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
email | string | Ja | — |
role | string | Ja | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Nee | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | string | Ja | — |
org_id | string | Ja | — |
org_name | string | Ja | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Ja | — |
role | string | Ja | — |
site_grants | object[] | Ja | 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> | Ja | — |
expires_at | string | Ja | — |
accepted_at | string | Nee | — |
created_at | string | Ja | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422 · 429