Skip to content

Update user

POST
/api/v1/user/{id}
curl --request POST \
--url https://example.com/api/v1/user/example \
--header 'Content-Type: application/json' \
--data '{ "username": "example", "email": "hello@example.com", "password": "example", "oldPassword": "example", "passwordConfirm": "example" }'

Updates a user. Handles password changes and email change requests

id
required
string
Media type application/json
object
username
string
>= 3 characters /^\w[\w\.]*$/
email
string format: email
password
string
>= 8 characters <= 72 characters
oldPassword

Required when changing password

string
passwordConfirm

Must match password

string
Example generated
{
"username": "example",
"email": "hello@example.com",
"password": "example",
"oldPassword": "example",
"passwordConfirm": "example"
}

User updated

Media type application/json
object
id
required

User ID (15 chars)

string
username
required

Username (3+ chars, alphanumeric with dots)

string
email
required

User email address

string format: email
avatar

Avatar file path

string
verified

Email verification status

boolean
created
string format: date-time
updated
string format: date-time
Example generated
{
"id": "example",
"username": "example",
"email": "hello@example.com",
"avatar": "example",
"verified": true,
"created": "2026-04-15T12:00:00Z",
"updated": "2026-04-15T12:00:00Z"
}

Bad Request

Not Found

Internal Server Error