members

POST /v1/members/invitations

Invite an email to join an organization with a role.

Todos os endpoints de members

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

NomeTipoObrigatórioO que é
emailstringSim
rolestringSimThe role key to grant (e.g. `manager`, `billing`).
org_idstringNãoOrganization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization.

Resposta

NomeTipoObrigatórioO que é
idstringSim
org_idstringSim
org_namestringSimThe inviting organisation's display name, so an invitee can answer "accept?".
emailstringSim
rolestringSim
site_grantsobject[]SimThe 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>Sim
expires_atstringSim
accepted_atstringNão
created_atstringSim

Erros que este endpoint pode retornar

401 · 403 · 422 · 429