members
POST /v1/members/invitations
Invite an email to join an organization with a role.
Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar members.invite iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Kurum kimliğinizin yazılacağı yer
Bu uç nokta, JSON gövdesinde bir alan olarak org_id alır.
Kuruluş kimliğiniz (id), kontrol panelinizdeki API anahtarları ekranında, anahtarın hemen yanında yer alır. Yaptığınız her çağrıda aynı kimlik kullanılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
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> }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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.
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
email | string | Evet | — |
role | string | Evet | The role key to grant (e.g. `manager`, `billing`). |
org_id | string | Hayır | Organization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | string | Evet | — |
org_id | string | Evet | — |
org_name | string | Evet | The inviting organisation's display name, so an invitee can answer "accept?". |
email | string | Evet | — |
role | string | Evet | — |
site_grants | object[] | Evet | 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> | Evet | — |
expires_at | string | Evet | — |
accepted_at | string | Hayır | — |
created_at | string | Evet | — |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 422 · 429