Skip to main content
POST
/
me
Update user profile
curl --request POST \
  --url https://api.wacht.dev/me \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --cookie session_id= \
  --data first_name=John \
  --data last_name=Doe \
  --data username=johndoe \
  --data primary_email_address_id=123456789012345678 \
  --data primary_phone_number_id=987654321098765432 \
  --data second_factor_policy=enforced \
  --data remove_profile_picture=false
{
  "id": "123456789012345678",
  "first_name": "John",
  "last_name": "Doe",
  "username": "johndoe",
  "email": "john@example.com",
  "profile_picture_url": "https://cdn.wacht.dev/avatars/123.jpg",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "primary_email_address_id": "<string>",
  "primary_phone_number_id": "<string>",
  "second_factor_policy": "none",
  "backup_codes_generated": true,
  "has_password": true,
  "has_passkeys": true,
  "disabled": true
}

Authorizations

session_id
string
cookie
required

Body

application/x-www-form-urlencoded
first_name
string
Example:

"John"

last_name
string
Example:

"Doe"

username
string
Example:

"johndoe"

primary_email_address_id
string<uint64>
Example:

"123456789012345678"

primary_phone_number_id
string<uint64>
Example:

"987654321098765432"

second_factor_policy
enum<string>
Available options:
none,
enforced
Example:

"enforced"

remove_profile_picture
boolean
Example:

false

Response

User updated successfully

id
string<uint64>
Example:

"123456789012345678"

first_name
string
Example:

"John"

last_name
string
Example:

"Doe"

username
string
Example:

"johndoe"

email
string<email>
Example:

"john@example.com"

profile_picture_url
string<uri>
Example:

"https://cdn.wacht.dev/avatars/123.jpg"

created_at
string<date-time>
updated_at
string<date-time>
primary_email_address_id
string<uint64> | null
primary_phone_number_id
string<uint64> | null
second_factor_policy
enum<string>
Available options:
none,
enforced
backup_codes_generated
boolean
has_password
boolean
has_passkeys
boolean
disabled
boolean