Skip to main content

Account API

The authenticated user’s profile, preferences, and speed-dial favorites Base path: /api/v1/me Endpoint count: 2

title: “Errors worth branching on” description: “Per-endpoint failure templates matching the envelope — what actually fires, what to retry, what to surface to the operator.”

Errors worth branching on

These five failures cover the org profile read (GET /api/v1/account), hammered by every dashboard boot. Each block below is a full { error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface for the same five classes. For the platform-wide decision table these branches plug into, see the error handling guide.

401 — Unauthorized

A 401 on this page is the bearer key failing before the route ran — it never means the resource is wrong. Rotate the key or re-mint the scoped token; retrying the same request changes nothing.

403 — Forbidden

A 403 means the key authenticated but the operation is gated by scope — check the key’s scopes on the developer page; a 403 is never a data-not-found shape.

422 — Schema

A 422 means the payload did not match the request schema — branch on error.details.field and resend with the active organization id instead of blind-retrying the same body.

429 — Rate

The Retry-After header and error.details.retry_after are both set on every 429 — resend the SAME request after the lower of the two.

402 — Feature gate

Surface the billing portal — only writes are suspended; data reads remain available.

60-second retry matrix


Get the authenticated user

GET /api/v1/me
Returns the authenticated user plus the active tenant and the list of organizations the user belongs to. The mobile client uses this to bootstrap post-login (replaces the legacy EXPO_PUBLIC_ORBIT_TENANT_ID env-var hack). The dashboard uses the same shape for the org-picker + Settings → Profile cards.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Update per-user preferences

PATCH /api/v1/me
Partial update of the authenticated user’s preferences. Only fields supplied in the body are written. Returns the updated subset so the FE can confirm the persisted value without a second GET.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
string | null (enum: compact_bottom_bar|floating_panel|side_panel|null)
Softphone widget layout. NULL resets to the platform default.
boolean
When TRUE every voicemail assigned to this user triggers an audio-attached email via the dispatcher scheduler.
string | null
Alternate routing address. NULL clears to users.email.
string | null
Operator signature block (≤ 2 000 chars). NULL or whitespace-only string clears the persisted value.
boolean
Inbox → Settings → Conversation tags ‘Show archived tags’ view toggle. Persisted so the choice survives reload + multi-device.