members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão members.invite; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como um campo no corpo JSON.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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 da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
email | string | Sim | — |
role | string | Sim | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Não | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Sim | — |
org_id | string | Sim | — |
org_name | string | Sim | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Sim | — |
role | string | Sim | — |
site_grants | object[] | Sim | 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> | Sim | — |
expires_at | string | Sim | — |
accepted_at | string | Não | — |
created_at | string | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429