members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Doğrulama
API açarını bearer token kimi göndərin. Açar members.invite icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
email | string | Bəli | — |
role | string | Bəli | The role key to grant (e.g. manager, billing). |
org_id | string | Xeyr | Organization to invite into; defaults to the caller's own. The caller must hold members.invite in that organization. |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | string | Bəli | — |
org_id | string | Bəli | — |
org_name | string | Bəli | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Bəli | — |
role | string | Bəli | — |
site_grants | object[] | Bəli | 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> | Bəli | — |
expires_at | string | Bəli | — |
accepted_at | string | Xeyr | — |
created_at | string | Bəli | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422 · 429