Skip to content

API Reference

Errors

Error codes and response format.

Overview

The API returns conventional HTTP status codes and a structured JSON error object with code, message, and optional param field for validation failures.

Key concepts

400 Bad Request
Malformed JSON, missing required field, or invalid parameter value.
401 Unauthorized
Missing, expired, or invalid API key.
403 Forbidden
Valid key but insufficient role permission for the operation.
404 Not Found
Resource ID unknown or not visible in your organization scope.
409 Conflict
State conflict, e.g., canceling a completed run.
429 Too Many Requests
Rate limit exceeded; honor Retry-After header.
500 Internal Server Error
Transient server fault; retry idempotent GETs with backoff.

Common issues

401 after key rotation
Update CI secrets with new key; revoke old key only after cutover.
403 on run create
Key owner role may lack runs:create; use service account with QA or admin role.

Error response shape

{
  "error": {
    "code": "invalid_request",
    "message": "environment must be one of: staging, production",
    "param": "environment"
  }
}

Retry only when the operation can be reconciled

Classify a failure before retrying: invalid input, missing authority, absent resource, conflict, throttling, transient service failure, and network interruption require different handling. Preserve the original status and safe diagnostic information rather than replacing every failure with a generic timeout.

For a write whose response was lost, determine whether the service accepted the operation. Reconcile the result using the documented contract before sending another write. Bound retries and total elapsed time, and make an exhausted retry visible to the calling workflow.

Was this page helpful?