API Errors and Retries

advanced7 min read

API Errors and Retries

Every v1 response uses the same envelope. Preserve meta.requestId in logs and support requests so a failed call can be traced.

Error envelope

json
{
  "data": null,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "name is required",
    "details": {}
  },
  "meta": {
    "requestId": "uuid",
    "timestamp": "2026-08-04T10:00:00.000Z"
  }
}

Important status codes

StatusMeaningAgent behavior
400Malformed body or invalid fieldsCorrect the request; do not retry unchanged
401Missing, invalid, or expired keyReplace or rotate the API key
403Missing scope or admin roleRequest narrower, explicit authorization
404Resource absent from this organizationRe-discover IDs; do not guess
409Revision or resource conflictRe-read current state before editing
422Connection, preview, or delivery execution failedInspect error.details and attempts
428Revision or delivery confirmation requiredSupply the explicit precondition
429Per-organization rate limit reachedRetry with exponential backoff and jitter
500-599Unexpected or transient service errorRetry idempotent reads with backoff

Retry matrix

Generally safe to retry:

  • GET requests
  • Schema reads and workflow previews
  • Direct read-only SQL when duplicate execution is acceptable
  • 429 and transient 5xx responses after backoff

Do not blindly retry:

  • POST /api/v1/workflows/{id}/actions/{order}/test
  • POST /api/v1/workflows/{id}/run
  • Webhook test deliveries
  • Credential rotation
  • Resource creation when the first response outcome is unknown

These calls may have completed even when the caller did not receive a successful response.

External API acceptance

Webhook actions consider 2xx successful by default. Set successStatusCodes when a provider uses different 2xx codes for full and partial acceptance. For Brevo batch events, [202] treats HTTP 207 as a visible failure so partial acceptance is not reported as success.

Pagination

List endpoints use page and pageSize. Continue until page >= totalPages. Do not assume cursor pagination.

Rate limits

Rate limits are enforced per organization:

PlanGeneral requests/minChat requests/min
Free6020
Pro / Max300100
Enterprise1,000500

Ready to try this on your own database?

Connect in minutes and ask your first question — no SQL required.

Start free

Free plan · No credit card required