members
POST /v1/members/invitations
Invite an email to join an organization with a role.
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ázev | Typ | Požadováno | Co to je |
|---|---|---|---|
email | string | Ano | — |
role | string | Ano | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Ne | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | string | Ano | — |
org_id | string | Ano | — |
org_name | string | Ano | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Ano | — |
role | string | Ano | — |
site_grants | object[] | Ano | 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> | Ano | — |
expires_at | string | Ano | — |
accepted_at | string | Ne | — |
created_at | string | Ano | — |
Chyby, které může tento koncový bod vrátit
401 · 403 · 422 · 429