Account
Tags: account, authentication
User account management
Resources
Request and response models used by the endpoints on this page.
AccountResponse
| Field | Type | Required | Description |
|---|---|---|---|
avatarColor | Literal['teal', 'sky', 'blue', 'indigo', 'violet', 'fuchsia', 'slate'] | ✓ | |
avatarCustomized | Boolean | ✓ | |
avatarIcon | Literal[user, stethoscope, heart, shield, sparkles, star] | ✓ | |
avatarSource | Literal['upload', 'custom', 'external', 'gravatar', 'initials'] | ✓ | |
avatarUrl | String | ✓ | |
avatarUseGravatar | Boolean | ✓ | |
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 | ✓ | |
timezone | String | ✓ | |
tosAccepted | Boolean | ✓ | |
uuid | String | ✓ |
Example:
{
"id": 0,
"uuid": "string",
"loggedIn": false,
"avatarUrl": "string",
"avatarIcon": null,
"avatarColor": "teal",
"avatarSource": "upload",
"avatarCustomized": false,
"avatarUseGravatar": false,
"email": "string",
"phone": "string",
"emailVerifiedAt": "2024-01-01T00:00:00Z",
"phoneVerifiedAt": "2024-01-01T00:00:00Z",
"name": "string",
"createdAt": "2024-01-01T00:00:00Z",
"isSuperuser": false,
"enabled": false,
"signupWorkspaceId": 0,
"tosAccepted": false,
"optedOut": false,
"locale": "string",
"timezone": "string"
}
AcquisitionRequest
| Field | Type | Required | Description |
|---|---|---|---|
entryPoint | Literal[website_products, website_get_started, app_add_workspace, direct] | ||
gclid | String | ||
intentId | String | ||
landingPage | String | ||
referrer | String | ||
twclid | String | ||
useCaseCategories | Array<Literal[patient_enrollment, wellness_checks, care_gaps, post_discharge, patient_requests, developer, just_curious, other]> | ||
useCaseCategory | Literal[patient_enrollment, wellness_checks, care_gaps, post_discharge, patient_requests, developer, just_curious, other] | ||
utmCampaign | String | ||
utmContent | String | ||
utmMedium | String | ||
utmSource | String | ||
utmTerm | String |
Example:
{}
AcquisitionResponse
| Field | Type | Required | Description |
|---|---|---|---|
acquisition | dict[str, str] | ||
recorded | Boolean | ✓ |
Example:
{
"recorded": false
}
UpdateAccountRequest
| Field | Type | Required | Description |
|---|---|---|---|
locale | String | ||
name | String | ||
optedOut | Boolean | ||
timezone | String | ||
tosAccepted | Boolean |
Example:
{}
UpdateMemberAvatarRequest
| Field | Type | Required | Description |
|---|---|---|---|
color | Literal[teal, sky, blue, indigo, violet, fuchsia, slate] | ||
icon | Literal[user, stethoscope, heart, shield, sparkles, star] | ||
image | String | ||
imageMimeType | String | ||
removeImage | Boolean | Default: False | |
useGravatar | Boolean |
Example:
{
"removeImage": false
}
Endpoints
GET /api/v2/account- Get Current AccountPOST /api/v2/account- Update Current AccountPOST /api/v2/account/acquisition- AcquisitionPUT /api/v2/account/avatar- Update AvatarGET /api/v2/account/avatar/{account_uuid}- Avatar
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. An organization-restricted OAuth token reads its own Account here, the one account route besides the workspace list that admits it: the profile names no organization data.
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
Update Avatar
PUT /api/v2/account/avatar
Description:
Set the Account's face: an icon, a colour, or an uploaded image.
The Account is the person, so this face follows them into every
Organization and Workspace. Only the fields the caller sent are applied;
see UpdateMemberAvatarRequest for how the three alternatives interact.
Authentication: Requires authenticated user
Parameters:
request- See UpdateMemberAvatarRequest
Response: See AccountResponse
Avatar
GET /api/v2/account/avatar/{account_uuid}
Description:
Serve an Account's uploaded avatar image.
The caller may read their own picture, or one belonging to an Account they
share a Workspace or Organization with — the population that can already
see the person in a roster. Anything else is a 404, so the route does not
confirm that an unrelated Account exists. private keeps shared caches
from storing the bytes.
Authentication: Requires authenticated user
Parameters:
account_uuid(String)
Response: Response