members
POST /v1/members/invitations
Invite an email to join an organization with a role.
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د members.invite اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د JSON په متن کې د یوې ساحې په توګه org_id اخلي.
ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د 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 په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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 ord… |
status | string<pending, accepted, revoked> | هو | — |
expires_at | string | هو | — |
accepted_at | string | نه | — |
created_at | string | هو | — |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 422 · 429