Skip to content

Accept an invitation (create account or join with existing session)

Public token route, IP rate limited (429). If the invited email already has an account, the caller MUST already be logged in as that exact account (else 401 requiresLogin / 403 mismatch). If no account exists, a password (min 8) in the body creates the account and logs in (Set-Cookie). systemRole is always USER — never read from the body.

token
required
string

Required only for the no-existing-account path.

Media typeapplication/json
object
password

Required only when no account exists for the invited email

string
>= 8 characters
Examplegenerated
json
{
"password": "example"
}

Accepted (existing-account path)

Media typeapplication/json
object
ok
boolean
tenantId
string
role
string
Allowed values: ADMIN MEMBER

Password too short (no-account path)

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Must log in as the invited account first

Media typeapplication/json
object
error
string
requiresLogin
boolean
Example
json
{
"requiresLogin": true
}

Logged-in account email does not match invite

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Invitation not found

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Invitation used/revoked

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Invitation expired

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Rate limited

Media typeapplication/json
object
error
required
string
retryAfterSeconds
integer
Examplegenerated
json
{
"error": "example",
"retryAfterSeconds": 1
}

Session secret missing / create failed

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}