Skip to main content
Bily returns standard HTTP status codes with JSON error bodies, so your application can choose the right recovery step.
An unexpected server error can also include its request ID:
Use the HTTP status, documented error codes, and request ID to handle a failure. Error text is descriptive and can change. Server errors withhold internal exception details.

Act on each status

Keep the request ID

Every response includes x-request-id. Record it with the operation and timestamp. You can send a safe correlation value in x-request-id or x-correlation-id. Bily returns the selected value as x-request-id.
Keep customer data, credentials, and secrets out of request IDs. Record the status and request ID instead of logging complete response bodies.

Retry only when safe

Retry idempotent GET requests after transient 429, 500, 502, 503, or 504 responses. Add jitter to capped exponential backoff. Do not automatically retry create, clone, update, toggle, delete, sync, or other mutation requests. First read the affected resource and confirm that the original write did not succeed. When a failure includes retryable: false, a mutation outcome flag, or recorded asset IDs, preserve that evidence and reconcile the affected assets before preparing another write. Ad publication returns a durable job. A timeout or lost response does not cancel it; poll the original job ID and inspect each action before deciding whether recovery is safe. Use a reviewed retry draft only when the server marks actions eligible. If a draft save confirmation fails, an identical save with its original key can recover the same unpublished draft; do not use a new key or publish to test whether the save worked. For BUDGET_REVIEW_REQUIRED, refresh the exact native quote and approve a new draft. For BUDGET_OWNER_BUSY, reconcile the owner’s existing action. For BUDGET_VERIFY_REQUIRED, inspect the recorded owner and live amount without replay. See Ads and creative workflows. The pending saved-image request contract has stricter POST recovery rules. A generic status or missing by-key receipt cannot release an unknown submission. Only a positively verified same-submission rejection can support a later explicit fresh decision; it never permits automatic generation retry or key replacement.