Skip to main content
Errors are returned with a standard HTTP status and a JSON body:

Status codes

Plan-limit errors (402)

These carry upgrade: true so you can prompt the user to upgrade:

Agent onboarding errors

Signup replay defaults to 60 minutes. Claim links default to seven days, capped by the unclaimed account’s original expiry; use the returned claim_expires_at. Both settings are configurable. Refreshing a claim link never extends the account’s lifetime. Keep the original secret and body across network retries. The bootstrap example saves them before its first request.

Recommendations

  • Authenticate every product request (agent signup is the bootstrap exception) and handle 401 by surfacing a key problem, not retrying.
  • Treat 402 as actionable — link the user to billing rather than failing silently.
  • Use idempotency (client_id) on sends so retries after a network blip never duplicate mail.
  • Verify webhook signatures and return 2xx quickly; failures are retried with backoff.