How errors are returned
The Integrations API does not use a universalerror_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.
- Domain error
- Validation error (422)
- Asset rejected (422)
- Rate limit (429)
- Gateway (404)
Most domain errors return a Authentication failures (401) use this shape, with messages such as
detail message. Some also include an optional docs_url.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 ofdetail 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.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.message instead of detail, the request never reached the API: the gateway rejected it.
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./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:
Idempotency-Key created exists but can’t be replayed. The response is still 409, and its detail names the submission:
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 thefields 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 theRetry-After header — see the 429 envelope above.
Retry strategies
Retry only on 429, 500, and 502. Use exponential backoff with jitter, and respect theRetry-After header on 429 responses.
Exponential backoff with jitter
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 anIdempotency-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.
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 thedetail (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 byGET /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.
isRetryable is true, you can re-run the asset with POST /api/submissions/{submission_id}/assets/{asset_id}/retry.