Skip to content

Update a user (super admin)

PUT
/users/{id}
curl --request PUT \
--url https://your-server.example/api/users/1 \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "display_name": "example", "email": "hello@example.com", "role": "example", "password": "example", "current_password": "example" }'

Pass current_password to authorise password resets.

id
required
integer format: int64
Media typeapplication/json
object
display_name
string
email
string format: email
role
string
password
string
>= 8 characters
current_password
string

Example generated

{
"display_name": "example",
"email": "hello@example.com",
"role": "example",
"password": "example",
"current_password": "example"
}

Updated user.

Media typeapplication/json
object
id
integer format: int64
username
string
role
string
Allowed values: super_admin admin user
display_name
string
email
string format: email
created_at
string format: date-time

Example

{
"role": "super_admin"
}