members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung members.invite verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Hier kommt Ihre Organisations-ID hin
Dieser Endpunkt akzeptiert org_id als Feld im JSON-Body.
Die ID Ihrer Organisation finden Sie im Dashboard auf dem Bildschirm für API-Schlüssel direkt neben dem Schlüssel selbst. Sie ist bei jedem Ihrer Aufrufe dieselbe.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem 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> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
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.
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
email | string | Ja | — |
role | string | Ja | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Nein | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
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 | Nein | — |
created_at | string | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 422 · 429