Add a user to the account with a role, or invite one
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
/api/v1/tenants/{tid}/provisioning/accounts/{ref}/usersAdd a user to the account with a role, or invite one (ADR 0121)
Sent again for someone already in the account with that role, answers 200 and changes nothing (the add is idempotent by email; an Idempotency-Key is accepted but the answer is not stored, as it may hold an invitation). The same person with another role: 409 PROVISIONING_USER_EXISTS. Permissions: plan.manage, member.invite, and every permission of the role.
Authentication: API key (Authorization: Bearer …) or session cookie __Host-panel_session.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
ref | path | string | required | The billing system's own reference: 1 to 64 of A-Z a-z 0-9 . _ : -
|
Idempotency-Key | header | string | optional | Same key and same request within 24 hours: the first answer is replayed (header Idempotent-Replayed: true). Same key, different request: 422 IDEMPOTENCY_KEY_REUSED.
|
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Request body
required
Content type: application/json
emailstring requiredrole_idstring requiredAllowed values:"customer_owner""developer""viewer"passwordstring optionalMakes the user at once; the email must be new to the panel. Left out, an invitation is made instead (7 days), which a person who already has a panel sign-in accepts with their own password
Example
{
"email": "string",
"role_id": "customer_owner",
"password": "string"
}Responses
200 Already in the account
Content type: application/json
user_idstring requiredEmpty for an invitation not yet accepted
emailstring requiredrole_idstring requiredAllowed values:"customer_owner""developer""viewer"ownerboolean requiredThe account's owner, made with the account; changed through the account, never removed here
created_atstring (date-time) requiredinvitedboolean requiredinvitation_tokenstring optionalOnly for an invitation, only in this answer; the panel keeps its hash
invitation_urlstring optionalThe page that accepts the invitation; send it to the person. Only in this answer
invitation_expires_atstring (date-time) optional
Example
{
"user_id": "string",
"email": "string",
"role_id": "customer_owner",
"owner": true,
"created_at": "2026-01-01T00:00:00Z",
"invited": true,
"invitation_token": "string",
"invitation_url": "string",
"invitation_expires_at": "2026-01-01T00:00:00Z"
}201 Added or invited
Content type: application/json
Fields of AccountUserAdded are shown above.
Example
{
"user_id": "string",
"email": "string",
"role_id": "customer_owner",
"owner": true,
"created_at": "2026-01-01T00:00:00Z",
"invited": true,
"invitation_token": "string",
"invitation_url": "string",
"invitation_expires_at": "2026-01-01T00:00:00Z"
}429 Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required
default Error
Content type: application/json