User
Endpoints for retrieving user profile data. All endpoints require authentication.
GET /v1/user/me
Returns the currently authenticated user's profile.
Headers
Authorization: Bearer <access_token>
Response
{
"status": 200,
"data": {
"id": "1234567890123456789",
"username": "a3f8k2m9x1b4",
"display_name": "John",
"email": "john@example.com",
"avatar_url": "",
"referral_code": "A1B2C3",
"preferences": {
"currency": "USD"
}
}
}
User Object
| Field | Type | Description |
|---|---|---|
id | string | Snowflake ID |
username | string | Auto-generated 12-character alphanumeric username |
display_name | string | Name from the OAuth provider (or provided during Apple sign-in) |
email | string | Email from the OAuth provider |
avatar_url | string | Profile image URL (empty string if not set) |
referral_code | string | Unique referral code for this user |
preferences | object | User preferences (see below) |
Preferences Object
| Field | Type | Default | Description |
|---|---|---|---|
currency | string | "USD" | Preferred display currency |
Error Responses
| Status | Error | Cause |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid access token |
| 404 | NOT_FOUND | User account no longer exists |