Skip to content

Profile

View and update the authenticated user’s profile.

Terminal window
curl https://codecosts.com/api/profile \
-H "Authorization: Bearer sk_your_api_key"
FieldTypeDescription
idstring (uuid)User ID
emailstringEmail address
namestring | nullDisplay name
created_atstring (ISO 8601)Account creation time
updated_atstring (ISO 8601)Last update time
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"name": "Jane Doe",
"created_at": "2026-01-15T10:30:00.000Z",
"updated_at": "2026-02-20T14:15:00.000Z"
}

Terminal window
curl -X PUT https://codecosts.com/api/profile \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "New Name"}'
FieldTypeRequiredDescription
namestringYesDisplay name. 1-100 characters.

Returns the updated profile (same shape as GET).

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"name": "New Name",
"created_at": "2026-01-15T10:30:00.000Z",
"updated_at": "2026-03-02T09:00:00.000Z"
}
{
"error": "Validation error",
"details": "name: String must contain at least 1 character(s)"
}