Skip to content
Last updated

Modify authenticated user's profile information. Supports partial updates - only include fields to change.

PATCHhttps://api.aitronos.com/v1/user/profile

Request Body

username string optional

Username (3-100 characters, lowercase letters/numbers/dots/underscores/hyphens only).

first_name string optional

User's first name.

last_name string optional

User's last name.

full_name string optional

User's full display name.

birthday date optional

Date of birth in YYYY-MM-DD format.

gender string optional

Gender identity.

profile_image string optional

URL to profile image.

timezone string optional

User's timezone (e.g., "America/New_York").

country_id string optional

Country ID with country_ prefix (must be valid).

post_code string optional

Postal/ZIP code.

Returns

Updated User object with complete profile information.

Validation Rules

Username

  • 3-100 characters
  • Lowercase letters, numbers, dots (.), underscores (_), hyphens (-)
  • Must be unique

Birthday

  • Valid past date
  • Cannot be future

Country ID

  • Format: country_ + UUID hex
  • Must exist in system

Other Fields

  • first_name, last_name, full_name: Max 255 characters
  • gender: Max 50 characters
  • timezone: Max 100 characters
  • post_code: Max 20 characters

Notes

  • Email cannot be updated via this endpoint
  • Only provided fields updated
  • Atomic updates (all or nothing)
  • Response includes complete profile
Bash
curl -X PATCH \
  "https://api.aitronos.com/v1/user/profile" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John"
  }'

Response:

{
  "success": true,
  "message": "Profile updated successfully",
  "profile": {
    "id": "usr_123e4567e89b12d3a456426614174000",
    "email": "user@example.com",
    "username": "myusername",
    "full_name": "John Doe",
    "first_name": "John",
    "last_name": "Doe",
    "profile_image": "https://example.com/avatar.jpg",
    "timezone": "America/New_York",
    "is_active": true,
    "last_verified": "2025-11-13T10:30:00Z",
    "last_login": "2025-11-13T09:15:00Z",
    "created_at": "2025-01-01T00:00:00Z",
    "updated_at": "2025-11-13T10:30:00Z"
  }
}