members

POST /v1/members/invitations

Invite an email to join an organization with a role.

Všechny koncové body members

Všechny dokumenty pro vývojáře

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění members.invite; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Sem patří ID vaší organizace

Tento koncový bod přijímá org_id jako pole v těle JSON.

ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

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> }'

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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.

Tělo požadavku

NázevTypPožadovánoCo to je
emailstringAno
rolestringAnoThe role key to grant (e.g. manager, billing).
org_idstringNeOrganization to invite into; defaults to the caller's own. The caller must hold members.invite in that organization.

Odpověď

NázevTypPožadovánoCo to je
idstringAno
org_idstringAno
org_namestringAnoThe inviting organisation's display name, so an invitee can answer "accept?".
emailstringAno
rolestringAno
site_grantsobject[]AnoThe 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…
statusstring<pending, accepted, revoked>Ano
expires_atstringAno
accepted_atstringNe
created_atstringAno

Chyby, které může tento koncový bod vrátit

401 · 403 · 422 · 429