Account
Tags: account, authentication
User account management
Resources
Request and response models used by the endpoints on this page.
AccountResponse
| Field | Type | Required | Description |
|---|---|---|---|
avatarUrl | String | ✓ | |
createdAt | DateTime | ✓ | |
email | String | ✓ | |
emailVerifiedAt | DateTime | ✓ | |
enabled | Boolean | ✓ | |
id | Integer | ✓ | |
isSuperuser | Boolean | ✓ | |
locale | String | ✓ | |
loggedIn | Boolean | ✓ | |
name | String | ✓ | |
optedOut | Boolean | ✓ | |
phone | String | ✓ | |
phoneVerifiedAt | DateTime | ✓ | |
signupWorkspaceId | Integer | ✓ | |
stripeCustomerId | String | ✓ | |
timezone | String | ✓ | |
tosAccepted | Boolean | ✓ | |
uuid | String | ✓ |
Example:
{
"id": 0 // Integer,
"uuid": "string" // String,
"loggedIn": false // Boolean,
"avatarUrl": "string" // String,
"email": "string" // String,
"phone": "string" // String,
"emailVerifiedAt": "2024-01-01T00:00:00Z" // DateTime,
"phoneVerifiedAt": "2024-01-01T00:00:00Z" // DateTime,
"name": "string" // String,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"isSuperuser": false // Boolean,
"enabled": false // Boolean,
"signupWorkspaceId": 0 // Integer,
"tosAccepted": false // Boolean,
"optedOut": false // Boolean,
"stripeCustomerId": "string" // String,
"locale": "string" // String,
"timezone": "string" // String
}
UpdateAccountRequest
| Field | Type | Required | Description |
|---|---|---|---|
locale | String | ||
name | String | ||
optedOut | Boolean | ||
timezone | String | ||
tosAccepted | Boolean |
Example:
{
"name": "string" // String, optional,
"tosAccepted": false // Boolean, optional,
"optedOut": false // Boolean, optional,
"locale": "string" // String, optional,
"timezone": "string" // String, optional
}
Endpoints
GET /api/v2/account- Get Current AccountPOST /api/v2/account- Update Current AccountPOST /api/v2/account/acquisition- Acquisition
Get Current Account
GET /api/v2/account
Description:
Retrieve the current user's account information
Retrieve user information based on user_id.
Returns a logged-out account object (with loggedIn=false) if not authenticated. This endpoint accepts optional authentication.
Authentication: Requires authenticated user
Response: See AccountResponse
Update Current Account
POST /api/v2/account
Description:
Update the current user's account information
Update user information.
Authentication: Requires authenticated user
Parameters:
request- See UpdateAccountRequest
Response: See AccountResponse
Acquisition
POST /api/v2/account/acquisition
Description:
Persist the buyer's FIRST-touch marketing attribution (write-once).
Called by the browser at signup completion with its resolved UTM/referrer
capture. First write wins: once Account.acquisition is set a later post
does not overwrite it, so the winning first touch is preserved for
revenue-by-channel reporting (docs/growth/attribution.md P1). Idempotent: a
repeat call (or a signal-free payload) returns recorded=false without
mutating the row. (No DB uniqueness is enforced — the browser posts once, so
a concurrent double-post is a non-issue and both carry the same first touch.)
Values are allowlisted and size-capped server-side; PII-free by convention.
Authentication: Requires authenticated user
Parameters:
request- See AcquisitionRequest
Response: See AcquisitionResponse