members

POST /v1/members/invitations

Invite an email to join an organization with a role.

Tất cả các điểm cuối members

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền members.invite; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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> }'

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
emailstring
rolestringThe role key to grant (e.g. `manager`, `billing`).
org_idstringKhôngOrganization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
org_idstring
org_namestringThe inviting organisation's display name, so an invitee can answer "accept?".
emailstring
rolestring
site_grantsobject[]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…
statusstring<pending, accepted, revoked>
expires_atstring
accepted_atstringKhông
created_atstring

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422 · 429