Worked request and response samples
A copyable read plus the one write the org-profile boot loop depends on (front-loads the organization_id the page-supplied error below gates on). Error envelopes like the template below return ; this pair returns .
Read the org profile
Named for the boot loop: the dashboard resolves the org id and org-picker options with one GET on every login. Fix the organization id in-test via organizations rather than hard-coding org_* or using a team slug — the 422 envelope below screens exactly that.
Update preferences
PATCH /api/v1/me (org profile lives here; preference writes share it)
Writes echo the updated subset so a client can re-apply local state without a second GET.
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