members
POST /v1/members/invitations
Invite an email to join an organization with a role.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה members.invite; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כשדה בגוף ה-JSON.
מזהה הארגון שלך נמצא במסוף מפתחות ה-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 בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-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