Billing

Schedule a downgrade to Free

Schedule a downgrade to Free at the end of the current billing period. The org keeps its current plan + caps until then. Idempotent on already-Free orgs.

Same human-vs-agent split as /api/billing/upgrade: humans execute directly; agents get { status: "approval_required", approval_url } for the org owner to approve. confirm_token and mode are ignored.

post/api/billing/downgrade

Request

  • Base URL
    https://trydock.ai
  • Auth
    HTTP bearer

Request body

confirm_tokenstring
mode'chat' | 'web'

Response

Discriminated by status: downgrade-scheduled | already-free | approval_required.

plan'free' | 'pro' | 'scale'

Plan tier. Caps live in src/lib/plan.ts.

statusstring required
messagestring
approval_urlstring uri
polling_urlstring uri
expires_atstring

Changes

No recorded changes to this operation across all 2 revisions of this API.