Skip to main content

Account

Tags: account, authentication

User account management

Resources​

Request and response models used by the endpoints on this page.

AccountResponse​

FieldTypeRequiredDescription
avatarColorLiteral['teal', 'sky', 'blue', 'indigo', 'violet', 'fuchsia', 'slate']✓
avatarCustomizedBoolean✓
avatarIconLiteral[user, stethoscope, heart, shield, sparkles, star]✓
avatarSourceLiteral['upload', 'custom', 'external', 'gravatar', 'initials']✓
avatarUrlString✓
avatarUseGravatarBoolean✓
createdAtDateTime✓
emailString✓
emailVerifiedAtDateTime✓
enabledBoolean✓
idInteger✓
isSuperuserBoolean✓
localeString✓
loggedInBoolean✓
nameString✓
optedOutBoolean✓
phoneString✓
phoneVerifiedAtDateTime✓
signupWorkspaceIdInteger✓
timezoneString✓
tosAcceptedBoolean✓
uuidString✓

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​

FieldTypeRequiredDescription
entryPointLiteral[website_products, website_get_started, app_add_workspace, direct]
gclidString
intentIdString
landingPageString
referrerString
twclidString
useCaseCategoriesArray<Literal[patient_enrollment, wellness_checks, care_gaps, post_discharge, patient_requests, developer, just_curious, other]>
useCaseCategoryLiteral[patient_enrollment, wellness_checks, care_gaps, post_discharge, patient_requests, developer, just_curious, other]
utmCampaignString
utmContentString
utmMediumString
utmSourceString
utmTermString

Example:

{}

AcquisitionResponse​

FieldTypeRequiredDescription
acquisitiondict[str, str]
recordedBoolean✓

Example:

{
"recorded": false
}

UpdateAccountRequest​

FieldTypeRequiredDescription
localeString
nameString
optedOutBoolean
timezoneString
tosAcceptedBoolean

Example:

{}

UpdateMemberAvatarRequest​

FieldTypeRequiredDescription
colorLiteral[teal, sky, blue, indigo, violet, fuchsia, slate]
iconLiteral[user, stethoscope, heart, shield, sparkles, star]
imageString
imageMimeTypeString
removeImageBooleanDefault: False
useGravatarBoolean

Example:

{
"removeImage": false
}

Endpoints​

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:

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:

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:

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