Skip to content

Create-or-reuse an account and grant its tenant membership (membership:write, AAL3 step-up; mode invite emails a single-use token)

POST
/v1/onboard
curl --request POST \
--url https://example.com/v1/onboard \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "display_name": "example", "email": "hello@example.com", "mode": "password", "password": "example", "role": "example" }'

Creates-or-reuses an account and grants its tenant membership (membership:write, AAL3 step-up). Mode password sets the initial password; mode invite emails a single-use token. An account that exists and is not a member of the tenant answers 202 consent_required and writes nothing.

X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

Media type application/json
object
display_name
string
email
required
string format: email
mode

Password: the admin sets the initial password. invite: email a single-use token. Empty defaults to password.

string
Allowed values: password invite
password
string format: password
role
string

Created

Media type application/json
object
created
required

False when an existing account was reused.

boolean
invite

Present only for mode=invite.

object
delivery

Whether the invitation email left the engine; the token travels only in the mail.

string
Allowed values: sent failed
expires_at
string format: date-time
id
string format: uuid
membership
required
object
id
required
string format: uuid
role
required
string
tenant
required
string
user_id
required
string format: uuid
user
required
object
created_at
required
string format: date-time
display_name
string
email
required
string format: email
id
required
string format: uuid
is_superadmin
required
boolean
status
required
string
Allowed values: active inactive
Example
{
"invite": {
"delivery": "sent"
},
"user": {
"status": "active"
}
}

Consent required: the account exists and is not a member of the tenant; nothing was written

Media type application/json
object
status
required
string
Allowed values: consent_required
Example
{
"status": "consent_required"
}

Bad request

Media type application/json
object
error
required
object
code
required
string
message
required
string
module

With code module_not_enabled: the namespace of the module this node does not run.

string
Example generated
{
"error": {
"code": "example",
"message": "example",
"module": "example"
}
}

Unauthenticated

Media type application/json
object
error
required
object
code
required
string
message
required
string
module

With code module_not_enabled: the namespace of the module this node does not run.

string
Example generated
{
"error": {
"code": "example",
"message": "example",
"module": "example"
}
}

Forbidden

Media type application/json
object
error
required
object
code
required
string
message
required
string
module

With code module_not_enabled: the namespace of the module this node does not run.

string
Example generated
{
"error": {
"code": "example",
"message": "example",
"module": "example"
}
}

Not found

Media type application/json
object
error
required
object
code
required
string
message
required
string
module

With code module_not_enabled: the namespace of the module this node does not run.

string
Example generated
{
"error": {
"code": "example",
"message": "example",
"module": "example"
}
}

Conflict / setup required

Media type application/json
object
error
required
object
code
required
string
message
required
string
module

With code module_not_enabled: the namespace of the module this node does not run.

string
Example generated
{
"error": {
"code": "example",
"message": "example",
"module": "example"
}
}

Rate limited

Media type application/json
object
error
required
object
code
required
string
message
required
string
module

With code module_not_enabled: the namespace of the module this node does not run.

string
Example generated
{
"error": {
"code": "example",
"message": "example",
"module": "example"
}
}