Skip to main content

PATCH /api/users/[id]

Updates the authenticated user’s profile. Can only update your own profile.
Requires authentication. User can only update their own profile.

Request Body

All fields are optional:
{
  "firstName": "John",
  "surname": "Doe",
  "location": "Los Angeles, USA",
  "bio": "Updated bio",
  "instagramHandle": "new_handle"
}

Response (200)

{
  "message": "Profile updated successfully",
  "user": { ... }
}

Errors

StatusCodeReason
400VALIDATION_ERRORInvalid field values
401UNAUTHORIZEDNot authenticated
403FORBIDDENNot your profile