members
POST /v1/members/invitations
Invite an email to join an organization with a role.
認証
ベアラー トークンとして API キーを送信します。キーには members.invite 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
組織 ID を入力する場所
このエンドポイントは、JSONボディのフィールドとして org_id を受け取ります。
組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
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 ord… |
status | string<pending, accepted, revoked> | はい | — |
expires_at | string | はい | — |
accepted_at | string | いいえ | — |
created_at | string | はい | — |
このエンドポイントが返すエラー
401 · 403 · 422 · 429