Profile
View and update the authenticated user’s profile.
Get profile
Section titled “Get profile”curl https://codecosts.com/api/profile \ -H "Authorization: Bearer sk_your_api_key"Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
id | string (uuid) | User ID |
email | string | Email address |
name | string | null | Display name |
created_at | string (ISO 8601) | Account creation time |
updated_at | string (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"}Update profile
Section titled “Update profile”curl -X PUT https://codecosts.com/api/profile \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{"name": "New Name"}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name. 1-100 characters. |
Response
Section titled “Response”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"}Errors
Section titled “Errors”{ "error": "Validation error", "details": "name: String must contain at least 1 character(s)"}