Skip to content

updateUser

PATCH
/api/v1/users/{id}
curl --request PATCH \
--url https://example.com/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: example' \
--data '{ "name": "example", "username": "example", "password": "example", "role": "owner", "active": true }'

Update a dashboard user account. Requires an Owner or Administrator with the admin scope. Cookie-authenticated unsafe requests require X-CSRF-Token.

id
required
string format: uuid
X-CSRF-Token
required
string
Media typeapplication/json
object
name
string
username
string
password
string
role

Role key. The built-in roles are owner, administrator, editor, contributor, and viewer. Custom role keys start with “custom.”. Decide authorization from the capabilities the server reports, not from the role key.

string
/^[a-z][a-z0-9.-]{1,63}$/
active
boolean

User account updated

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
username
required
string
role
required

Role key. The built-in roles are owner, administrator, editor, contributor, and viewer. Custom role keys start with “custom.”. Decide authorization from the capabilities the server reports, not from the role key.

string
/^[a-z][a-z0-9.-]{1,63}$/
active
required
boolean
createdAt
required
string format: date-time
lastLoginAt
string format: date-time
Example
{
"data": {
"role": "owner"
}
}

Invalid request body

Dashboard authentication required

Insufficient role

User not found

Username in use, self-deactivation, or last Owner

Name, username, password, or role invalid