Skip to content

Create a user (superadmin)

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

Creates one user account. Superadmin only.

Media type application/json
object
display_name
string
email
required
string format: email
password
required
string format: password
>= 12 characters
role

The role granted in tenant

string
superadmin
boolean
tenant

Optional tenant granted role in the create transaction

string
workspace_id

Optional workspace the membership is confined to

string

Created

Media type application/json
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
membership

The first membership, granted in the create transaction when tenant was given

object
id
string format: uuid
role
string
tenant
string
user_id
string format: uuid
workspace_id
string
status
required
string
Allowed values: active inactive
Example
{
"status": "active"
}

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"
}
}