Reference

Errors

Error response format and common status codes.

For agents: Parse error.code and error.message, report both, and use events for account-visible runtime detail.

Shape

{
  "error": {
    "code": "invalid_path",
    "message": "Release path must be relative."
  }
}

Common statuses are 400, 401, 402, 403, 404, 409, 410, 413, 429, 451, and 502.

402 means the request is valid, but the selected account plan does not include the requested feature or limit. Entitlement errors use entitlement_required or plan_limit_exceeded and include details such as plan_key, required_plan_key, feature_key, limit_key, allowed, and violations.

403 means the authenticated actor is associated with the app’s platform account but their account role cannot perform the operation. For example, viewers can read account apps but cannot write secrets or create app-user invites. 404 is used when an app or account should not be revealed to a non-member.

App-user roles declared in manifest.userland.json are runtime roles only. They do not satisfy platform account authorization for publish, secrets, rollback, events, or invites.

Common Codes

Auth States

Userland platform auth is passwordless. Console signin uses email links, CLI signin uses browser-approved device authorization, and API access uses API keys.

POST /v0/auth/token, POST /v0/platform/sessions, password reset request/confirm, and unauthenticated POST /v0/accounts intentionally return 410 during the transition. There is no platform password reset flow.

Device polling can return authorization_pending, slow_down, denied, expired, or consumed. Respect slow_down.interval; do not start a new device flow unless the current one is denied, expired, or consumed.

Recovery

Use the CLI to inspect and recover:

userland apps events "$APP_ID" --limit 25
userland apps releases "$APP_ID"
userland apps rollback "$APP_ID" "$RELEASE_ID"

See /guides/troubleshooting for the full debug path.