Update Current User

PATCH /api/v1/users/me

Updates the first name and last name for the currently authenticated user.

application/json

Body Required

User fields to update

  • first_name string Required
  • last_name string Required

Responses

  • 200 application/json

    Updated user profile

    Hide response attributes Show response attributes object
    • created_at string Required
    • email string Required
    • first_name string Required
    • id integer Required
    • last_login_at string Required
    • last_name string Required
    • organization_id integer Required
    • role string Required
    • updated_at string Required
  • 400 application/json

    Invalid request data

    Hide response attribute Show response attribute object
    • * string Additional properties
  • 401 application/json

    Unauthorized (JWT invalid/missing or User ID not found)

    Hide response attribute Show response attribute object
    • * string Additional properties
  • 404 application/json

    User not found

    Hide response attribute Show response attribute object
    • * string Additional properties
  • 500 application/json

    Failed to get or update user

    Hide response attribute Show response attribute object
    • * string Additional properties
PATCH /api/v1/users/me
curl \
 --request PATCH 'http://api.example.com/api/v1/users/me' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"first_name":"string","last_name":"string"}'
Request examples
{
  "first_name": "string",
  "last_name": "string"
}
Response examples (200)
{
  "created_at": "string",
  "email": "string",
  "first_name": "string",
  "id": 42,
  "last_login_at": "string",
  "last_name": "string",
  "organization_id": 42,
  "role": "string",
  "updated_at": "string"
}
Response examples (400)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
Response examples (401)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
Response examples (404)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
Response examples (500)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}