members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie members.invite; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako pole w treści JSON.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
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> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
email | string | Tak | — |
role | string | Tak | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Nie | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | string | Tak | — |
org_id | string | Tak | — |
org_name | string | Tak | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Tak | — |
role | string | Tak | — |
site_grants | object[] | Tak | 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> | Tak | — |
expires_at | string | Tak | — |
accepted_at | string | Nie | — |
created_at | string | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422 · 429