Skip to content

Accept an invitation

POST
/api/v1/auth/invitations/{token}/accept
curl --request POST \
--url https://api.aletheia-ops.com/api/v1/auth/invitations/example/accept \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "password": "example" }'
token
required
string
Media typeapplication/json

Completes an invitation (email comes from the invitation)

object
name
required
string
password
required
string
Examplegenerated
{
"name": "example",
"password": "example"
}

Created

Media typeapplication/json

Token-issuance response for signup/login/refresh/accept

object
access_token
string
refresh_token
string
access_expires_at
string format: date-time
refresh_expires_at
string format: date-time
user

Public shape of a user account (never includes the password hash)

object
id
string
email
string
name
string
status
string
created_at
string format: date-time
organization

Public shape of an organization

object
id
string
name
string
slug
string
settings
object
key
additional properties
any
created_at
string format: date-time
updated_at
string format: date-time
roles
Array<string>
Examplegenerated
{
"access_token": "example",
"refresh_token": "example",
"access_expires_at": "2026-04-15T12:00:00Z",
"refresh_expires_at": "2026-04-15T12:00:00Z",
"user": {
"id": "example",
"email": "example",
"name": "example",
"status": "example",
"created_at": "2026-04-15T12:00:00Z"
},
"organization": {
"id": "example",
"name": "example",
"slug": "example",
"settings": {},
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z"
},
"roles": [
"example"
]
}

The request is malformed or fails validation.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "validation_failed",
"message": "name: must not be blank"
}

The resource does not exist, or belongs to another organization. The two are deliberately indistinguishable.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Examplenot_found
{
"code": "not_found",
"message": "resource not found"
}

The request conflicts with the current state.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "email_taken",
"message": "an account with this email already exists"
}

Too many attempts. Back off and retry.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Examplerate_limited
{
"code": "rate_limited",
"message": "too many attempts; please try again later"
}

An unexpected failure. Diagnostic detail is logged server-side and deliberately not returned. Quote the X-Request-Id response header when reporting one.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Exampleinternal_error
{
"code": "internal_error",
"message": "internal server error"
}