members

POST /v1/members/invitations

Invite an email to join an organization with a role.

All members endpoints

Authentication

Send an API key as a bearer token. The key must carry the members.invite permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a field in the JSON body.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

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

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

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.

Request body

NameTypeRequiredWhat it is
emailstringYes
rolestringYesThe role key to grant (e.g. `manager`, `billing`).
org_idstringNoOrganization to invite into; defaults to the caller's own. The caller must hold `members.invite` in **that** organization.

Response

NameTypeRequiredWhat it is
idstringYes
org_idstringYes
org_namestringYesThe inviting organisation's display name, so an invitee can answer "accept?".
emailstringYes
rolestringYes
site_grantsobject[]YesThe 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>Yes
expires_atstringYes
accepted_atstringNo
created_atstringYes

Errors this endpoint can return

401 · 403 · 422 · 429