Skip to main content
POST
Create Invitation

Body

application/json

Request schema for creating an invitation.

email
string<email>
required

Email address of the user to invite

role_id
string | null

Optional role ID to assign to the user

groups
string[] | null

Optional list of group IDs to add the user to

account_id
string | null

Optional account ID (Superadmin only)

Response

Successful Response

Response schema for invitation details.

id
string
required

Invitation ID

account_id
string
required

Account ID (UUID)

account_code
string
required

Human-readable account code in XX#### format (e.g., AB1234)

email
string
required

Email address of the invited user

invited_by
string
required

User ID of the inviter

expires_at
string<date-time>
required

Expiration timestamp

created_at
string<date-time>
required

Creation timestamp

status
enum<string>
required

Current invitation status

Available options:
pending,
accepted,
expired,
cancelled
token
string
required

Invitation token for constructing acceptance URL

accepted_at
string<date-time> | null

Acceptance timestamp (if accepted)

email_sent
boolean
default:false

Whether the invitation email has been sent

email_sent_at
string<date-time> | null

Timestamp when the email was sent