members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу members.invite; кључ без ње се одбија уз 403, а не 404.
Где се уноси ID ваше организације
Ова крајња тачка узима org_id као поље у JSON телу.
Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
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> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
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.
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
email | string | Да | — |
role | string | Да | The role key to grant (e.g. manager, billing). |
org_id | string | Не | Organization to invite into; defaults to the caller's own. The caller must hold members.invite in that organization. |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | string | Да | — |
org_id | string | Да | — |
org_name | string | Да | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Да | — |
role | string | Да | — |
site_grants | object[] | Да | 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… |
status | string<pending, accepted, revoked> | Да | — |
expires_at | string | Да | — |
accepted_at | string | Не | — |
created_at | string | Да | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 422 · 429