Invite Member
const url = 'https://example.com/api/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/invite';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","role":"admin"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/invite \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "role": "admin" }'Invite a person (with or without an account) to join by email.
Sends a single-use link ({APP_BASE_URL}/accept-invite?token=...,
valid ORGANIZATION_INVITE_EXPIRE_DAYS, default 7) through the same SES
path as verify-email. The raw token is never returned to the inviter —
receiving it is what proves the invitee owns the mailbox. Re-inviting an
address with a live invitation rotates its token + expiry (a “resend”).
Only ‘member’ or ‘viewer’ may be granted by invitation; promote afterwards via PATCH …/members/{id}. On a server with LOGIN_ALLOWLIST_ENABLED the address must already be admitted by LOGIN_ALLOWED_EMAILS / LOGIN_ALLOWED_EMAIL_DOMAINS, otherwise the invitee could never sign in.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”POST /organizations/{id}/invite — same shape the console’s organizationsApi.inviteUser() has always sent. Only member/viewer are accepted (enforced in the handler with a readable 422).
object
User roles
Responses
Section titled “ Responses ”Successful Response
A pending (or just-created) invitation. Never carries the token.
object
User roles
Example
{ "expired": false, "role": "admin"}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}