Create-or-reuse an account and grant its tenant membership (membership:write, AAL3 step-up; mode invite emails a single-use token)
const url = 'https://example.com/v1/onboard';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"display_name":"example","email":"hello@example.com","mode":"password","password":"example","role":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “ Header Parameters ”Target tenant id; required when the principal can act in more than one tenant.
Request Body required
Section titled “ Request Body required ”object
Password: the admin sets the initial password. invite: email a single-use token. Empty defaults to password.
Responses
Section titled “ Responses ”Created
object
False when an existing account was reused.
Present only for mode=invite.
object
Whether the invitation email left the engine; the token travels only in the mail.
object
object
Example
{ "invite": { "delivery": "sent" }, "user": { "status": "active" }}Consent required: the account exists and is not a member of the tenant; nothing was written
object
Example
{ "status": "consent_required"}Bad request
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Unauthenticated
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Forbidden
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Not found
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Conflict / setup required
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Rate limited
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}