Adsly.pro
Documentation pages All documentation

Errors

The error format, every error code the API returns, what each means and what to do about it.

View as Markdown

Format

Every error has the same shape:

{
  "success": false,
  "error": "cpm must be greater than 0",
  "code": "VALIDATION_ERROR",
  "param": "campaigns[2].cpm",
  "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44"
}
FieldAlwaysMeaning
erroryesA sentence a person can read. Show it; don’t parse it — wording can improve.
codeyes on all v1 errorsStable, machine-readable. Branch on this.
paramon input errorsThe field that was wrong, as a path: cpm, campaigns[2].channels[0], account_id.
request_idon most errorsSame as the X-Request-Id response header. Quote it to support.

Some errors add context: min_cpm and currency when Telegram refuses a bid as too low, missing with UNKNOWN_AD_IDS, limit with QUEUE_FULL.

HTTP status codes

StatusMeaningRetry?
200Done—
202Accepted, running in the background — poll the task—
400The request is wrong (field, value, missing account_id) — or Telegram refused the changeNo — fix the request
401No key, bad key, or the key reaches no cabinetNo
403The key or plan isn’t allowed to do thisNo
404Not found among the cabinets this key reachesNo
409Conflict with the current state (cabinet locked, Telegram session expired, same request in progress)Sometimes — see the code
413File too largeNo
422Idempotency-Key reused for a different requestNo — use a new key
429Rate limit or queue fullYes, after Retry-After seconds
500Our bug — already loggedRead the state first, then retry with backoff
503Temporarily unavailableYes, after Retry-After

Codes

Authentication and access

CodeHTTPWhat to do
API_KEY_MISSING401Send X-API-Key.
API_KEY_INVALID401The key is wrong, revoked or expired. Create a new one.
NO_ACCOUNTS401The key reaches no active cabinet right now (cabinet deactivated, access removed).
FORBIDDEN403This key type isn’t allowed for its owner.
READ_ONLY_KEY403Turn on Manage campaigns for the key in the panel.
WRITE_NOT_ALLOWED403This key type (issued by Adsly for partners) never writes.
VIEW_ONLY_ACCESS403Your access to this cabinet is Viewer. Ask the agency owner for Manager.
FEATURE_NOT_AVAILABLE403The plan doesn’t include this action (the response names the feature).
SUBSCRIPTION_REQUIRED403The cabinet’s owner has no active subscription.
ACCOUNT_INACTIVE403The cabinet is deactivated.

Finding things

CodeHTTPWhat to do
ACCOUNT_ID_REQUIRED400The key reaches several cabinets (or this ad_id exists in several) — pass account_id.
ACCOUNT_NOT_FOUND404That account_id isn’t reachable with this key. Check GET /v1/account/info.
CAMPAIGN_NOT_FOUND404No such campaign in the key’s cabinets (or it is deleted).
TASK_NOT_FOUND404No such task for this key’s owner.
NOT_FOUND404No stats for this campaign and period.
UNKNOWN_AD_IDS400Some ad_ids in a bulk call aren’t campaigns of that cabinet; missing lists them.

Input

CodeHTTPWhat to do
VALIDATION_ERROR400param names the field; error says what’s wrong. Unknown fields are rejected too — check spelling.
UNSUPPORTED_MEDIA400Upload JPG, PNG, GIF, WEBP or MP4 in the file field.
FILE_TOO_LARGE413Upload a smaller file (10 MB at most).

Telegram and cabinet state

CodeHTTPWhat to do
PLATFORM_REJECTED400Telegram refused the change; error carries its reason. With a low bid you also get param: "cpm", min_cpm and currency.
BUDGET_UNCHANGED400Telegram accepted the top-up but the campaign’s budget didn’t move. Check the cabinet balance (GET /v1/account/info).
INSUFFICIENT_AD_BALANCE400You asked to withdraw more than the campaign has. Withdraw less, or use withdraw_all.
CABINET_AUTH_EXPIRED409The cabinet’s Telegram session expired. The owner reconnects it in the panel; then retry.
CABINET_LOCKED409The cabinet is under automatic management; manual changes are blocked.

Limits and retries

CodeHTTPWhat to do
RATE_LIMITED429Wait Retry-After seconds. See Rate limits.
QUEUE_FULL429The cabinet already has 5 operations queued. Wait for a task to finish, then retry (same Idempotency-Key is fine).
IDEMPOTENCY_KEY_REQUIRED400Add an Idempotency-Key header.
IDEMPOTENCY_KEY_INVALID400Use 8–255 characters; a UUID is ideal.
IDEMPOTENCY_KEY_REUSED422That key was used for a different request — new operation, new key.
IDEMPOTENCY_IN_PROGRESS409The first request with this key is still running. Retry in a few seconds.
IDEMPOTENCY_UNAVAILABLE503Nothing was done. Retry with the same key.
INGEST_DISABLED403Turn on Receive postbacks for the key (Conversions).
INTERNAL_ERROR500Our side. Check the state with a GET before retrying a write; contact @adsly_pro with the request_id if it persists.

Retrying safely

  • 4xx — don’t retry unchanged; fix the request. (A 4xx never consumes your Idempotency-Key, so you can retry the fixed request with the same key.)
  • 429 / 503 — retry after Retry-After.
  • 5xx after a write — the change may or may not have reached Telegram. Retrying with the same Idempotency-Key returns the same 5xx (by design — it prevents a double action). GET the campaign to see what happened, then decide; if you retry, use a new key.
  • Network timeout on a write — retry with the same Idempotency-Key. If the first attempt went through you get its result; if it didn’t, the operation runs now.

Updated 2026-10-08

Discuss your project