members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso members.invite; una clave que no lo tenga se rechazará con un código 403, no 404.
Donde va el ID de tu organización
Este endpoint toma org_id como un campo en el cuerpo JSON.
El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
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> }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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.
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
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. |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
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í | — |
Errores que este endpoint puede devolver
401 · 403 · 422 · 429