members

POST /v1/members/invitations

Invite an email to join an organization with a role.

Tous les points de terminaison members

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation members.invite ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Où insérer l'ID de votre organisation

Cet endpoint prend org_id comme champ dans le corps JSON.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau 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> }'

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
emailstringOui
rolestringOuiThe role key to grant (e.g. `manager`, `billing`).
org_idstringNonOrganization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization.

Réponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
org_idstringOui
org_namestringOuiThe inviting organisation's display name, so an invitee can answer "accept?".
emailstringOui
rolestringOui
site_grantsobject[]OuiThe 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…
statusstring<pending, accepted, revoked>Oui
expires_atstringOui
accepted_atstringNon
created_atstringOui

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422 · 429