Skip to main content

Update User Profile

Updates the authenticated user's profile information (email, phone, or password).

Endpoint​

PUT /api/v1/users/me

Authentication​

Requires JWT token (Bearer authentication).

Request​

Content-Type​

application/json

Request Body​

All fields are optional, but at least one field must be provided.

FieldTypeRequiredDescription
emailstringNoNew email address
phone_numberstringNoNew phone number (E.164 format)
passwordstringNoNew password (see requirements)

Example Request​

{
"email": "newemail@example.com",
"phone_number": "+12025559999"
}

Response​

Success Response (200 OK)​

Returns the updated user profile:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "newemail@example.com",
"phone_number": "+12025559999",
"is_active": true,
"is_verified": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:22:00Z"
}

Examples​

curl -X PUT https://api.callcov.com/api/v1/users/me \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"email": "newemail@example.com"
}'

Errors​

400 Bad Request​

No fields to update:

{
"detail": "No fields to update"
}

Email already in use:

{
"detail": "Email already in use"
}

Phone number already in use:

{
"detail": "Phone number already in use"
}

401 Unauthorized​

{
"detail": "Could not validate credentials"
}