Skip to main content

How errors are returned

The Integrations API does not use a universal error_code field, and it does not return a request_id. Errors are signalled by the HTTP status code and one of six response body shapes. Always branch on response.status_code first, then read the body shape that matches.
Most domain errors return a detail message. Some also include an optional docs_url.
Authentication failures (401) use this shape, with messages such as Missing X-API-Key header, Invalid API key, This API key has expired, or This API key has been revoked.

HTTP status codes

Only 429, 500, and 502 are safe to retry. Every other 4xx indicates a problem with the request, the resource, or your plan that a retry alone cannot resolve.

Common situations

These are real conditions you will encounter, described by status code and the style of detail message returned. There are no error-code constants to match against.

401 Invalid API key

Missing or invalid API key, returned as a domain error.
Check that the X-API-Key header is present and correct, and that the key has not expired or been revoked.

403 Invalid blob path

A blob path failed validation, or a sandbox-only endpoint was called with a live key.

404 Not found

A submission or asset does not exist in your workspace, or topics/issues were requested before the asset finished processing.
If every call returns 404, and the body has message instead of detail, the request never reached the API: the gateway rejected it.
Check that you send Api-Version: v1 on every request, and that the path is right. See Authentication.

409 Asset already submitted

The same asset was already submitted, or a retry is not allowed.
To process the file again, check /api/submissions/{submission_id}/versions for existing versions, or upload a new file. The same status is returned when an Idempotency-Key that already created a submission is sent with a different request body:
Nothing was created. Send a new key for a new submission. Rarely, the submission an Idempotency-Key created exists but can’t be replayed. The response is still 409, and its detail names the submission:
Fetch the submission with GET /api/submissions/{submission_id} rather than retrying.

413 Upload too large

The uploaded blob exceeds the per-category size limit for its type. Check the file against the per-category maximums before submitting.

415 Unsupported content type

The content type is not in the allowlist, or it does not match the file.

422 Validation error

The request body failed validation. Read the fields array — see the validation envelope above. A 422 from POST /submissions that carries an error_code is different: the request was fine, but one asset cannot be processed. See the asset-rejected shape above.

402 Tier not authorized

Your plan does not include Integrations API access — see the 402 envelope above.

429 Rate limit exceeded

A rate-limit bucket was exceeded. Wait for the Retry-After header — see the 429 envelope above.

Retry strategies

Retry only on 429, 500, and 502. Use exponential backoff with jitter, and respect the Retry-After header on 429 responses.

Exponential backoff with jitter

For 429 responses, the Retry-After header gives the number of seconds to wait. See Rate limiting for the bucket model.

Retrying submission creation safely

If you retry a create request whose response you did not receive, the first attempt may already have created the submission. Send an Idempotency-Key header and reuse it on every retry: a repeated key returns the existing submission with 200 instead of creating a duplicate. Generate the key once per submission and store it before the first attempt, so a retry after a crash still has it.
Without the header, every request creates a new submission. See Safe retries with Idempotency-Key for the full behaviour.

Validation before upload

Validate files client-side before uploading to fail fast. Maximum sizes are per category (video up to 5 GB, image 500 MB, document 100 MB). The example below enforces per-category limits.

Logging errors

Log the status code and the detail (or validation fields) for context, plus error_code where the response has one. There is no request_id to log.

Handling specific asset errors

Per-asset failures are reported by GET /api/submissions/{submission_id} (there is no /status suffix). Each asset carries flat camelCase failure fields: errorMessage, errorType, isRetryable, and retryCount. There is no nested error object. An asset is failed when its status is failed; terminal asset states are complete and failed.
If isRetryable is true, you can re-run the asset with POST /api/submissions/{submission_id}/assets/{asset_id}/retry.

Circuit breaker pattern

For high-volume production systems, wrap API calls in a circuit breaker so repeated failures fail fast instead of piling up.

Error handling checklist

  • Branch on response.status_code, then read detail (or fields for 422 validation errors)
  • Retry only 429, 500, and 502 — never other 4xx
  • Respect the Retry-After header on 429 responses
  • Use exponential backoff with jitter for retries
  • Validate files client-side before uploading
  • Log the status code and message with full context
  • Send an Idempotency-Key on submission create so retries can’t create duplicates
  • Implement a circuit breaker for high-volume systems