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
{
  "status": 200,
  "message": "",
  "data": {
    "id": "123456789012345678",
    "first_name": "John",
    "last_name": "Doe",
    "username": "johndoe",
    "availability": "available",
    "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,
    "active_organization_membership_id": "<string>",
    "active_workspace_membership_id": "<string>",
    "public_metadata": {}
  },
  "session": {
    "id": "123456789012345678",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "errors": [
    {
      "code": "INVALID_CREDENTIALS",
      "message": "Invalid credentials. Please try again."
    }
  ]
}

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

status
integer

HTTP status code

Example:

200

message
string

Response message (empty on success)

Example:

""

data
object
session
object

Minimal session info included in every response

errors
object[] | null

Error details (null on success)