Skip to main content
PATCH
/
users
/
me
Update User Profile
curl --request PATCH \
  --url https://api.example.com/users/me \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayName": "<string>",
  "avatarUrl": "<string>"
}
'
{
  "id": "<string>",
  "email": "<string>",
  "displayName": "<string>",
  "avatarUrl": "<string>",
  "createdAt": "<string>"
}
Update the authenticated user’s profile information. This endpoint allows users to modify their display name and avatar URL.

Authentication

This endpoint requires a valid JWT token in the Authorization header. The user ID is automatically extracted from the JWT token.

Request Body

displayName
string
The user’s display name
avatarUrl
string
URL to the user’s avatar image

Response

id
string
Unique identifier for the user
email
string
User’s email address
displayName
string
Updated display name
avatarUrl
string
Updated avatar URL
createdAt
string
ISO 8601 timestamp of when the user account was created

Example Request

curl -X PATCH https://api.neuronmeet.com/users/me \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "Jane Smith",
    "avatarUrl": "https://example.com/avatars/janesmith.jpg"
  }'

Example Response

{
  "id": "clx1a2b3c4d5e6f7g8h9i0j",
  "email": "[email protected]",
  "displayName": "Jane Smith",
  "avatarUrl": "https://example.com/avatars/janesmith.jpg",
  "createdAt": "2024-01-15T10:30:00.000Z"
}

Partial Updates

You can update only the fields you want to change. For example, to update only the display name:
curl -X PATCH https://api.neuronmeet.com/users/me \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "New Display Name"
  }'

Error Responses

401 Unauthorized

Returned when the JWT token is missing or invalid.
{
  "statusCode": 401,
  "message": "Unauthorized"
}

400 Bad Request

Returned when the request body contains invalid data.
{
  "statusCode": 400,
  "message": "Bad Request",
  "error": "Validation failed"
}

Build docs developers (and LLMs) love