# Developer reference [Orbito Ads · English · HTML](https://orbitoads.pro/docs/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) Documentation The reference covers account access, campaign operations, statistics and event delivery. Start by listing the accounts visible to a read-only key. [View documentation index](/docs/llms.txt) [API keys](/api-keys?lang=en) This is the documentation for Orbito Ads. It starts with the API: everything you do with campaigns in the Orbito Ads panel — read stats, create campaigns, change bids and texts, switch campaigns on and off, move budget — you can also do from your own code with an API key, the same way for every cabinet in your account. ## API - [**Quickstart** Key, first request and your first campaign through the API — about five minutes.](/docs/api/) - [**Keys and access** Read-only and campaign-managing keys, which cabinets a key reaches, agency teams.](/docs/api/authentication/) - [**Create campaigns** Channel, bot, search and audience targeting, one or a hundred campaigns per call.](/docs/api/create-campaigns/) - [**Manage campaigns** Edit, pause and resume, move budget, copy, delete — one campaign or a thousand.](/docs/api/manage-campaigns/) - [**Webhooks** Signed status changes in real time and an hourly stats digest.](/docs/api/webhooks/) - [**Build with an AI assistant** Hand these docs to Claude Code or another coding agent and let it write the integration.](/docs/api/ai-assistants/) ## Base URL and auth Example ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` Create the key in the panel: [API & Webhooks](/api-keys?lang=en) (Pro and Agency plans). Questions — [@orbitoads](https://t.me/orbitoads). ## Machine-readable - [OpenAPI 3.1 spec](/docs/api/openapi.yaml) — every endpoint, parameter and error code. - [llms.txt](/docs/llms.txt) — the index AI agents read; [llms-full.txt](/docs/llms-full.txt) — all pages in one file. - Every page has a Markdown twin: add `.md` to its path, e.g. [/docs/api.md](/docs/api.md). The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## Implementation notes ## Connecting a workspace The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ### Developer guides and account access **API quickstart** API quickstart — Use a server-side key to read the account list. Select one account and request its campaigns. For a first write, create a paused draft with a fresh idempotency key and follow the returned task identifier. [**API quickstart**](/docs/api/) **Keys and cabinet permissions** Keys and cabinet permissions — Supply the key in the X-API-Key header from your server. Select one, several or all permitted accounts. Write access combines a campaign-management key with the holder’s own manager or owner permissions. [**Keys and cabinet permissions**](/docs/api/authentication/) **Creating campaigns and media** Creating campaigns and media — A create request accepts up to 100 campaigns in one account. Choose channel, bot, search or audience targeting, supply a unique operation key and follow the returned task. [**Creating campaigns and media**](/docs/api/create-campaigns/) **Changing existing campaigns** Changing existing campaigns — Management actions cover text, links, bids, daily limits, scheduling, budgets and delivery state. A bulk request handles up to 1,000 campaigns. [**Changing existing campaigns**](/docs/api/manage-campaigns/) **Receiving campaign events** Receiving campaign events — The reference distinguishes status_change, hourly_digest and a test ping. Receive callbacks on HTTPS, validate the signature against the raw body and deduplicate deliveries before processing. [**Receiving campaign events**](/docs/api/webhooks/) **Using the API reference with an assistant** Using the API reference with an assistant — Read the OpenAPI schema for request fields and the Markdown reference for behaviour. Keep real keys in the server environment. [**Using the API reference with an assistant**](/docs/api/ai-assistants/) [Manage API keys and webhooks](/api-keys?lang=en) ## Your first request Send GET /api/v1/account/info with X-API-Key. Choose an id from data and use it as account_id in the next request. All identifiers and values in the examples are fictional. ## Operations and fields /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## Request example GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ### Machine-readable references [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/docs/api.md) ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/campaigns | account_id, status, title, bot_username, promote_domain, promote_domain_mode, type, limit, cursor, offset, sortBy, sortOrder | — | 200, 400, 401, 404, 429 | | GET | /api/v1/stats | period, startDate, endDate, startHour, endHour | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/conversions | adId, days | — | 200, 401 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Developer documentation | Field | Documented value | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | Source · [Data source](https://adsly.pro/docs/) ## Cabinet | Field | Field type | | --- | --- | | id | integer | | name | string | | cabinet_type | euro \| ton \| stars | | is_active | boolean | | access_level | owner \| manager \| viewer \| admin | | currency | EUR \| TON \| STARS | | balance | Money | | balance_updated_at | string \| null · date-time | | min_budget | number | | features | object | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [API quickstart](/docs/api/)[Keys and cabinet permissions](/docs/api/authentication/)[Creating campaigns and media](/docs/api/create-campaigns/)[Changing existing campaigns](/docs/api/manage-campaigns/)[Receiving campaign events](/docs/api/webhooks/) [Next topic**API quickstart**](/docs/api/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Orbito Ads API — overview and quickstart [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) API Use a server-side key to read the account list. Select one account and request its campaigns. For a first write, create a paused draft with a fresh idempotency key and follow the returned task identifier. [Markdown](/docs/api.md) The Orbito Ads API gives your code the same control over your Telegram Ads cabinets that you have in the Orbito Ads panel. One key, one base URL, the same calls for Euro, TON and Stars cabinets. | You want to… | Use | | --- | --- | | Pull campaigns and stats into a dashboard or BI | [Campaigns](/docs/api/campaigns/), [Stats](/docs/api/stats/) | | Launch campaigns from a script, a bot or your CRM | [Create campaigns](/docs/api/create-campaigns/) | | Raise bids, pause losers, top up winners automatically | [Manage campaigns](/docs/api/manage-campaigns/) | | Know the moment a campaign is approved, declined or runs out of budget | [Webhooks](/docs/api/webhooks/) | | Count leads and sales from your tracker against each campaign | [Conversions](/docs/api/conversions/) | ## Base URL Example ``` https://orbitoads.pro/api/v1 ``` Every request carries your key in the `X-API-Key` header. Request and response bodies are JSON. All times are UTC. ## Quickstart ### 1. Create a key In the panel open **API & Webhooks** → **+ New key** (Pro and Agency plans). Choose which cabinets the key reaches. To create and change campaigns, tick **Allow managing campaigns** — without it the key only reads. Copy the key: it is shown once. Example ``` export ORBITO_API_KEY="orb_…" ``` ### 2. List the cabinets the key sees Example ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": [ { "id": 53, "name": "Main cabinet", "cabinet_type": "euro", "is_active": true, "access_level": "owner", "currency": "EUR", "balance": "250.00", "balance_updated_at": "2026-10-08T09:40:12.000Z", "min_budget": 1, "features": { "ad_button": true, "crypto_filters": true } } ] } ``` Keep `id` — it is the `account_id` every other call uses. All money in a cabinet is in its `currency`. ### 3. Read campaigns Example ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. Create a campaign (switched off, so nothing is spent) Example ``` curl -s -X POST https://orbitoads.pro/api/v1/campaigns \ -H "X-API-Key: $ORBITO_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "account_id": 53, "title": "API test", "text": "Join the channel for daily market notes", "promote_url": "https://t.me/yourchannel", "cpm": 1.5, "budget": 0, "active": false, "target_type": "channels", "channels": ["@durov"] }' ``` Creating talks to Telegram, so it runs in the background. You get `202 Accepted` and a task: Example ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. Wait for the task Example ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` When `status` is `completed`, `ad_ids` holds the new campaign’s id. Now you can fund it and switch it on: Example ``` curl -s -X POST https://orbitoads.pro/api/v1/campaigns/90412/budget \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "account_id": 53, "action": "add", "amount": 5 }' curl -s -X POST "https://orbitoads.pro/api/v1/campaigns/90412/resume?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" ``` Telegram reviews every new ad before it runs; the campaign’s `status` shows where it is (see [statuses](/docs/api/campaigns/#doc-note-statuses)). A [webhook](/docs/api/webhooks/) tells you the moment it changes. ## Five rules every integration follows 1. **`ad_id` is unique only inside a cabinet.** Telegram reuses ad ids across cabinets. Store and look up campaigns by the pair `(account_id, ad_id)`, and pass `account_id` whenever a key sees more than one cabinet. 2. **Send an `Idempotency-Key` on create, copy, bulk and budget calls** — a fresh UUID per operation, the same one when you retry it. A retry then never creates a second campaign or moves money twice. See [Idempotency](/docs/api/idempotency/). 3. **Create, copy and bulk return a task.** Poll `GET /v1/tasks/{id}` until it finishes. See [Tasks](/docs/api/tasks/). 4. **Money fields are strings** (`"spent": "3.541000"`) to keep exact decimals. Parse them as decimals before doing arithmetic. 5. **Branch on `code`, show `error`.** Every error has a stable machine-readable `code` and a human sentence in `error`. See [Errors](/docs/api/errors/). ## Response shape Example ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## Where to go next - [Keys and access](/docs/api/authentication/) — read-only vs campaign-managing keys, agency teams. - [Build with Claude and other AI assistants](/docs/api/ai-assistants/) — let a coding agent write the integration. - [OpenAPI spec](/docs/api/openapi.yaml) — import into Postman, Insomnia or a client generator. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. Example · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` Example · JSON ``` { "success": true, "data": [ { "id": 7401, "name": "Example language school", "cabinet_type": "euro", "is_active": true, "access_level": "manager", "currency": "EUR", "balance": "82.50", "balance_updated_at": "2026-11-03T12:00:00Z", "min_budget": 1, "features": { "ad_button": true, "crypto_filters": false } } ] } ``` ## Implementation notes ## Your first request Send GET /api/v1/account/info with X-API-Key. Choose an id from data and use it as account_id in the next request. All identifiers and values in the examples are fictional. ## Account and campaign identifiers Store account_id and ad_id together. Different accounts can contain the same ad_id. Include account_id to select the intended record when a key reaches more than one account. ## Accepted work and completion Create, copy and bulk requests return HTTP 202 with a task id. Poll GET /api/v1/tasks/{id}, respecting Retry-After. Check failed and errors even when status is completed. ## Operations and fields GET /api/v1/account/info GET /api/v1/campaigns POST /api/v1/campaigns GET /api/v1/tasks/{id} - GET /api/v1/account/info - GET /api/v1/campaigns - POST /api/v1/campaigns - GET /api/v1/tasks/{id} ## Request example GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/campaigns | account_id, status, title, bot_username, promote_domain, promote_domain_mode, type, limit, cursor, offset, sortBy, sortOrder | — | 200, 400, 401, 404, 429 | | POST | /api/v1/campaigns | Idempotency-Key | application/json · CreateSingleRequest \| CreateBatchRequest | 202, 400, 401, 403, 404, 409, 422, 429, 503 | | GET | /api/v1/tasks/{id} | id | — | 200, 400, 401, 404 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · API quickstart | Field | Documented value | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | Source · [Data source](https://adsly.pro/docs/api/) ## CampaignStatus | Field | Field type | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Developer documentation](/docs/)[Keys and cabinet permissions](/docs/api/authentication/)[Using the API reference with an assistant](/docs/api/ai-assistants/) Reference revision 2026-10-08 [Previous topic**Developer documentation**](/docs/)[Next topic**Keys and cabinet permissions**](/docs/api/authentication/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Cabinets (accounts) [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/accounts/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) The account list exposes the billing currency, available balance, access level and supported ad fields for each visible account. Store its account_id alongside each campaign identifier. [Markdown](/docs/api/accounts.md) A **cabinet** (account) is one Telegram Ads ad account in Orbito Ads. Every campaign belongs to exactly one cabinet, identified by `account_id`. ## GET /v1/account/info The cabinets this key reaches, right now. Example ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": [ { "id": 53, "name": "Main cabinet", "cabinet_type": "euro", "is_active": true, "access_level": "owner", "currency": "EUR", "balance": "250.00", "balance_updated_at": "2026-10-08T09:40:12.000Z", "min_budget": 1, "features": { "ad_button": true, "crypto_filters": true } }, { "id": 61, "name": "Client B", "cabinet_type": "ton", "is_active": true, "access_level": "viewer", "currency": "TON", "balance": "84.20", "balance_updated_at": "2026-10-08T09:35:51.000Z", "min_budget": 1, "features": { "ad_button": false, "crypto_filters": false } } ] } ``` | Field | Meaning | | --- | --- | | `id` | The `account_id` to pass to other calls. | | `cabinet_type` | `euro`, `ton` or `stars`. | | `currency` | `EUR`, `TON` or `STARS` — the currency of **every** money field in this cabinet: balance, budget, spent, CPM. Never add up money across cabinets of different currencies. | | `access_level` | Your access: `owner`, `manager` (agency member who can change campaigns) or `viewer` (agency member, read-only). Writes need `owner` or `manager`. | | `balance` | Money on the cabinet, not yet given to campaigns (decimal string). Refreshed when the cabinet syncs — see `balance_updated_at`. | | `min_budget` | The smallest non-zero `budget` a new campaign in this cabinet can have. | | `features.ad_button` | The cabinet’s ad form has a custom button (`button` field on create/edit). | | `features.crypto_filters` | The cabinet’s ad form has crypto-channel filters. | `balance` is `null` for special partner keys that show adjusted figures. ## Notes - `GET /v1/account/info` costs one read request — call it at start-up and when a write returns `ACCOUNT_NOT_FOUND`, not before every call. - A cabinet disappears from the list when it is deactivated or your access to it is removed. - Cabinets are added in the Orbito Ads panel; the API manages campaigns inside them. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## GET `/api/v1/account/info` List accounts accessible to this key, including currencies, limits and access roles. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": [ { "id": 7401, "name": "Example language school", "cabinet_type": "euro", "is_active": true, "access_level": "manager", "currency": "EUR", "balance": "82.50", "balance_updated_at": "2026-11-03T12:00:00Z", "min_budget": 1, "features": { "ad_button": true, "crypto_filters": false } } ] } ``` ## Implementation notes ## Balances and currencies Read currency, balance_updated_at and min_budget for every account. Amounts and rates in campaign objects can be decimal strings or null. Reporting aggregates use numbers. Keep EUR, TON and Stars totals separate. ## Feature availability features.ad_button controls custom CTA support. features.crypto_filters reports whether crypto-channel filters exist on that account. Use is_active and access_level when offering account actions. ## Operations and fields GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## Request example GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Accessible advertising accounts | Field | Documented value | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | Source · [Data source](https://adsly.pro/docs/api/accounts/) ## Cabinet | Field | Field type | | --- | --- | | id | integer | | name | string | | cabinet_type | euro \| ton \| stars | | is_active | boolean | | access_level | owner \| manager \| viewer \| admin | | currency | EUR \| TON \| STARS | | balance | Money | | balance_updated_at | string \| null · date-time | | min_budget | number | | features | object | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Money | Field | Field type | | --- | --- | | Money | string \| null | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Looking up a campaign](/docs/api/campaigns/)[Creating campaigns and media](/docs/api/create-campaigns/)[Changing existing campaigns](/docs/api/manage-campaigns/)[Campaign and account statistics](/docs/api/stats/)[Targeting dictionaries and groups](/docs/api/targeting/) Reference revision 2026-10-08 [Previous topic**Stepping through campaign pages**](/docs/api/pagination/)[Next topic**Looking up a campaign**](/docs/api/campaigns/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Build with Claude and other AI assistants [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/ai-assistants/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Read the OpenAPI schema for request fields and the Markdown reference for behaviour. Keep real keys in the server environment. Check a read-only operation before enabling campaign changes. [Markdown](/docs/api/ai-assistants.md) These docs are written to be read by coding agents as well as people. Every page exists as plain Markdown, the whole set is available as one file, and the API is described by an OpenAPI spec. Point your assistant at them and it has everything it needs. ## Files for agents | File | What it is | When to use it | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | Index of every page, with one-line summaries ([llms.txt format](https://llmstxt.org/)) | Let the agent pick the pages it needs | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | All pages in one Markdown file (about 80 KB) | Tools that load a large file whole; web-fetch tools may cut it short, so prefer `llms.txt` + pages there | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec: endpoints, parameters, schemas, error codes | Typed clients, request validation, Postman | | `.md` | The page as Markdown, e.g. [`/docs/api/create-campaigns.md`](/docs/api/create-campaigns.md) | A single topic | Every page also has **Copy page as Markdown** at the top — paste it straight into a chat. ## Prompt: integrate the API (Claude Code) Paste this into Claude Code (or another coding agent) in the project that should talk to Orbito Ads. Edit the last paragraph to say what you’re building. Example ``` Integrate the Orbito Ads API into this project. Before writing code, read https://orbitoads.pro/docs/llms.txt and the relevant Markdown pages it lists. The complete documentation is at https://orbitoads.pro/docs/llms-full.txt. The machine-readable contract is at https://orbitoads.pro/docs/api/openapi.yaml. - Use https://orbitoads.pro/api/v1 and the X-API-Key header. Load ORBITO_API_KEY from the environment. Never store it in source or logs. - Identify campaigns by (account_id, ad_id). The same ad_id can occur in several accounts. - Send a fresh UUID in Idempotency-Key for every POST to /campaigns, /campaigns/bulk, /campaigns/{id}/copy or /campaigns/{id}/budget. Reuse that UUID when retrying the same operation. - Creation, copy and bulk operations return 202 and a task. Poll GET /tasks/{id} using Retry-After until the task is completed or failed. - Money values are decimal strings. Parse them with decimal precision before comparing them. - After 429, wait for Retry-After. After a 5xx during a write, read the campaign with GET before retrying with a new Idempotency-Key. - Use the code field for program logic and the error field for the user-facing message. - Provide a small typed API client and tests that mock HTTP responses. Feature to implement: . ``` ## Prompt: one-off task in a chat For a question rather than a codebase change (Claude.ai, ChatGPT or any chat with web access): Example ``` Read https://orbitoads.pro/docs/llms.txt and its campaigns and statistics pages. Write a Python script using Orbito Ads that lists every Active campaign in my accounts with its spend over the last 7 days. Sort by spend. Read the API key from ORBITO_API_KEY. ``` ## Rules for your project’s CLAUDE.md If your project has a `CLAUDE.md` (Claude Code reads it at the start of every session), add this block so every future change to the integration follows the same rules: Example ``` ## Orbito Ads API integration - Consult https://orbitoads.pro/docs/llms.txt and the relevant .md page, plus https://orbitoads.pro/docs/api/openapi.yaml, before changing an API call. Read endpoints and fields from the specification. - Load ORBITO_API_KEY from the environment and keep it out of commits, terminal output and logs. - Use (account_id, ad_id) as campaign identity. Send Idempotency-Key for every POST that creates a campaign or moves money, one UUID per operation reused on retry. - For create, copy and bulk operations poll GET /v1/tasks/{id}. Route live budget, pause and delete operations through one tested module. Ask for approval before running an ad-hoc script against production. ``` ## Working safely with an agent - **Develop with a read-only key.** The agent can explore real data and nothing can change. Switch to a key with **Manage campaigns** only when the write code is reviewed. - **Create campaigns with `"active": false` and `"budget": 0` while testing.** Nothing runs and nothing is spent; delete them afterwards. - **Narrow the key’s scope** to a test cabinet while the integration is new. - **Let the agent read errors.** Every error says what to fix (`error`) and carries a stable `code` and the `param` that was wrong — agents fix their own requests from these without guessing. - Everything the API changes shows in the panel’s campaign history marked **🔌 API** , so you can review what the agent did. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. Example · cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/campaigns?account_id=7401&status=Active%2COn+Hold&limit=25&cursor=' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` ## Implementation notes ## Keys and cabinet permissions Keep X-API-Key on the server. A reporting key has read access. Changes require Manage campaigns, owner or manager access to the selected account, and the corresponding active plan and feature rights. ## A reproducible integration brief Provide the local OpenAPI contract, a fictional account id, the required operation, expected response and a test for retries. Let the server read the real key from its secret store. Read-only reporting starts with accounts and campaign listing. ## Operations and fields /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt /docs/api.md - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt - /docs/api.md ## Request example GET /docs/api/openapi.yaml ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Using the API reference with an assistant | Field | Documented value | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | Source · [Data source](https://adsly.pro/docs/api/ai-assistants/) [llmstxt.org](https://llmstxt.org/) ## Related reading [Developer documentation](/docs/)[API quickstart](/docs/api/)[Keys and cabinet permissions](/docs/api/authentication/) Reference revision 2026-10-08 [Previous topic**Keys and cabinet permissions**](/docs/api/authentication/)[Next topic**Reading API errors**](/docs/api/errors/) ## Sources and data - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Keys and access [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/authentication/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Supply the key in the X-API-Key header from your server. Select one, several or all permitted accounts. Write access combines a campaign-management key with the holder’s own manager or owner permissions. [Markdown](/docs/api/authentication.md) ## Send the key Every request carries the key in a header: Example ``` X-API-Key: orb_0f3c… (68 characters: orb_ followed by 64 hexadecimal digits) ``` There is no OAuth flow and no token exchange — the key is the credential. Keep it on your server; never ship it to a browser or a mobile app. ## Get a key In the panel: **API & Webhooks** → **+ New key** . Keys are part of the **Pro** and **Agency** plans; each person can hold up to 5 active keys. A key is shown **once** , right after you create it — we store only its SHA-256 hash and cannot show it again. Lost it? Revoke it and create a new one. ## What a key can do | Permission | How you get it | What it allows | | --- | --- | --- | | **Read** | every key | campaigns, stats, conversions, tasks, targeting codes, webhooks, sending conversions to us | | **Manage campaigns** | tick **Allow managing campaigns** when you create the key, or switch it on later on the key’s card | everything in Read, plus create, edit, pause/resume, budget, copy, bulk actions, delete, media upload | A read-only key that calls a write endpoint gets `403 READ_ONLY_KEY`. Give dashboards and reporting tools a read-only key; give a manage key only to code you trust to change campaigns. No key — read or manage — can take money out of a cabinet: budget moves only between the cabinet balance and its campaigns. Writes also need an active Pro or Agency plan at the moment of the call (`403 FEATURE_NOT_AVAILABLE` otherwise) and the same per-feature plan rights the panel checks. ## Which cabinets a key reaches When you create a key you choose its scope: | Scope | The key reaches | | --- | --- | | All my cabinets (default) | every cabinet you can open in the panel, including ones added later | | Several | the cabinets you ticked | | One cabinet | that cabinet only | The scope only ever **narrows** what you can open in the panel — it never widens it. It is re-checked on every request: when you lose access to a cabinet, your keys lose it in the same moment. `GET /v1/account/info` always lists exactly what the key reaches right now. If a key reaches several cabinets, pass `account_id` on calls that act on one of them (`400 ACCOUNT_ID_REQUIRED` tells you when it’s missing). ## Agencies and team members API access follows the access you have in the panel, cabinet by cabinet: | Who you are | Cabinets your key reaches | Can manage campaigns in | | --- | --- | --- | | Account owner (regular user) | your own cabinets | all of them | | Agency owner | your personal and agency cabinets | all of them | | Agency team member | the cabinets the agency shared with you | cabinets shared with **Manager** access; **Viewer** cabinets stay read-only | - Team members create their own keys on their own **API & Webhooks** page. The agency’s plan covers them. - The agency owner sees every key the team created under **API & Webhooks → Team keys** — whose it is, whether it can manage campaigns, how many cabinets it reaches, when it was last used — and can revoke any of them. - `GET /v1/account/info` returns `access_level` for each cabinet: `owner`, `manager` or `viewer`. A write to a `viewer` cabinet returns `403 VIEW_ONLY_ACCESS`. - If the owner removes a member, lowers them to Viewer, or the agency plan ends, the member’s keys follow immediately — nothing to revoke by hand. What the roles mean in the panel: **Manager** — full campaign management in that cabinet; **Viewer** — campaigns and stats only. The owner can also let a member add cabinets, invite teammates or share their own cabinets (never above their own level). ## Revoke and rotate - **Revoke** a key on its card in the panel. It stops working immediately. - **Rotate** = create a new key, deploy it, then revoke the old one. Two keys can be active at once, so there is no downtime. - The **webhook secret** (for verifying [webhooks](/docs/api/webhooks/)) is separate from the key and can be rotated on its own. ## Keep keys safe - One key per integration, so you can revoke one without breaking the others. - Store keys in environment variables or a secret manager. Never commit them, never paste them into chats or tickets. - Prefer read-only keys; add **Manage campaigns** only where the code changes campaigns. - Narrow the scope to the cabinets an integration needs. - If a key may have leaked, revoke it first and investigate second. Every change made through the API appears in the campaign’s history in the panel marked **🔌 API** . ## Errors you can get here | HTTP | `code` | Meaning | | --- | --- | --- | | 401 | `API_KEY_MISSING` | no `X-API-Key` header | | 401 | `API_KEY_INVALID` | wrong, revoked or expired key | | 401 | `NO_ACCOUNTS` | the key reaches no active cabinet right now | | 403 | `READ_ONLY_KEY` | a write with a key that doesn’t have Manage campaigns | | 403 | `VIEW_ONLY_ACCESS` | a write to a cabinet shared with you as Viewer | | 403 | `FEATURE_NOT_AVAILABLE` | the plan doesn’t include this action | | 403 | `WRITE_NOT_ALLOWED` | this kind of key (issued by Orbito Ads for partners) can’t write | Full list: [Errors](/docs/api/errors/). The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## Implementation notes ## Connecting a workspace The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## Keys and cabinet permissions Keep X-API-Key on the server. A reporting key has read access. Changes require Manage campaigns, owner or manager access to the selected account, and the corresponding active plan and feature rights. Request outcomes and response fields | API | HTTP | Meaning | | --- | --- | --- | | API_KEY_MISSING | 401 | Send the API key in the X-API-Key header. | | API_KEY_INVALID | 401 | The supplied key is invalid, expired or revoked. | | NO_ACCOUNTS | 401 | No active ad account is available to this key. | | READ_ONLY_KEY | 403 | The key permits reading. Campaign writes require management permission. | | VIEW_ONLY_ACCESS | 403 | A Viewer can inspect this ad account. A change requires account-level write access. | | FEATURE_NOT_AVAILABLE | 403 | The current plan does not include this operation. | | WRITE_NOT_ALLOWED | 403 | The key type the provider issues to partners does not allow writes. | [Reading API errors](/docs/api/errors/) ## Scope and revocation A provider key can cover one, selected or all authorised accounts. Scope is checked on each call. Up to five active keys per person are supported on eligible plans. Revoke a lost key and rotate the webhook secret separately. ## Operations and fields X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## Request example GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/campaigns/{ad_id} | ad_id, account_id | — | 200, 400, 401, 404, 429 | | PATCH | /api/v1/campaigns/{ad_id} | ad_id, account_id | application/json · UpdateRequest | 200, 400, 401, 403, 404, 409, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Keys and cabinet permissions | Field | Documented value | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | Source · [Data source](https://adsly.pro/docs/api/authentication/) ## Cabinet | Field | Field type | | --- | --- | | id | integer | | name | string | | cabinet_type | euro \| ton \| stars | | is_active | boolean | | access_level | owner \| manager \| viewer \| admin | | currency | EUR \| TON \| STARS | | balance | Money | | balance_updated_at | string \| null · date-time | | min_budget | number | | features | object | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Developer documentation](/docs/)[API quickstart](/docs/api/)[Using the API reference with an assistant](/docs/api/ai-assistants/) Reference revision 2026-10-08 [Previous topic**API quickstart**](/docs/api/)[Next topic**Using the API reference with an assistant**](/docs/api/ai-assistants/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Campaigns — list and read [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/campaigns/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Read the campaign list with status and destination filters or request an individual record and its history. Identify each campaign by both account_id and ad_id because ad IDs can repeat in different accounts. [Markdown](/docs/api/campaigns.md) A campaign is one Telegram ad. It is identified by **`(account_id, ad_id)`** — Telegram reuses `ad_id` across cabinets, so `ad_id` alone is not unique. ## The campaign object `GET /v1/campaigns/{ad_id}` returns: Example ``` { "ad_id": 90412, "account_id": 53, "title": "API test", "text": "Join the channel for daily market notes", "status": "Active", "active": true, "promote_url": "https://t.me/yourchannel", "tme_path": "yourchannel", "target_type": "channels", "targets": ["durov"], "cpm": "1.50", "budget": "3.54100", "spent": "1.45900", "daily_budget": null, "views": 1043, "opens": 0, "clicks": 12, "actions": 4, "ctr": "1.15", "cvr": "33.33", "cpc": "0.1215833333", "cpa": "0.3647500000", "views_per_user": 1, "schedule": { "days": { "mon": [9, 10, 11, 12, 13, 14, 15, 16, 17], "tue": [9, 10, 11, 12, 13, 14, 15, 16, 17], "wed": [9, 10, 11, 12, 13, 14, 15, 16, 17], "thu": [9, 10, 11, 12, 13, 14, 15, 16, 17], "fri": [9, 10, 11, 12, 13, 14, 15, 16, 17], "sat": [], "sun": [] }, "timezone": "+03:00" }, "has_media": false, "media_type": null, "button": null, "website_name": null, "group_id": 7, "auto_cpm_enabled": false, "date": "1791364800", "synced_at": "2026-10-08T10:29:41.000Z", "status_changed_at": "2026-10-08T10:31:07.112Z" } ``` | Field | Meaning | | --- | --- | | `title` | Your internal name for the ad. | | `text` | The ad text people see. | | `status` | What Telegram is doing with the ad — see [Statuses](/docs/api/campaigns/#doc-note-statuses). | | `active` | What you asked for: `true` = should run. A campaign with `active: true` and status `Stopped` resumes as soon as it has budget again. | | `promote_url` / `tme_path` | What the ad leads to: a website URL, or a `t.me/` link (channel, bot, mini-app, post). | | `target_type` | `channels`, `bots`, `search` or `users` — see [Create campaigns](/docs/api/create-campaigns/). | | `targets` | Usernames the ad targets (channels or bots), when known. | | `cpm` | Bid per 1,000 views, in the cabinet’s currency. | | `budget` | Money **left** on the campaign. `budget + spent` is everything it was given. | | `spent` | Money spent so far. | | `daily_budget` | Daily spending cap, if one is set. | | `views`, `clicks`, `actions`, `opens` | Lifetime counters. `actions` are platform actions (joins, bot starts) — not your conversions; for those see [Conversions](/docs/api/conversions/). | | `ctr`, `cvr` | Percentages: `"1.15"` means 1.15 %. | | `cpc`, `cpa` | Cost per click and per action. | | `views_per_user` | How many times one person can see the ad (1–4). | | `schedule` | Weekdays and hours the ad is shown, or `null` — it runs around the clock. See [Schedule](/docs/api/manage-campaigns/#doc-note-schedule). | | `group_id` | The campaign’s group in the panel, if any. | | `auto_cpm_enabled` | Orbito Ads’s Auto CPM manages the bid. | | `date` | When the ad was created: unix seconds, as a string. | | `status_changed_at` | Last status change. Not touched by stats updates — good for “what changed since”. | | `synced_at` | When the ad’s own settings — `schedule`, `text`, `views_per_user`, targeting — were last read from Telegram. See [Freshness](/docs/api/campaigns/#doc-heading-freshness). | **Money fields are decimal strings** (`cpm`, `budget`, `spent`, `ctr`, `cvr`, `cpc`, `cpa`) so decimals stay exact. Counters (`views`, `clicks`, `actions`, `opens`) are numbers. All money is in the cabinet’s currency (see [Cabinets](/docs/api/accounts/)). ## Statuses | Status | Meaning | What you can do | | --- | --- | --- | | `Active` | Running. | Pause, change bid, add budget. | | `In Review` | Waiting for Telegram’s review; not shown yet. | Wait — a webhook tells you when it changes. | | `Declined` | Telegram rejected the ad. | Edit the text or link (resubmits), or create a new one. | | `On Hold` | Switched off — by you or an automation rule. | Resume. | | `Stopped` | Budget used up. | Add budget; it runs again if `active` is `true`. | | `Paused` | Paused by Telegram for the whole cabinet (rare). | Contact [@orbitoads](https://t.me/orbitoads). | | `Deleted` | Removed. Kept in history, hidden from lists. | — | ## GET /v1/campaigns Campaigns of every cabinet the key reaches. Example ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active,On%20Hold&limit=100&cursor=" \ -H "X-API-Key: $ORBITO_API_KEY" ``` | Parameter | Default | Meaning | | --- | --- | --- | | `account_id` | — | Only this cabinet. (`accountId` also works.) | | `status` | all but Deleted | One status or several, comma-separated. | | `title` | — | Title contains this text. | | `bot_username` | — | Ads of one bot or channel: matches the username in `tme_path`, case-insensitive, no `@`. `foo` does not match `foobar`. | | `promote_domain` | — | Website ads whose link is on this host. Accepts `example.com` or a full URL; `www.`, scheme, path and port are ignored. | | `promote_domain_mode` | `exact` | `suffix` also matches subdomains (`x.example.com`). | | `type` | — | `bot` (bots and mini-apps), `channel` (channels, groups, posts) or `site` (external websites). | | `limit` | 100 | 1–500. | | `cursor` | — | Pagination — see [Pagination](/docs/api/pagination/). Recommended. | | `offset`, `sortBy`, `sortOrder` | — | Offset pagination (≤ 500 per cabinet). | Filters combine with AND. An unknown bot or domain returns an empty list, not an error. Example ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "title": "API test", "text": "…", "status": "Active", "tme_path": "yourchannel", "promote_url": null, "views": 1043, "opens": 0, "clicks": 12, "actions": 4, "spent": "1.45900", "budget": "3.54100", "cpm": "1.50", "cpc": "0.12", "cpa": "0.36", "ctr": "1.15", "cvr": "33.33", "date": "1791364800", "group_id": 7, "status_changed_at": "2026-10-08T10:31:07.112Z" } ], "meta": { "limit": 100, "cursor": null, "next_cursor": null, "hasMore": false } } ``` ## Get one campaign `GET /v1/campaigns/{ad_id}` — the full object above, including targeting, creative fields and `schedule` (the list endpoint leaves those out to stay fast). Deleted campaigns are returned too, with `status: "Deleted"`. Example ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id` is needed only when the same `ad_id` exists in several of your cabinets (`400 ACCOUNT_ID_REQUIRED` tells you). ### Freshness Counters and status are refreshed for every campaign every hour. The ad’s own settings — `schedule`, `text`, `views_per_user`, targeting — come from reading the ad itself, so: - `GET /v1/campaigns/{ad_id}` re-reads the ad from Telegram when our copy is older than **5 minutes** , before answering. A change someone made directly in Telegram’s ad interface shows up here within that window. - Running campaigns (`Active`, `In Review`, `On Hold`) are also re-read in the background about every 3 hours. - Changes made through Orbito Ads — the panel or this API — are in the copy at once. If Telegram doesn’t answer in time, you get the stored copy; `synced_at` tells you how old it is. ## GET /v1/campaigns/{ad_id}/history One campaign’s totals over a period — a single aggregate, not hourly points. Example ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": { "views": 640, "clicks": 7, "spent": 0.96, "ctr": 1.09, "cpm": 1.5, "cpa": 0.32 }, "meta": { "adId": 90412, "accountId": 53, "period": "7d" } } ``` `period`: `24h` (default), `7d`, `30d` or `custom` with `startDate` / `endDate` (`YYYY-MM-DD`, UTC) and optional `startHour` / `endHour` (0–23). No data for the period → `404 NOT_FOUND`. ## Keeping a local copy in sync 1. Page through `GET /v1/campaigns?cursor=` and upsert by `(account_id, ad_id)`. 2. Subscribe to [webhooks](/docs/api/webhooks/) for status changes and hourly stats instead of polling every minute. 3. Re-sync fully once a day to catch anything a webhook missed. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## GET `/api/v1/campaigns` Read a filtered, paginated list of campaigns. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `status` | query | `string` | — | | `title` | query | `string` | — | | `bot_username` | query | `string` | — | | `promote_domain` | query | `string` | — | | `promote_domain_mode` | query | `string` | — | | `type` | query | `string` | — | | `limit` | query | `integer` | — | | `cursor` | query | `string` | — | | `offset` | query | `integer` | — | | `sortBy` | query | `string` | — | | `sortOrder` | query | `string` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/campaigns?account_id=7401&status=Active%2COn+Hold&limit=25&cursor=' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": [ { "ad_id": 38017, "account_id": 7401, "title": "Conversation club · November", "text": "See this month’s language club schedule.", "status": "Active", "tme_path": null, "promote_url": "https://school.example/club", "views": 3200, "opens": 0, "clicks": 32, "actions": 4, "spent": "4.00", "budget": "36.00", "cpm": "1.25", "cpc": "0.125", "cpa": "1.00", "ctr": "1.00", "cvr": "12.50", "date": "1793620800", "group_id": 516, "status_changed_at": "2026-11-03T12:00:00Z" } ], "meta": { "limit": 25, "cursor": null, "next_cursor": null, "hasMore": false } } ``` ## GET `/api/v1/campaigns/{ad_id}` Retrieve one campaign with its targeting, creative fields and schedule. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/campaigns/38017?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "account_id": 7401, "ad_id": 38017, "title": "Conversation club · November", "text": "See this month’s language club schedule.", "status": "Active", "active": true, "promote_url": "https://school.example/club", "tme_path": null, "target_type": "users", "targets": [], "cpm": "1.25", "budget": "36.00", "spent": "4.00", "daily_budget": "8.00", "views": 3200, "opens": 0, "clicks": 32, "actions": 4, "ctr": "1.00", "cvr": "12.50", "cpc": "0.125", "cpa": "1.00", "views_per_user": 2, "schedule": null, "has_media": false, "media_type": null, "button": "learn_more", "website_name": "Example language school", "group_id": 516, "auto_cpm_enabled": false, "date": "1793620800", "synced_at": "2026-11-03T12:00:00Z", "status_changed_at": "2026-11-03T12:00:00Z" } } ``` ## GET `/api/v1/campaigns/{ad_id}/history` Read the aggregate metrics for one campaign over a date or hour range. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/campaigns/38017/history?account_id=7401&period=7d' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "views": 3200, "clicks": 32, "actions": 4, "spent": 4, "ctr": 1, "cpm": 1.25, "cpa": 1 }, "meta": { "adId": 38017, "accountId": 7401, "period": "7d" } } ``` ## Implementation notes ## Account and campaign identifiers Store account_id and ad_id together. Different accounts can contain the same ad_id. Include account_id to select the intended record when a key reaches more than one account. ## Filters and status Filters combine with AND. status accepts several comma-separated values. Lists omit Deleted by default. The detail view can still return Deleted. active records the requested delivery state and status records the platform decision. ## Operations and fields GET /api/v1/campaigns GET /api/v1/campaigns/{ad_id} GET /api/v1/campaigns/{ad_id}/history account_id ad_id - GET /api/v1/campaigns - GET /api/v1/campaigns/{ad_id} - GET /api/v1/campaigns/{ad_id}/history - account_id - ad_id ## Request example GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/campaigns | account_id, status, title, bot_username, promote_domain, promote_domain_mode, type, limit, cursor, offset, sortBy, sortOrder | — | 200, 400, 401, 404, 429 | | GET | /api/v1/campaigns/{ad_id} | ad_id, account_id | — | 200, 400, 401, 404, 429 | | GET | /api/v1/campaigns/{ad_id}/history | ad_id, account_id, period, startDate, endDate, startHour, endHour | — | 200, 400, 401, 404 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Looking up a campaign | Field | Documented value | | --- | --- | | account_id + ad_id | integer + integer | | promote_domain_mode | exact \| suffix | | type | bot \| channel \| site | | sortOrder | ASC \| DESC | | status | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Source · [Data source](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | Field | Field type | | --- | --- | | ad_id | integer | | account_id | integer | | title | string | | text | string \| null | | status | CampaignStatus | | tme_path | string \| null | | promote_url | string \| null | | views | integer | | opens | integer | | clicks | integer | | actions | integer | | spent | Money | | budget | Money | | cpm | Money | | cpc | Money | | cpa | Money | | ctr | string \| null | | cvr | string \| null | | date | string \| null | | group_id | integer \| null | | status_changed_at | string \| null · date-time | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | Field | Field type | | --- | --- | | ad_id | integer | | account_id | integer | | title | string | | text | string \| null | | status | CampaignStatus | | active | boolean | | promote_url | string \| null | | tme_path | string \| null | | target_type | channels \| bots \| search \| users \| | | targets | array · [string] | | cpm | Money | | budget | Money | | spent | Money | | daily_budget | number \| string \| null | | views | integer | | opens | integer | | clicks | integer | | actions | integer | | ctr | string \| null | | cvr | string \| null | | cpc | Money | | cpa | Money | | views_per_user | integer \| null | | schedule | Schedule | | has_media | boolean | | media_type | image \| video \| | | button | string \| null | | website_name | string \| null | | group_id | integer \| null | | auto_cpm_enabled | boolean | | date | string \| null | | synced_at | string \| null · date-time | | status_changed_at | string \| null · date-time | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | Field | Field type | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Accessible advertising accounts](/docs/api/accounts/)[Creating campaigns and media](/docs/api/create-campaigns/)[Changing existing campaigns](/docs/api/manage-campaigns/)[Campaign and account statistics](/docs/api/stats/)[Targeting dictionaries and groups](/docs/api/targeting/) Reference revision 2026-10-08 [Previous topic**Accessible advertising accounts**](/docs/api/accounts/)[Next topic**Creating campaigns and media**](/docs/api/create-campaigns/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Versioning and changelog [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/changelog/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) The version appears in the API path. Consumers should tolerate additional fields and future enum values. The October 2026 entries cover campaign schedules, management operations and period totals. [Markdown](/docs/api/changelog.md) ## Versioning The version is in the path: `/api/v1`. Within `v1` we only make **additive** changes: | Additive (can happen any time) | Breaking (only in a new version) | | --- | --- | | new endpoints | removing or renaming an endpoint or field | | new optional request fields | a new required field | | new response fields | changing a field’s type or meaning | | new values in enums (`status`, error `code`) | removing an enum value | | new error codes | making a valid request invalid | So write clients that **ignore fields they don’t know** and **handle unknown enum values and error codes** gracefully. A breaking change would ship as `/api/v2`, announced here first, with `v1` kept running alongside it. ## Changelog ### 2026-10-26 — period totals - **New:** every `topCampaigns` row of [`GET /v1/stats/analytics`](/docs/api/stats/#doc-note-get-v1statsanalytics) carries `cpm` — spend per 1,000 views over the period — next to `cpc` and `cpa`. - **Fix:** a window of one or two days now adds up exactly to the same days asked as one range. The first minutes after midnight (UTC) used to drop out of such windows, so a single day came back about 1–2% low; ranges of three days and more were already right and do not change. - **Fix:** a window of up to two days that starts more than 29 days back returned zeros; it now returns that day’s numbers. ### 2026-10-08 — ad schedule - **New: `schedule`** — show a campaign only on chosen weekdays and hours. Set it on create, `PATCH /v1/campaigns/{ad_id}`, copy, or many campaigns at once with the bulk action **`set_schedule`** ; `null` removes it. `GET /v1/campaigns/{ad_id}` returns it. Format: [Schedule](/docs/api/manage-campaigns/#doc-note-schedule). It doesn’t switch the campaign on or off. - Pausing, resuming and editing a campaign keep its schedule; copies and recreated campaigns inherit it. - **Fix:** `PATCH /v1/campaigns/{ad_id}` with only `cpm`, `active` and/or `schedule` sent the campaign back to Telegram’s review. These now go through Telegram’s own bid and status forms and never trigger a review; other fields still do (Telegram’s rule) — see [Edit](/docs/api/manage-campaigns/#doc-note-edit). - **Fix:** setting a schedule on a campaign with no budget could send it back to review. Such a campaign now answers `400` with `param: "schedule"` and is left untouched — add budget first, then set the schedule. - **`GET /v1/campaigns/{ad_id}` is now current:** it re-reads the ad from Telegram when our copy is older than 5 minutes, so `schedule`, `text` and `views_per_user` reflect changes made directly in Telegram. New field **`synced_at`** says when the ad was last read. See [Freshness](/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08 — campaign management - **New: write access.** Keys can now carry **Manage campaigns** : `POST /v1/campaigns` (create, up to 100 per call), `PATCH /v1/campaigns/{ad_id}`, `POST …/pause`, `…/resume`, `…/budget`, `…/copy`, `POST /v1/campaigns/bulk`, `DELETE /v1/campaigns/{ad_id}`, `POST /v1/media`. Existing keys stay read-only until you switch it on. - **New reads:** `GET /v1/campaigns/{ad_id}` (one campaign with targeting), `GET /v1/tasks/{id}`, `GET /v1/groups`, `GET /v1/targeting`. - **Agency team members** can create keys; a key reaches the cabinets shared with the member, at their access level. The agency owner sees all team keys (API & Webhooks → Team keys) and can revoke them. - **`Idempotency-Key`** required on create, copy, bulk and budget. - **Separate write rate limit:** 30 requests per minute, apart from the 60 reads. - **`GET /v1/account/info`** adds `access_level`, `currency`, `balance`, `balance_updated_at`, `min_budget`, `features`. - **Errors** add `code` and `request_id` next to the unchanged `error` text. A `500` no longer includes internal error text. - `account_id` is accepted everywhere `accountId` was (both work). - **Fix:** `GET /v1/stats?period=all` returned cost per click as `cpa`; it is now cost per action, like every other period. ### 2026-10-04 - URL filters apply to both webhooks; `status_change` only reaches keys whose owner can see the cabinet. ### 2026-09-18 - Conversions get their own budget (20 events/s) apart from the read limit; batches of up to 1,000 events. ### 2026-06-30 - Inbound conversions: `POST /v1/postback`, `GET /v1/ingest/{token}`, `GET /v1/conversions`. ### Earlier - `GET /v1/campaigns` with cursor pagination and the `bot_username`, `promote_domain` and `type` filters; stats endpoints; `status_change` and `hourly_digest` webhooks. The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## Implementation notes ## Versioned routes The current contract uses /api/v1. Additive changes can introduce optional fields, endpoints, enum values and error codes. Clients should preserve unknown status values and ignore response fields they do not use. ## Contract changes to track The current schema includes weekly schedules, account-scoped campaign writes and CPM in topCampaigns. A changed field type, removed field or newly mandatory input is a breaking change and belongs to a new API version. ## Operations and fields /api/v1 2026-10-26 2026-10-08 2026-10-04 2026-09-18 2026-06-30 - /api/v1 - 2026-10-26 - 2026-10-08 - 2026-10-04 - 2026-09-18 - 2026-06-30 ## Request example GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/stats/total | period, startDate, endDate, startHour, endHour | — | 200, 401, 429 | | PATCH | /api/v1/campaigns/{ad_id} | ad_id, account_id | application/json · UpdateRequest | 200, 400, 401, 403, 404, 409, 429 | | POST | /api/v1/campaigns/bulk | Idempotency-Key | application/json · BulkRequest | 202, 400, 401, 403, 404, 409, 422, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · API versions and changes | Field | Documented value | | --- | --- | | 2026-10-26 | GET /api/v1/stats/total | | 2026-10-08 | schedule | | 2026-10-08 | create, edit, copy, pause, resume, bulk | | OpenAPI | 3.1.0 | Source · [Data source](https://adsly.pro/docs/api/changelog/) ## Related reading [Receiving campaign events](/docs/api/webhooks/)[Sending confirmed conversions](/docs/api/conversions/) Reference revision 2026-10-26 [Previous topic**Sending confirmed conversions**](/docs/api/conversions/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Conversions (postbacks in) [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/conversions/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Send a conversion from your server or tracker with a campaign reference or invite link, event type and unique transaction ID. Optional revenue and currency let the reporting layer associate outcomes with spend. [Markdown](/docs/api/conversions.md) Telegram counts views, clicks and joins. Your backend or tracker knows what happened next — a lead, a deposit, a sale. Send those events to Orbito Ads and each campaign shows its conversions and revenue in the panel, in reports and in automation rules. ## Turn it on On the key’s card in the panel, switch on **Receive postbacks** . Without it, sending returns `403 INGEST_DISABLED`. For a tracker, also press **Generate tracker URL** — you get a write-only URL (shown once) that can post conversions but can’t read anything. ## How a conversion finds its campaign Each ad links somewhere with an identifier you control: - a bot or mini-app: `t.me/yourbot?start=REF` or `?startapp=REF` - a website: your tracker’s click id or sub id in the link, e.g. `https://site.com/?subid=REF` When you send a conversion, include that `REF` as `ref`. Orbito Ads finds the campaign whose link carries it, in the cabinets the key reaches. If several campaigns of one cabinet share the same `ref`, the conversion counts for each of them. ## From your backend: POST /v1/postback Example ``` curl -s -X POST https://orbitoads.pro/api/v1/postback \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -d '{ "ref": "promo_oct", "event": "purchase", "amount": 49.90, "currency": "USD", "txid": "order-10087" }' ``` Example ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` Up to 1,000 events at once: `{ "events": [ {…}, {…} ] }` (or a bare array). The response reports each one — `{ "accepted": 998, "failed": 2, "results": [ … ] }` — so one bad event never sinks the batch. ## From a tracker: GET /v1/ingest/{token} Paste the tracker URL into your tracker’s postback settings, with its macros: Example ``` # Keitaro https://orbitoads.pro/api/v1/ingest/?ref={subid}&event={status}&amount={payout}¤cy={currency}&txid={subid}_{status} # RedTrack https://orbitoads.pro/api/v1/ingest/?ref={clickid}&event={type}&status={status}&amount={sum}&txid={rdtk_event_id} # Binom https://orbitoads.pro/api/v1/ingest/?ref={clickid}&event={status}&amount={payout}&txid={clickid} # Voluum https://orbitoads.pro/api/v1/ingest/?ref={clickid}&event={et}&amount={payout}¤cy={currency}&txid={txid} ``` Check the macro names against your tracker’s own documentation. The answer is plain text: `OK`, `OK (deduped)`, or an error message with its HTTP status (4xx — don’t retry, 5xx — retry). ## Fields | Field | Also accepted as | Required | Meaning | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | yes¹ | The identifier from the ad’s link. Up to 512 characters. | | `invite_link` | `invitelink`, `link` | yes¹ | For channel ads: the unique invite link Orbito Ads created. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | yes | Becomes `lead`, `conversion` or `purchase` (words like `signup`, `ftd`, `deposit`, `sale` are understood). Unknown words are refused. | | `txid` | `tid`, `transaction_id`, `order_id`, `rdtk_event_id`, header `X-Idempotency-Key` | yes | Your id for this event. Sending the same `txid` again updates the event instead of counting it twice. Up to 128 characters. | | `amount` | `payout`, `sum`, `revenue`, `value` | no | Number; negative for chargebacks. | | `currency` | `cur`, `cnv_currency` | no | ISO 4217 code. Without one, an amount is recorded as USD. | | `status` | — | no | Your network’s own status word (approved, pending…), stored as is. | | `event_time` | `timestamp`, `date` | no | ISO or unix time; kept within the last 90 days. | | `account_id` | `accountId` | sometimes | Needed when the same `ref` exists in several of your cabinets (`409` otherwise). | | `meta` | — | no | Your own JSON object, up to 4 KB. | ¹ `ref` or `invite_link`. ## Limits and retries 20 events per second per key, with bursts up to 1,000 — separate from the read and write budgets. On `429` wait `Retry-After`; retrying is always safe because `txid` deduplicates. ## GET /v1/conversions Totals per campaign, counted once per event: Example ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | Parameter | Meaning | | --- | --- | | `adId` | One campaign. | | `days` | Only events received in the last 1–365 days. | - `revenue` is per currency — amounts are never converted. - `ad_id` is `null` for events matched by a `ref` that several campaigns share. - Amounts you send are your own reporting. They are not billed and don’t change anything you pay Orbito Ads. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## POST `/api/v1/postback` Submit one conversion or a batch of up to 1,000 events. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X POST https://orbitoads.pro/api/v1/postback \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -H 'Content-Type: application/json' \ --data '{ "ref": "club-november", "event": "purchase", "txid": "example-order-2048", "amount": 18, "currency": "EUR", "account_id": 7401 }' ``` HTTP 202 ``` { "success": true, "data": { "id": 61176, "ad_id": 38017, "account_id": 7401, "event_type": "purchase", "deduped": false } } ``` ### Request body schema JSON Schema ``` { "oneOf": [ { "properties": { "account_id": { "type": "integer" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "event": { "type": "string" }, "event_time": { "type": [ "string", "integer" ] }, "invite_link": { "type": "string" }, "meta": { "type": "object" }, "ref": { "maxLength": 512, "type": "string" }, "status": { "maxLength": 64, "type": "string" }, "txid": { "maxLength": 128, "type": "string" } }, "required": [ "event", "txid" ], "type": "object" }, { "properties": { "events": { "items": { "properties": { "account_id": { "type": "integer" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "event": { "type": "string" }, "event_time": { "type": [ "string", "integer" ] }, "invite_link": { "type": "string" }, "meta": { "type": "object" }, "ref": { "maxLength": 512, "type": "string" }, "status": { "maxLength": 64, "type": "string" }, "txid": { "maxLength": 128, "type": "string" } }, "required": [ "event", "txid" ], "type": "object" }, "maxItems": 1000, "type": "array" } }, "required": [ "events" ], "type": "object" }, { "items": { "properties": { "account_id": { "type": "integer" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "event": { "type": "string" }, "event_time": { "type": [ "string", "integer" ] }, "invite_link": { "type": "string" }, "meta": { "type": "object" }, "ref": { "maxLength": 512, "type": "string" }, "status": { "maxLength": 64, "type": "string" }, "txid": { "maxLength": 128, "type": "string" } }, "required": [ "event", "txid" ], "type": "object" }, "maxItems": 1000, "type": "array" } ] } ``` ## GET `/api/v1/ingest/{token}` Send a tracker conversion through a write-only URL. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `token` | path | `string` | Yes | | `ref` | query | `string` | — | | `event` | query | `string` | — | | `txid` | query | `string` | — | | `amount` | query | `string` | — | | `currency` | query | `string` | — | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/ingest/YOUR_ORBITO_TRACKER_TOKEN?ref=club-november&event=purchase&txid=example-order-2048&amount=18¤cy=EUR' ``` HTTP 200 ``` "OK" ``` ## GET `/api/v1/conversions` List conversion counts and revenue grouped by the original currency. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/conversions?adId=38017&days=7' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": [ { "account_id": 7401, "ad_id": 38017, "leads": 2, "conversions": 1, "purchases": 1, "revenue": { "EUR": 18 } } ] } ``` ## Implementation notes ## Link an event to an ad Enable Receive postbacks on the provider key. Send ref or invite_link, an event and a stable txid. The canonical events are lead, conversion and purchase. When a ref resolves across accounts, include account_id. Request outcomes and response fields | API | Meaning | | --- | --- | | account_id / accountId | accountId is accepted as an alias for account_id. Supply the account when the same ref occurs in multiple accounts. An ambiguous match returns HTTP 409. | ## Deduplication and currency Repeating txid updates its event. A batch can contain successes and failures. Include ISO currency for revenue, otherwise USD is assumed. Negative amounts represent chargebacks. The tracker URL is write-only and returns plain text OK or OK (deduped). ## Operations and fields POST /api/v1/postback GET /api/v1/ingest/{token} GET /api/v1/conversions ref invite_link event txid amount currency - POST /api/v1/postback - GET /api/v1/ingest/{token} - GET /api/v1/conversions - ref - invite_link - event - txid - amount - currency ## Request example GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | POST | /api/v1/postback | — | application/json · ConversionEvent \| object \| array · [ConversionEvent] · 0 … 1000 | 202, 400, 401, 403, 404, 409, 429 | | GET | /api/v1/ingest/{token} | token, ref, event, txid, amount, currency | — | 200, 400, 401, 403, 404, 429 | | GET | /api/v1/conversions | adId, days | — | 200, 401 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Sending confirmed conversions | Field | Documented value | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | Source · [Data source](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | Field | Field type | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | Field | Field type | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Receiving campaign events](/docs/api/webhooks/)[API versions and changes](/docs/api/changelog/) Reference revision 2026-10-08 [Previous topic**Receiving campaign events**](/docs/api/webhooks/)[Next topic**API versions and changes**](/docs/api/changelog/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Create campaigns [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/create-campaigns/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) A create request accepts up to 100 campaigns in one account. Choose channel, bot, search or audience targeting, supply a unique operation key and follow the returned task. Upload media first if a creative needs it. [Markdown](/docs/api/create-campaigns.md) `POST /v1/campaigns` creates campaigns in one cabinet. It needs a key with **Manage campaigns** , an `Idempotency-Key`, and returns `202` with a [task](/docs/api/tasks/) — the campaigns appear when the task completes. ## A first example Example ``` curl -s -X POST https://orbitoads.pro/api/v1/campaigns \ -H "X-API-Key: $ORBITO_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "account_id": 53, "title": "Crypto channels — notes", "text": "Daily market notes in 3 minutes. No noise.", "promote_url": "https://t.me/yourchannel", "cpm": 1.5, "budget": 20, "target_type": "channels", "channels": ["@durov", "t.me/telegram"] }' ``` Example ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## Many at once Put the campaigns in `campaigns` (up to 100). `account_id` and the group fields stay at the top level and apply to all of them. Example ``` { "account_id": 53, "new_group_name": "October test", "campaigns": [ { "title": "A", "text": "Variant A", "promote_url": "https://t.me/yourchannel", "cpm": 1.5, "budget": 10, "target_type": "channels", "channels": ["@durov"] }, { "title": "B", "text": "Variant B", "promote_url": "https://t.me/yourchannel", "cpm": 1.5, "budget": 10, "target_type": "channels", "channels": ["@telegram"] } ] } ``` Campaigns are created one after another. If the first one fails, the task stops — fix the input rather than repeat the same error 100 times. Each failure is listed in the task’s `errors` with its `index` in your array. ## Fields | Field | Required | Meaning | | --- | --- | --- | | `title` | yes | Internal name, shown in the panel. | | `text` | yes | Ad text people see. Telegram’s own length and content rules apply — a refusal comes back in the task’s `errors`. | | `promote_url` | yes | What the ad opens: `https://t.me/channel`, `t.me/bot?start=ref`, `@channel` or a website URL. | | `cpm` | yes | Bid per 1,000 views in the cabinet’s currency, greater than 0. Too low for the targeting → Telegram’s minimum comes back in the error. | | `budget` | yes | Money moved from the cabinet balance to the campaign: `0`, or at least the cabinet’s `min_budget` ([Cabinets](/docs/api/accounts/)). With `0` the ad is created but can’t run until you add budget. | | `target_type` | yes | `channels`, `bots`, `search` or `users` — see below. | | `active` | no | `false` creates it switched off. Default `true`. | | `daily_budget` | no | Daily spending cap. | | `views_per_user` | no | How many times one person can see the ad, 1–4. | | `media` | no | Image or video token from [`POST /v1/media`](/docs/api/create-campaigns/#doc-note-upload-media). | | `picture` | no | `true` shows the promoted channel’s avatar in the ad. | | `button` | no | Button under the ad: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request`. Only where the cabinet’s `features.ad_button` is `true`. | | `website_name` | no | Brand name shown above a website ad. | | `schedule` | no | Show the ad only on chosen weekdays and hours, e.g. weekdays 9:00–18:00. Format: [Schedule](/docs/api/manage-campaigns/#doc-note-schedule). Without it the ad runs around the clock. | Top level only: `account_id` (needed when the key reaches several cabinets), `group_id` (an existing [group](/docs/api/targeting/#doc-note-groups)) or `new_group_name` (creates the group, or reuses one with that name). Unknown fields are refused with `400 VALIDATION_ERROR` and the field name in `param` — a typo never silently drops a setting. ## Targeting ### `channels` — show the ad in specific channels Example ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | Field | Meaning | | --- | --- | | `channels` | 1–100 public channels: `@name`, `name` or `t.me/name`. Required. | | `languages`, `topics`, `exclude_topics` | Narrow by channel language and topic ([codes](/docs/api/targeting/)). | | `add_similar_channels` | Also add channels similar to these. | ### `bots` — show the ad in bots Example ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots`: 1–100 public bots. Required. ### `search` — show the ad for Telegram search queries Example ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords`: 1–100 phrases, up to 64 characters each. Required. ### `users` — show the ad to an audience Example ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | Field | Meaning | | --- | --- | | `countries` | ISO country codes. | | `languages` | Language codes. | | `topics`, `exclude_topics` | Interests by topic id. | | `audience_channels` | People who read these channels. | At least one of these is required. Codes: [Targeting codes](/docs/api/targeting/). Channels, bots and keywords are resolved to Telegram’s own ids when the task runs. Ones Telegram can’t find are skipped; if none are found, that campaign fails — `No targets found: …` for channels and bots, `No valid search queries found` for keywords — and the task’s `errors` says so. ## After creating 1. Poll [`GET /v1/tasks/{id}`](/docs/api/tasks/) until `completed`. `ad_ids` holds the new campaigns. 2. Telegram reviews each new ad: it starts `In Review`, then becomes `Active` (or `Declined`). A [webhook](/docs/api/webhooks/) tells you when. 3. Change, fund or pause them with [Manage campaigns](/docs/api/manage-campaigns/). ## Upload media `POST /v1/media` uploads an image or video into a cabinet and returns a `media` token for `POST /v1/campaigns`, `PATCH` and copy. The token belongs to that cabinet — upload into the cabinet you’ll create in. Example ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` Example ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG, PNG, GIF, WEBP or MP4, up to 10 MB, sent as `multipart/form-data` in the field `file`. - Some cabinets accept only 16:9 images at least 640 px wide; if a file doesn’t fit, Telegram’s reason comes back in `error`. ## Errors | Code | When | | --- | --- | | `VALIDATION_ERROR` | A field is missing, unknown, of the wrong type, or doesn’t belong to this `target_type` — `param` says which. | | `IDEMPOTENCY_KEY_REQUIRED` | No `Idempotency-Key`. | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | Say which cabinet / that cabinet isn’t reachable. | | `VIEW_ONLY_ACCESS` | You have Viewer access to this cabinet. | | `QUEUE_FULL` | 5 creates already queued in this cabinet. | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | The cabinet can’t take manual changes right now. | Individual campaign failures (Telegram refused a text, a bid, a link) don’t fail the request — they appear in the task’s `errors`. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## POST `/api/v1/campaigns` Queue creation of one campaign or a batch of up to 100 in one account. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Yes | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X POST https://orbitoads.pro/api/v1/campaigns \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474805' \ -H 'Content-Type: application/json' \ --data '{ "title": "November club · draft", "text": "Explore this month’s language club schedule.", "promote_url": "https://school.example/club", "cpm": 1.25, "budget": 0, "active": false, "target_type": "users", "countries": [ "GB" ], "languages": [ "en" ], "account_id": 7401, "group_id": 516 }' ``` HTTP 202 ``` { "success": true, "data": { "id": 96203, "type": "create", "status": "pending", "account_id": 7401, "total": 1, "ad_ids": [] } } ``` ### Request body schema JSON Schema ``` { "oneOf": [ { "properties": { "account_id": { "type": "integer" }, "active": { "default": true, "type": "boolean" }, "add_similar_channels": { "type": "boolean" }, "audience_channels": { "items": { "type": "string" }, "type": "array" }, "bots": { "items": { "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" }, "budget": { "minimum": 0, "type": "number" }, "button": { "enum": [ "subscribe", "view", "read", "learn_more", "download", "open", "sign_up", "buy", "order", "play", "try", "leave_request" ], "type": "string" }, "channels": { "items": { "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" }, "countries": { "items": { "type": "string" }, "type": "array" }, "cpm": { "exclusiveMinimum": 0, "type": "number" }, "daily_budget": { "minimum": 0, "type": "number" }, "exclude_topics": { "items": { "type": "integer" }, "type": "array" }, "group_id": { "type": "integer" }, "languages": { "items": { "type": "string" }, "type": "array" }, "media": { "type": "string" }, "new_group_name": { "maxLength": 100, "type": "string" }, "picture": { "type": "boolean" }, "promote_url": { "maxLength": 2048, "type": "string" }, "schedule": { "additionalProperties": false, "properties": { "days": { "additionalProperties": false, "properties": { "fri": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "mon": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sat": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sun": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "thu": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "tue": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "wed": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" } }, "type": "object" }, "timezone": { "type": "string" } }, "required": [ "days", "timezone" ], "type": [ "object", "null" ] }, "search_keywords": { "items": { "maxLength": 64, "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" }, "target_type": { "enum": [ "channels", "bots", "search", "users" ], "type": "string" }, "text": { "maxLength": 4096, "type": "string" }, "title": { "maxLength": 255, "type": "string" }, "topics": { "items": { "type": "integer" }, "type": "array" }, "views_per_user": { "maximum": 4, "minimum": 1, "type": "integer" }, "website_name": { "maxLength": 255, "type": "string" } }, "required": [ "title", "text", "promote_url", "cpm", "budget", "target_type" ], "type": "object" }, { "properties": { "account_id": { "type": "integer" }, "campaigns": { "items": { "properties": { "active": { "default": true, "type": "boolean" }, "add_similar_channels": { "type": "boolean" }, "audience_channels": { "items": { "type": "string" }, "type": "array" }, "bots": { "items": { "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" }, "budget": { "minimum": 0, "type": "number" }, "button": { "enum": [ "subscribe", "view", "read", "learn_more", "download", "open", "sign_up", "buy", "order", "play", "try", "leave_request" ], "type": "string" }, "channels": { "items": { "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" }, "countries": { "items": { "type": "string" }, "type": "array" }, "cpm": { "exclusiveMinimum": 0, "type": "number" }, "daily_budget": { "minimum": 0, "type": "number" }, "exclude_topics": { "items": { "type": "integer" }, "type": "array" }, "languages": { "items": { "type": "string" }, "type": "array" }, "media": { "type": "string" }, "picture": { "type": "boolean" }, "promote_url": { "maxLength": 2048, "type": "string" }, "schedule": { "additionalProperties": false, "properties": { "days": { "additionalProperties": false, "properties": { "fri": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "mon": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sat": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sun": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "thu": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "tue": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "wed": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" } }, "type": "object" }, "timezone": { "type": "string" } }, "required": [ "days", "timezone" ], "type": [ "object", "null" ] }, "search_keywords": { "items": { "maxLength": 64, "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" }, "target_type": { "enum": [ "channels", "bots", "search", "users" ], "type": "string" }, "text": { "maxLength": 4096, "type": "string" }, "title": { "maxLength": 255, "type": "string" }, "topics": { "items": { "type": "integer" }, "type": "array" }, "views_per_user": { "maximum": 4, "minimum": 1, "type": "integer" }, "website_name": { "maxLength": 255, "type": "string" } }, "required": [ "title", "text", "promote_url", "cpm", "budget", "target_type" ], "type": "object" }, "maxItems": 100, "minItems": 1, "type": "array" }, "group_id": { "type": "integer" }, "new_group_name": { "maxLength": 100, "type": "string" } }, "required": [ "campaigns" ], "type": "object" } ] } ``` Request outcomes and response fields | API | HTTP | Meaning | | --- | --- | --- | | VALIDATION_ERROR | 400 | Inspect the request fields and correct invalid input before retrying. | | IDEMPOTENCY_KEY_REQUIRED | 400 | Supply the required Idempotency-Key header with the write. | | VIEW_ONLY_ACCESS | 403 | A Viewer can inspect this ad account. A change requires account-level write access. | | QUEUE_FULL | 429 | Five create jobs already occupy this account’s queue. Wait for capacity. | [Reading API errors](/docs/api/errors/) ## POST `/api/v1/media` Upload creative media and receive a token tied to the selected account. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | | `Idempotency-Key` | header | `string` | — | cURL ``` curl -X POST 'https://orbitoads.pro/api/v1/media?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -F file=@./club-cover.png ``` HTTP 200 ``` { "success": true, "data": { "media": "example-media-718", "account_id": 7401 } } ``` ### Request body schema JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` Example · JSON ``` { "account_id": 7401, "new_group_name": "Language club variants", "campaigns": [ { "title": "November club · draft", "text": "Explore this month’s language club schedule.", "promote_url": "https://school.example/club", "cpm": 1.25, "budget": 0, "active": false, "target_type": "users", "countries": [ "GB" ], "languages": [ "en" ] }, { "title": "Conversation club · second draft", "text": "Explore this month’s language club schedule.", "promote_url": "https://school.example/club?from=variant2", "cpm": 1.25, "budget": 0, "active": false, "target_type": "users", "countries": [ "GB" ], "languages": [ "en" ] } ] } ``` ## Implementation notes ## One campaign or a batch A single request puts title, text, promote_url, cpm, budget and target_type at the root. A batch puts 1–100 inputs into campaigns and shares account_id and group fields at the root. Set budget to zero or at least the account’s min_budget. ## Targeting and assets Use channels, bots, search or users. Channel, bot and search lists accept 1–100 entries, each search phrase up to 64 characters. Audience targeting needs at least one valid filter. JPG, PNG, GIF, WebP and MP4 uploads are limited to 10 MB and tied to the uploading account. ## Accepted work and completion Create, copy and bulk requests return HTTP 202 with a task id. Poll GET /api/v1/tasks/{id}, respecting Retry-After. Check failed and errors even when status is completed. ## Operations and fields POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## Request example GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Audience test settings The campaign creation schema distinguishes four targeting modes. A channel list belongs in channels, bot names in bots and search terms in search_keywords. Country, language and topic filters describe a user audience. Read the account capabilities before building the test. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | POST | /api/v1/campaigns | Idempotency-Key | application/json · CreateSingleRequest \| CreateBatchRequest | 202, 400, 401, 403, 404, 409, 422, 429, 503 | | POST | /api/v1/media | account_id | multipart/form-data · file, account_id | 200, 400, 401, 403, 413 | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/tasks/{id} | id | — | 200, 400, 401, 404 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Creating campaigns and media | Field | Documented value | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | Source · [Data source](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | Field | Field type | | --- | --- | | title | string | | text | string | | promote_url | string | | cpm | number | | daily_budget | number · 0 … ∞ | | views_per_user | integer · 1 … 4 | | media | string | | picture | boolean | | button | subscribe \| view \| read \| learn_more \| download \| open \| sign_up \| buy \| order \| play \| try \| leave_request | | website_name | string | | schedule | Schedule | | budget | number · 0 … ∞ | | active | boolean · = true | | target_type | channels \| bots \| search \| users | | channels | array · [string] · 1 … 100 | | bots | array · [string] · 1 … 100 | | search_keywords | array · [string] · 1 … 100 | | countries | array · [string] | | languages | array · [string] | | topics | array · [integer] | | exclude_topics | array · [integer] | | audience_channels | array · [string] | | add_similar_channels | boolean | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | Field | Field type | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | Field | Field type | | --- | --- | | title | string | | text | string | | promote_url | string | | cpm | number | | daily_budget | number · 0 … ∞ | | views_per_user | integer · 1 … 4 | | media | string | | picture | boolean | | button | subscribe \| view \| read \| learn_more \| download \| open \| sign_up \| buy \| order \| play \| try \| leave_request | | website_name | string | | schedule | Schedule | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Accessible advertising accounts](/docs/api/accounts/)[Looking up a campaign](/docs/api/campaigns/)[Changing existing campaigns](/docs/api/manage-campaigns/)[Campaign and account statistics](/docs/api/stats/)[Targeting dictionaries and groups](/docs/api/targeting/) Reference revision 2026-10-08 [Previous topic**Looking up a campaign**](/docs/api/campaigns/)[Next topic**Changing existing campaigns**](/docs/api/manage-campaigns/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Errors [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/errors/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Read the HTTP status and the machine-readable error code together. A missing key returns 401. Correct invalid input before retrying a write and honour the retry delay when a rate limit is reached. [Markdown](/docs/api/errors.md) ## Format Every error has the same shape: Example ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | Field | Always | Meaning | | --- | --- | --- | | `error` | yes | A sentence a person can read. Show it; don’t parse it — wording can improve. | | `code` | yes on all v1 errors | Stable, machine-readable. Branch on this. | | `param` | on input errors | The field that was wrong, as a path: `cpm`, `campaigns[2].channels[0]`, `account_id`. | | `request_id` | on most errors | Same 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 | Status | Meaning | Retry? | | --- | --- | --- | | 200 | Done | — | | 202 | Accepted, running in the background — poll the [task](/docs/api/tasks/) | — | | 400 | The request is wrong (field, value, missing `account_id`) — or Telegram refused the change | No — fix the request | | 401 | No key, bad key, or the key reaches no cabinet | No | | 403 | The key or plan isn’t allowed to do this | No | | 404 | Not found among the cabinets this key reaches | No | | 409 | Conflict with the current state (cabinet locked, Telegram session expired, same request in progress) | Sometimes — see the code | | 413 | File too large | No | | 422 | `Idempotency-Key` reused for a different request | No — use a new key | | 429 | Rate limit or queue full | Yes, after `Retry-After` seconds | | 500 | Our bug — already logged | Read the state first, then retry with backoff | | 503 | Temporarily unavailable | Yes, after `Retry-After` | ## Codes ### Authentication and access | Code | HTTP | What to do | | --- | --- | --- | | `API_KEY_MISSING` | 401 | Send `X-API-Key`. | | `API_KEY_INVALID` | 401 | The key is wrong, revoked or expired. Create a new one. | | `NO_ACCOUNTS` | 401 | The key reaches no active cabinet right now (cabinet deactivated, access removed). | | `FORBIDDEN` | 403 | This key type isn’t allowed for its owner. | | `READ_ONLY_KEY` | 403 | Turn on **Manage campaigns** for the key in the panel. | | `WRITE_NOT_ALLOWED` | 403 | This key type (issued by Orbito Ads for partners) never writes. | | `VIEW_ONLY_ACCESS` | 403 | Your access to this cabinet is Viewer. Ask the agency owner for Manager. | | `FEATURE_NOT_AVAILABLE` | 403 | The plan doesn’t include this action (the response names the `feature`). | | `SUBSCRIPTION_REQUIRED` | 403 | The cabinet’s owner has no active subscription. | | `ACCOUNT_INACTIVE` | 403 | The cabinet is deactivated. | ### Finding things | Code | HTTP | What to do | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | The key reaches several cabinets (or this `ad_id` exists in several) — pass `account_id`. | | `ACCOUNT_NOT_FOUND` | 404 | That `account_id` isn’t reachable with this key. Check `GET /v1/account/info`. | | `CAMPAIGN_NOT_FOUND` | 404 | No such campaign in the key’s cabinets (or it is deleted). | | `TASK_NOT_FOUND` | 404 | No such task for this key’s owner. | | `NOT_FOUND` | 404 | No stats for this campaign and period. | | `UNKNOWN_AD_IDS` | 400 | Some `ad_ids` in a bulk call aren’t campaigns of that cabinet; `missing` lists them. | ### Input | Code | HTTP | What to do | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` names the field; `error` says what’s wrong. Unknown fields are rejected too — check spelling. | | `UNSUPPORTED_MEDIA` | 400 | Upload JPG, PNG, GIF, WEBP or MP4 in the `file` field. | | `FILE_TOO_LARGE` | 413 | Upload a smaller file (10 MB at most). | ### Telegram and cabinet state | Code | HTTP | What to do | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram refused the change; `error` carries its reason. With a low bid you also get `param: "cpm"`, `min_cpm` and `currency`. | | `BUDGET_UNCHANGED` | 400 | Telegram accepted the top-up but the campaign’s budget didn’t move. Check the cabinet balance (`GET /v1/account/info`). | | `INSUFFICIENT_AD_BALANCE` | 400 | You asked to withdraw more than the campaign has. Withdraw less, or use `withdraw_all`. | | `CABINET_AUTH_EXPIRED` | 409 | The cabinet’s Telegram session expired. The owner reconnects it in the panel; then retry. | | `CABINET_LOCKED` | 409 | The cabinet is under automatic management; manual changes are blocked. | ### Limits and retries | Code | HTTP | What to do | | --- | --- | --- | | `RATE_LIMITED` | 429 | Wait `Retry-After` seconds. See [Rate limits](/docs/api/rate-limits/). | | `QUEUE_FULL` | 429 | The cabinet already has 5 operations queued. Wait for a task to finish, then retry (same `Idempotency-Key` is fine). | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | Add an `Idempotency-Key` header. | | `IDEMPOTENCY_KEY_INVALID` | 400 | Use 8–255 characters; a UUID is ideal. | | `IDEMPOTENCY_KEY_REUSED` | 422 | That key was used for a different request — new operation, new key. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | The first request with this key is still running. Retry in a few seconds. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | Nothing was done. Retry with the same key. | | `INGEST_DISABLED` | 403 | Turn on **Receive postbacks** for the key ([Conversions](/docs/api/conversions/)). | | `INTERNAL_ERROR` | 500 | Our side. Check the state with a GET before retrying a write; contact [@orbitoads](https://t.me/orbitoads) 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. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. Example · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | Code | HTTP | | --- | --- | | `API_KEY_MISSING` | 401 | | `API_KEY_INVALID` | 401 | | `NO_ACCOUNTS` | 401 | | `FORBIDDEN` | 403 | | `READ_ONLY_KEY` | 403 | | `WRITE_NOT_ALLOWED` | 403 | | `VIEW_ONLY_ACCESS` | 403 | | `FEATURE_NOT_AVAILABLE` | 403 | | `SUBSCRIPTION_REQUIRED` | 403 | | `ACCOUNT_INACTIVE` | 403 | | `ACCOUNT_ID_REQUIRED` | 400 | | `ACCOUNT_NOT_FOUND` | 404 | | `CAMPAIGN_NOT_FOUND` | 404 | | `TASK_NOT_FOUND` | 404 | | `NOT_FOUND` | 404 | | `UNKNOWN_AD_IDS` | 400 | | `VALIDATION_ERROR` | 400 | | `UNSUPPORTED_MEDIA` | 400 | | `FILE_TOO_LARGE` | 413 | | `PLATFORM_REJECTED` | 400 | | `BUDGET_UNCHANGED` | 400 | | `INSUFFICIENT_AD_BALANCE` | 400 | | `CABINET_AUTH_EXPIRED` | 409 | | `CABINET_LOCKED` | 409 | | `RATE_LIMITED` | 429 | | `QUEUE_FULL` | 429 | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | | `IDEMPOTENCY_KEY_INVALID` | 400 | | `IDEMPOTENCY_KEY_REUSED` | 422 | | `IDEMPOTENCY_IN_PROGRESS` | 409 | | `IDEMPOTENCY_UNAVAILABLE` | 503 | | `INGEST_DISABLED` | 403 | | `INTERNAL_ERROR` | 500 | ## Implementation notes ## Read the error envelope A failure contains success=false and error. Use code for programmatic handling and request_id for support. param can identify an invalid field, missing can list unknown ad ids, and min_cpm and currency can accompany a rejected bid. ## Choose a retry by status Fix input for 400, credentials for 401 and access rights for 403. Verify the account and ad ids on 404. Handle 409 by its code. Respect Retry-After on quota and transient failures. A 422 idempotency conflict requires a new identifier for a genuinely new operation. ## Operations and fields error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## Request example GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/campaigns/{ad_id} | ad_id, account_id | — | 200, 400, 401, 404, 429 | | POST | /api/v1/media | account_id | multipart/form-data · file, account_id | 200, 400, 401, 403, 413 | | POST | /api/v1/campaigns | Idempotency-Key | application/json · CreateSingleRequest \| CreateBatchRequest | 202, 400, 401, 403, 404, 409, 422, 429, 503 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Reading API errors | Field | Documented value | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | Source · [Data source](https://adsly.pro/docs/api/errors/) ## Error | Field | Field type | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Request and event limits](/docs/api/rate-limits/)[Retrying a single operation](/docs/api/idempotency/)[Tracking a queued operation](/docs/api/tasks/)[Stepping through campaign pages](/docs/api/pagination/) Reference revision 2026-10-08 [Previous topic**Using the API reference with an assistant**](/docs/api/ai-assistants/)[Next topic**Request and event limits**](/docs/api/rate-limits/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Idempotency [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/idempotency/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Assign a new Idempotency-Key to each create, copy, bulk request or budget change. Keep the same key and body on retries. A conflicting operation is rejected if it reuses the identifier. [Markdown](/docs/api/idempotency.md) Networks fail in the worst place: after your request reached us, before the answer reached you. Retrying a top-up blindly could move money twice; retrying a create could launch the same campaign twice. An `Idempotency-Key` makes the retry safe. ## Where it is required | Endpoint | Header | | --- | --- | | `POST /v1/campaigns` | required | | `POST /v1/campaigns/{ad_id}/copy` | required | | `POST /v1/campaigns/bulk` | required | | `POST /v1/campaigns/{ad_id}/budget` | required | | Other writes (`PATCH`, pause/resume, `DELETE`, media) | optional — they are safe to repeat on their own | Without the header these return `400 IDEMPOTENCY_KEY_REQUIRED`. ## How to use it Generate a new random value — a UUID — **for each operation** , and send the **same** value every time you retry that operation. Example ``` KEY=$(uuidgen) curl -X POST https://orbitoads.pro/api/v1/campaigns/90412/budget \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: $KEY" \ -d '{"account_id":53,"action":"add","amount":5}' # timed out? run exactly the same command again, with the same $KEY ``` Example ``` import uuid, requests def add_budget(ad_id, account_id, amount): key = str(uuid.uuid4()) # one per operation for attempt in range(3): try: return requests.post( f"https://orbitoads.pro/api/v1/campaigns/{ad_id}/budget", headers={"X-API-Key": API_KEY, "Idempotency-Key": key}, json={"account_id": account_id, "action": "add", "amount": amount}, timeout=30, ) except requests.Timeout: continue # same key → never added twice ``` ## What happens on a repeat | Situation | Response | | --- | --- | | First request with this key | Runs normally. | | Same key, same request, first one finished | The **stored** response, unchanged, with the header `Idempotent-Replayed: true`. Nothing runs again. | | Same key, same request, first one still running | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After`. Retry shortly. | | Same key, different body or endpoint | `422 IDEMPOTENCY_KEY_REUSED`. A new operation needs a new key. | | First request ended in a 4xx (bad input, plan, queue full…) | The key is released: fix the request and send it with the **same** key. | | First request ended in a 5xx | The 5xx is stored and replayed — the change may have reached Telegram, and the key exists to stop it running twice. Check the campaign with `GET`, then use a new key if you still want to act. | “Same request” means the same method, path and JSON body (key order doesn’t matter). ## Details - Keys are scoped to your API key — two integrations can’t collide. - Keys are kept for 24 hours. After that the same value starts a new operation. - Any string of 8–255 characters works; a UUID is the right default. - If we can’t record the key, the operation doesn’t run and you get `503 IDEMPOTENCY_UNAVAILABLE` — retry with the same key. The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## Implementation notes ## One identifier per operation Create, copy, bulk and budget operations require Idempotency-Key. Use a new random value of 8–255 characters for each operation and reuse it for its retries. Keys last 24 hours per API key and bind method, path and JSON content. ## Concurrent and changed retries Completed calls replay with Idempotent-Replayed: true. A pending duplicate returns 409 and Retry-After. Reusing a key for a different request returns 422. A 4xx validation failure releases the key. After a stored 5xx read the actual object before issuing a fresh operation. ## Operations and fields Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## Request example GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | POST | /api/v1/campaigns | Idempotency-Key | application/json · CreateSingleRequest \| CreateBatchRequest | 202, 400, 401, 403, 404, 409, 422, 429, 503 | | POST | /api/v1/campaigns/{ad_id}/copy | ad_id, account_id, Idempotency-Key | application/json · CopyRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/campaigns/bulk | Idempotency-Key | application/json · BulkRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/campaigns/{ad_id}/budget | ad_id, account_id, Idempotency-Key | application/json · BudgetRequest | 200, 400, 401, 403, 404, 409, 422, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Retrying a single operation | Field | Documented value | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | Source · [Data source](https://adsly.pro/docs/api/idempotency/) ## Related reading [Reading API errors](/docs/api/errors/)[Request and event limits](/docs/api/rate-limits/)[Tracking a queued operation](/docs/api/tasks/)[Stepping through campaign pages](/docs/api/pagination/) Reference revision 2026-10-08 [Previous topic**Request and event limits**](/docs/api/rate-limits/)[Next topic**Tracking a queued operation**](/docs/api/tasks/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Manage campaigns [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/manage-campaigns/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Management actions cover text, links, bids, daily limits, scheduling, budgets and delivery state. A bulk request handles up to 1,000 campaigns. Inspect the resulting task for partial failures. [Markdown](/docs/api/manage-campaigns.md) All calls here need a key with **Manage campaigns** and Manager (or owner) access to the cabinet. They act on one campaign, `(account_id, ad_id)`: pass `account_id` in the body or query when the key reaches several cabinets. Every change appears in the campaign’s history in the panel marked **🔌 API** . | Call | What it does | Answers | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | change text, link, bid, cap, schedule, on/off | right away | | `POST /v1/campaigns/{ad_id}/pause` | switch off | right away | | `POST /v1/campaigns/{ad_id}/resume` | switch on | right away | | `POST /v1/campaigns/{ad_id}/budget` | add or withdraw budget | right away | | `DELETE /v1/campaigns/{ad_id}` | delete | right away | | `POST /v1/campaigns/{ad_id}/copy` | 1–100 copies | 202 + [task](/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | one action on up to 1,000 campaigns | 202 + task | Direct answers return the updated [campaign object](/docs/api/campaigns/#doc-note-the-campaign-object) in `data`. ## Edit `PATCH /v1/campaigns/{ad_id}` — send only what changes. Example ``` curl -s -X PATCH https://orbitoads.pro/api/v1/campaigns/90412 \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -d '{ "account_id": 53, "cpm": 1.8, "text": "Daily market notes in 3 minutes." }' ``` | Field | Meaning | | --- | --- | | `title`, `text`, `promote_url` | Creative and link. | | `cpm` | New bid, greater than 0. | | `daily_budget` | Daily cap. | | `views_per_user` | 1–4. | | `active` | `true` / `false` — same as resume / pause. | | `schedule` | Days and hours to show the ad; `null` removes it — see [Schedule](/docs/api/manage-campaigns/#doc-note-schedule). | | `media`, `picture`, `button`, `website_name` | As in [create](/docs/api/create-campaigns/#doc-note-fields). | **What goes to Telegram’s review.** Changing `cpm`, `active` or `schedule` doesn’t — they are applied at once and the campaign keeps running. Any other field (`title`, `text`, `promote_url`, `media`, `picture`, `button`, `website_name`, `views_per_user`, `daily_budget`) is saved through Telegram’s full ad form, and Telegram reviews the ad again: it shows `In Review` until approved. Send bid, on/off and schedule changes on their own, not together with those fields. Targeting (`channels`, `countries`, …) can’t change on an existing ad — Telegram doesn’t allow it. Create a new campaign with the new targeting, or [copy](/docs/api/manage-campaigns/#doc-note-copy) and adjust. `meta` in the response: | Field | Meaning | | --- | --- | | `status_warning` | The fields saved, but Telegram didn’t apply the on/off switch (for example, no budget). | | `status_intent_only` | Your on/off choice is stored and applies when Telegram can (in review, no budget). | | `status_already_set` | The campaign was already in the state you asked for. | A bid below Telegram’s minimum for this targeting returns `400 PLATFORM_REJECTED` with `param: "cpm"`, `min_cpm` and `currency`. ## Pause and resume Example ``` curl -s -X POST "https://orbitoads.pro/api/v1/campaigns/90412/pause?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" curl -s -X POST "https://orbitoads.pro/api/v1/campaigns/90412/resume?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `meta.intent_only: true` means Telegram can’t act on it yet — the campaign is in review, declined, or out of budget — and your choice is stored: it runs as soon as it can. When the status really changes, your [status webhook](/docs/api/webhooks/) fires. ## Schedule Show a campaign only on chosen weekdays and hours — for example weekdays 9:00–18:00, or evenings only. Outside those hours Telegram doesn’t show the ad. Setting, changing or removing a schedule doesn’t switch the campaign on or off — `status` and `active` stay as they are. It works on every cabinet type. Example ``` curl -s -X PATCH https://orbitoads.pro/api/v1/campaigns/90412 \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -d '{ "account_id": 53, "schedule": { "days": { "mon": [9,10,11,12,13,14,15,16,17], "tue": [9,10,11,12,13,14,15,16,17], "wed": [9,10,11,12,13,14,15,16,17], "thu": [9,10,11,12,13,14,15,16,17], "fri": [9,10,11,12,13,14,15,16,17] }, "timezone": "+03:00" } }' ``` | Field | Meaning | | --- | --- | | `days` | `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun` — each holds the hours (0–23) the ad runs that day. `9` means 09:00–09:59, so `[9, …, 17]` is 9:00–18:00. A day you leave out, or send as `[]`, doesn’t run. At least one hour in total. | | `timezone` | Whose clock the hours follow. `"viewer"` — each viewer’s own local time; only for audience targeting (`target_type: "users"`). Otherwise a UTC offset: `"+03:00"`, `"-05:00"`, `"+05:30"`. The offsets Telegram offers: whole hours from `-12:00` to `+14:00`, plus `-09:30`, `-03:30`, `-02:30`, `+03:30`, `+04:30`, `+05:30`, `+05:45`, `+06:30`, `+08:45`, `+09:30`, `+10:30`, `+12:45`, `+13:45`. `"UTC+3"` and `"+3"` are accepted too. | `"schedule": null` removes the schedule — the ad runs around the clock again. **A campaign with no budget can’t take a schedule.** Telegram accepts a schedule only on a campaign that can run, so on a `Stopped` campaign with nothing left you get `400 PLATFORM_REJECTED` with `param: "schedule"` and nothing is changed — add budget first, then set the schedule. A paused (`On Hold`) campaign takes it fine. The campaign object returns the schedule in the same shape, always with all seven days and the offset written as `"+03:00"` — so you can read it, change a day and send it back. `GET /v1/campaigns/{ad_id}` gives the current schedule even if it was changed directly in Telegram — see [Freshness](/docs/api/campaigns/#doc-heading-freshness). Hours outside 0–23, an unknown day, an empty schedule, `"viewer"` on a channel/bot/search ad or an offset Telegram doesn’t offer → `400 VALIDATION_ERROR` with the exact field in `param` (for example `schedule.days.mon`). [Copies](/docs/api/manage-campaigns/#doc-note-copy) and recreated campaigns keep the schedule of the campaign they come from. To put one schedule on many campaigns at once, use the bulk action `set_schedule`. ## Budget `POST /v1/campaigns/{ad_id}/budget` moves money between the cabinet balance and the campaign. Requires an `Idempotency-Key`. Example ``` curl -s -X POST https://orbitoads.pro/api/v1/campaigns/90412/budget \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "account_id": 53, "action": "add", "amount": 10 }' ``` | `action` | `amount` | Effect | | --- | --- | --- | | `add` | required | Cabinet balance → campaign. | | `withdraw` | required | Campaign → cabinet balance. More than the campaign has → `400 INSUFFICIENT_AD_BALANCE`. | | `withdraw_all` | — | Everything left on the campaign → cabinet balance. | `meta.moved` is what actually moved; `meta.partial` is `true` when less than asked could be withdrawn. Money never leaves the cabinet through the API. ## Copy `POST /v1/campaigns/{ad_id}/copy` creates copies with the same targeting; anything you send overrides the original. Requires an `Idempotency-Key`. Returns a task whose `ad_ids` are the copies. Example ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | Field | Meaning | | --- | --- | | `copies` | 1–100, default 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | Overrides for every copy. `budget`: `0` or at least the cabinet’s `min_budget`. | | `schedule` | Copies keep the original’s [schedule](/docs/api/manage-campaigns/#doc-note-schedule); send one to replace it, or `null` for none. | | `group_id` / `new_group_name` | Put the copies in a group. | ## Delete Example ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` A deleted campaign that had views stays in your stats with `status: "Deleted"`; one that never ran is removed. Deleting again returns `404 CAMPAIGN_NOT_FOUND`. ## Bulk `POST /v1/campaigns/bulk` applies one action to up to 1,000 campaigns of one cabinet. Requires an `Idempotency-Key`. Returns a task. Example ``` curl -s -X POST https://orbitoads.pro/api/v1/campaigns/bulk \ -H "X-API-Key: $ORBITO_API_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "account_id": 53, "action": "set_cpm", "cpm": 1.2, "ad_ids": [90412, 90413, 90414] }' ``` | `action` | Extra field | Effect | | --- | --- | --- | | `pause` | — | switch off | | `resume` | — | switch on | | `add_budget` | `amount` | add to each campaign | | `withdraw_budget` | `amount` | withdraw from each campaign | | `withdraw_all_budget` | — | withdraw everything from each campaign | | `set_cpm` | `cpm` | set the same bid on each | | `set_schedule` | `schedule` | set the same [schedule](/docs/api/manage-campaigns/#doc-note-schedule) on each; `"schedule": null` removes it | | `delete` | — | delete each | Every `ad_id` must be a live campaign of that cabinet; otherwise nothing is queued and you get `400 UNKNOWN_AD_IDS` with the offenders in `missing`. Duplicates are ignored. The task’s `errors` lists campaigns Telegram refused — with `set_schedule`, also campaigns with no budget and campaigns where `"timezone": "viewer"` can’t apply because they don’t target an audience. ## Recipe: pause campaigns whose cost per action is too high Example ``` import os, uuid, requests API = "https://orbitoads.pro/api/v1" H = {"X-API-Key": os.environ["ORBITO_API_KEY"]} ACCOUNT, MAX_CPA = 53, 4.0 stats = requests.get(f"{API}/stats", params={"period": "1d"}, headers=H, timeout=60).json()["data"] # cost per action = spend / actions, computed here so the rule means exactly that expensive = [int(ad_id) for ad_id, s in stats.get(str(ACCOUNT), {}).items() if s["actions"] > 0 and s["spent"] / s["actions"] > MAX_CPA] if expensive: r = requests.post(f"{API}/campaigns/bulk", headers={**H, "Idempotency-Key": str(uuid.uuid4())}, json={"account_id": ACCOUNT, "action": "pause", "ad_ids": expensive}, timeout=60) print(r.status_code, r.json()["data"]["id"]) ``` ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## PATCH `/api/v1/campaigns/{ad_id}` Change selected campaign settings while preserving omitted fields. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | | `Idempotency-Key` | header | `string` | — | cURL ``` curl -X PATCH 'https://orbitoads.pro/api/v1/campaigns/38017?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -H 'Content-Type: application/json' \ --data '{ "cpm": 1.4 }' ``` HTTP 200 ``` { "success": true, "data": { "account_id": 7401, "ad_id": 38017, "title": "Conversation club · November", "text": "See this month’s language club schedule.", "status": "Active", "active": true, "promote_url": "https://school.example/club", "tme_path": null, "target_type": "users", "targets": [], "cpm": "1.40", "budget": "36.00", "spent": "4.00", "daily_budget": "8.00", "views": 3200, "opens": 0, "clicks": 32, "actions": 4, "ctr": "1.00", "cvr": "12.50", "cpc": "0.125", "cpa": "1.00", "views_per_user": 2, "schedule": null, "has_media": false, "media_type": null, "button": "learn_more", "website_name": "Example language school", "group_id": 516, "auto_cpm_enabled": false, "date": "1793620800", "synced_at": "2026-11-03T12:00:00Z", "status_changed_at": "2026-11-03T12:00:00Z" } } ``` ### Request body schema JSON Schema ``` { "minProperties": 1, "properties": { "account_id": { "type": "integer" }, "active": { "type": "boolean" }, "button": { "enum": [ "subscribe", "view", "read", "learn_more", "download", "open", "sign_up", "buy", "order", "play", "try", "leave_request" ], "type": "string" }, "cpm": { "exclusiveMinimum": 0, "type": "number" }, "daily_budget": { "minimum": 0, "type": "number" }, "media": { "type": "string" }, "picture": { "type": "boolean" }, "promote_url": { "maxLength": 2048, "type": "string" }, "schedule": { "additionalProperties": false, "properties": { "days": { "additionalProperties": false, "properties": { "fri": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "mon": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sat": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sun": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "thu": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "tue": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "wed": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" } }, "type": "object" }, "timezone": { "type": "string" } }, "required": [ "days", "timezone" ], "type": [ "object", "null" ] }, "text": { "maxLength": 4096, "type": "string" }, "title": { "maxLength": 255, "type": "string" }, "views_per_user": { "maximum": 4, "minimum": 1, "type": "integer" }, "website_name": { "maxLength": 255, "type": "string" } }, "type": "object" } ``` Request outcomes and response fields | API | Meaning | | --- | --- | | status_warning | The edit was saved, but delivery could not switch on or off, for example because the account lacks budget. | | status_intent_only | The requested state is recorded and can apply once review or the budget allows it. | | status_already_set | The campaign already had the requested state. | [Tracking a queued operation](/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` Request that a campaign stop delivering. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | | `Idempotency-Key` | header | `string` | — | cURL ``` curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/pause?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "account_id": 7401, "ad_id": 38017, "title": "Conversation club · November", "text": "See this month’s language club schedule.", "status": "On Hold", "active": false, "promote_url": "https://school.example/club", "tme_path": null, "target_type": "users", "targets": [], "cpm": "1.25", "budget": "36.00", "spent": "4.00", "daily_budget": "8.00", "views": 3200, "opens": 0, "clicks": 32, "actions": 4, "ctr": "1.00", "cvr": "12.50", "cpc": "0.125", "cpa": "1.00", "views_per_user": 2, "schedule": null, "has_media": false, "media_type": null, "button": "learn_more", "website_name": "Example language school", "group_id": 516, "auto_cpm_enabled": false, "date": "1793620800", "synced_at": "2026-11-03T12:00:00Z", "status_changed_at": "2026-11-03T12:00:00Z" }, "meta": { "intent_only": false } } ``` ## POST `/api/v1/campaigns/{ad_id}/resume` Request that a campaign resume when delivery is possible. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | | `Idempotency-Key` | header | `string` | — | cURL ``` curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/resume?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "account_id": 7401, "ad_id": 38017, "title": "Conversation club · November", "text": "See this month’s language club schedule.", "status": "Active", "active": true, "promote_url": "https://school.example/club", "tme_path": null, "target_type": "users", "targets": [], "cpm": "1.25", "budget": "36.00", "spent": "4.00", "daily_budget": "8.00", "views": 3200, "opens": 0, "clicks": 32, "actions": 4, "ctr": "1.00", "cvr": "12.50", "cpc": "0.125", "cpa": "1.00", "views_per_user": 2, "schedule": null, "has_media": false, "media_type": null, "button": "learn_more", "website_name": "Example language school", "group_id": 516, "auto_cpm_enabled": false, "date": "1793620800", "synced_at": "2026-11-03T12:00:00Z", "status_changed_at": "2026-11-03T12:00:00Z" }, "meta": { "intent_only": false } } ``` ## POST `/api/v1/campaigns/{ad_id}/budget` Move budget between an account balance and one campaign. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Yes | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/budget?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474810' \ -H 'Content-Type: application/json' \ --data '{ "action": "add", "amount": 5 }' ``` HTTP 200 ``` { "success": true, "data": { "account_id": 7401, "ad_id": 38017, "title": "Conversation club · November", "text": "See this month’s language club schedule.", "status": "Active", "active": true, "promote_url": "https://school.example/club", "tme_path": null, "target_type": "users", "targets": [], "cpm": "1.25", "budget": "41.00", "spent": "4.00", "daily_budget": "8.00", "views": 3200, "opens": 0, "clicks": 32, "actions": 4, "ctr": "1.00", "cvr": "12.50", "cpc": "0.125", "cpa": "1.00", "views_per_user": 2, "schedule": null, "has_media": false, "media_type": null, "button": "learn_more", "website_name": "Example language school", "group_id": 516, "auto_cpm_enabled": false, "date": "1793620800", "synced_at": "2026-11-03T12:00:00Z", "status_changed_at": "2026-11-03T12:00:00Z" }, "meta": { "action": "add", "moved": 5, "partial": false } } ``` ### Request body schema JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "action": { "enum": [ "add", "withdraw", "withdraw_all" ], "type": "string" }, "amount": { "exclusiveMinimum": 0, "type": "number" } }, "required": [ "action" ], "type": "object" } ``` ## POST `/api/v1/campaigns/{ad_id}/copy` Queue up to 100 copies with inherited targeting and optional overrides. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Yes | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X POST 'https://orbitoads.pro/api/v1/campaigns/38017/copy?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474811' \ -H 'Content-Type: application/json' \ --data '{ "copies": 2, "budget": 0, "title": "Club · second draft", "group_id": 516 }' ``` HTTP 202 ``` { "success": true, "data": { "id": 96203, "type": "copy", "status": "pending", "account_id": 7401, "total": 2, "ad_ids": [] } } ``` ### Request body schema JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "budget": { "minimum": 0, "type": "number" }, "copies": { "default": 1, "maximum": 100, "minimum": 1, "type": "integer" }, "cpm": { "exclusiveMinimum": 0, "type": "number" }, "group_id": { "type": "integer" }, "media": { "type": "string" }, "new_group_name": { "type": "string" }, "picture": { "type": "boolean" }, "promote_url": { "type": "string" }, "schedule": { "additionalProperties": false, "properties": { "days": { "additionalProperties": false, "properties": { "fri": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "mon": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sat": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sun": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "thu": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "tue": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "wed": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" } }, "type": "object" }, "timezone": { "type": "string" } }, "required": [ "days", "timezone" ], "type": [ "object", "null" ] }, "text": { "type": "string" }, "title": { "type": "string" }, "views_per_user": { "maximum": 4, "minimum": 1, "type": "integer" } }, "type": "object" } ``` ## POST `/api/v1/campaigns/bulk` Queue one operation across up to 1,000 campaigns in the same account. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Yes | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X POST https://orbitoads.pro/api/v1/campaigns/bulk \ -H 'X-API-Key: YOUR_ORBITO_KEY' \ -H 'Idempotency-Key: 2033d50c-b32b-44aa-8e40-3e236c474812' \ -H 'Content-Type: application/json' \ --data '{ "account_id": 7401, "action": "set_cpm", "cpm": 1.4, "ad_ids": [ 38017, 38018 ] }' ``` HTTP 202 ``` { "success": true, "data": { "id": 96203, "type": "cpm", "status": "pending", "account_id": 7401, "total": 2, "ad_ids": [] } } ``` ### Request body schema JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "action": { "enum": [ "pause", "resume", "add_budget", "withdraw_budget", "withdraw_all_budget", "set_cpm", "set_schedule", "delete" ], "type": "string" }, "ad_ids": { "items": { "type": "integer" }, "maxItems": 1000, "minItems": 1, "type": "array" }, "amount": { "exclusiveMinimum": 0, "type": "number" }, "cpm": { "exclusiveMinimum": 0, "type": "number" }, "schedule": { "additionalProperties": false, "properties": { "days": { "additionalProperties": false, "properties": { "fri": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "mon": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sat": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "sun": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "thu": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "tue": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" }, "wed": { "items": { "maximum": 23, "minimum": 0, "type": "integer" }, "maxItems": 24, "type": "array" } }, "type": "object" }, "timezone": { "type": "string" } }, "required": [ "days", "timezone" ], "type": [ "object", "null" ] } }, "required": [ "action", "ad_ids" ], "type": "object" } ``` ## DELETE `/api/v1/campaigns/{ad_id}` Remove a campaign and retain historical delivery statistics where available. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Yes | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | | `Idempotency-Key` | header | `string` | — | cURL ``` curl -X DELETE 'https://orbitoads.pro/api/v1/campaigns/38017?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "ad_id": 38017, "account_id": 7401, "deleted": true } } ``` ## Implementation notes ## Mutable fields and time slots Change cpm, active or schedule without a new creative review. Editing creative fields can trigger review. An existing campaign keeps its targeting. Schedules use weekdays, hours 0–23 and a supported UTC offset. viewer is available for users targeting. Set schedule to null to remove it. ## Budget movements inside the cabinet add moves funds into the campaign. withdraw returns the requested amount and withdraw_all returns its remaining budget to the cabinet. Check meta.moved and meta.partial. Account funding, invoicing and refunds use the billing workflow. ## Accepted work and completion Create, copy and bulk requests return HTTP 202 with a task id. Poll GET /api/v1/tasks/{id}, respecting Retry-After. Check failed and errors even when status is completed. ## Operations and fields PATCH /api/v1/campaigns/{ad_id} POST /api/v1/campaigns/{ad_id}/pause POST /api/v1/campaigns/{ad_id}/resume POST /api/v1/campaigns/{ad_id}/budget POST /api/v1/campaigns/{ad_id}/copy POST /api/v1/campaigns/bulk - PATCH /api/v1/campaigns/{ad_id} - POST /api/v1/campaigns/{ad_id}/pause - POST /api/v1/campaigns/{ad_id}/resume - POST /api/v1/campaigns/{ad_id}/budget - POST /api/v1/campaigns/{ad_id}/copy - POST /api/v1/campaigns/bulk ## Request example GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | PATCH | /api/v1/campaigns/{ad_id} | ad_id, account_id | application/json · UpdateRequest | 200, 400, 401, 403, 404, 409, 429 | | POST | /api/v1/campaigns/{ad_id}/pause | ad_id, account_id | — | 200, 400, 401, 403, 404, 409, 429 | | POST | /api/v1/campaigns/{ad_id}/resume | ad_id, account_id | — | 200, 400, 401, 403, 404, 409, 429 | | POST | /api/v1/campaigns/{ad_id}/budget | ad_id, account_id, Idempotency-Key | application/json · BudgetRequest | 200, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/campaigns/{ad_id}/copy | ad_id, account_id, Idempotency-Key | application/json · CopyRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/campaigns/bulk | Idempotency-Key | application/json · BulkRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | DELETE | /api/v1/campaigns/{ad_id} | ad_id, account_id | — | 200, 400, 401, 403, 404, 409, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Changing existing campaigns | Field | Documented value | | --- | --- | | BulkRequest.ad_ids[] | 1 … 1,000 | | CopyRequest.copies | 1 … 100 | | BudgetRequest.action | add \| withdraw \| withdraw_all | | BulkRequest.action | pause \| resume \| add_budget \| withdraw_budget \| withdraw_all_budget \| set_cpm \| set_schedule \| delete | | Schedule | days, timezone | Source · [Data source](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | Field | Field type | | --- | --- | | title | string | | text | string | | promote_url | string | | cpm | number | | daily_budget | number · 0 … ∞ | | views_per_user | integer · 1 … 4 | | media | string | | picture | boolean | | button | subscribe \| view \| read \| learn_more \| download \| open \| sign_up \| buy \| order \| play \| try \| leave_request | | website_name | string | | schedule | Schedule | | account_id | integer | | active | boolean | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | Field | Field type | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | Field | Field type | | --- | --- | | account_id | integer | | copies | integer · 1 … 100 · = 1 | | title | string | | text | string | | promote_url | string | | cpm | number | | budget | number · 0 … ∞ | | media | string | | picture | boolean | | views_per_user | integer · 1 … 4 | | schedule | Schedule | | group_id | integer | | new_group_name | string | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | Field | Field type | | --- | --- | | account_id | integer | | action | pause \| resume \| add_budget \| withdraw_budget \| withdraw_all_budget \| set_cpm \| set_schedule \| delete | | ad_ids | array · [integer] · 1 … 1000 | | amount | number | | cpm | number | | schedule | Schedule | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | Field | Field type | | --- | --- | | days | object | | timezone | string | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Accessible advertising accounts](/docs/api/accounts/)[Looking up a campaign](/docs/api/campaigns/)[Creating campaigns and media](/docs/api/create-campaigns/)[Campaign and account statistics](/docs/api/stats/)[Targeting dictionaries and groups](/docs/api/targeting/) Reference revision 2026-10-08 [Previous topic**Creating campaigns and media**](/docs/api/create-campaigns/)[Next topic**Campaign and account statistics**](/docs/api/stats/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Pagination [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/pagination/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Start cursor pagination with an empty cursor. Follow meta.next_cursor until it becomes null and keep the filters fixed. The published maximum is 500 campaign records per page. [Markdown](/docs/api/pagination.md) `GET /v1/campaigns` is the only list that pages. It has two modes. ## Cursor mode (use this) Add `cursor=` (empty on the first call) and follow `meta.next_cursor` until it is `null`: Example ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` Example ``` def all_campaigns(): cursor = "" while True: r = requests.get("https://orbitoads.pro/api/v1/campaigns", params={"limit": 500, "cursor": cursor}, headers={"X-API-Key": API_KEY}, timeout=60).json() yield from r["data"] cursor = r["meta"]["next_cursor"] if not cursor: break ``` - Treat the cursor as opaque. It is only valid with the same filters. - Order is fixed (cabinet, then newest `ad_id` first), so pages stay stable while campaigns are added. - No upper limit — this is how you read a cabinet with 100,000 campaigns. - Filters `bot_username`, `promote_domain` and `type` always use cursor mode. - Cursor mode leaves out a few heavy fields (targeting summary, media, last action). Use [`GET /v1/campaigns/{ad_id}`](/docs/api/campaigns/#doc-note-get-one-campaign) for the full record of one campaign. ## Offset mode (small cabinets) Without `cursor`, the endpoint pages with `limit` and `offset` and can sort (`sortBy`, `sortOrder`). It reads at most **500 campaigns per cabinet** : past that `meta.truncated` is `true` and `meta.next_step` tells you to switch to cursor mode. Example ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## Page size `limit` is 1–500, default 100. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. Example · cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/campaigns?account_id=7401&status=Active%2COn+Hold&limit=25&cursor=' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` Example · cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/campaigns?account_id=7401&status=Active%2COn+Hold&limit=25&cursor=OPAQUE_NEXT_CURSOR' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` ## Implementation notes ## Paging a large list Start GET /api/v1/campaigns with cursor= and the required filters. For the next page reuse all filters and pass meta.next_cursor unchanged. Stop when it is null. limit ranges from 1 to 500 and defaults to 100. ## Ordering and offset limits Cursor mode orders by cabinet and descending ad_id. bot_username, promote_domain and type also select this mode. Offset mode permits sortBy and sortOrder but reads at most 500 campaigns per cabinet. meta.truncated signals that a cursor is needed. ## Operations and fields GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## Request example GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/campaigns | account_id, status, title, bot_username, promote_domain, promote_domain_mode, type, limit, cursor, offset, sortBy, sortOrder | — | 200, 400, 401, 404, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Stepping through campaign pages | Field | Documented value | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | Source · [Data source](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | Field | Field type | | --- | --- | | ad_id | integer | | account_id | integer | | title | string | | text | string \| null | | status | CampaignStatus | | tme_path | string \| null | | promote_url | string \| null | | views | integer | | opens | integer | | clicks | integer | | actions | integer | | spent | Money | | budget | Money | | cpm | Money | | cpc | Money | | cpa | Money | | ctr | string \| null | | cvr | string \| null | | date | string \| null | | group_id | integer \| null | | status_changed_at | string \| null · date-time | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Reading API errors](/docs/api/errors/)[Request and event limits](/docs/api/rate-limits/)[Retrying a single operation](/docs/api/idempotency/)[Tracking a queued operation](/docs/api/tasks/) Reference revision 2026-10-08 [Previous topic**Tracking a queued operation**](/docs/api/tasks/)[Next topic**Accessible advertising accounts**](/docs/api/accounts/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Rate limits [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/rate-limits/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) A key has separate quotas for reads, writes and incoming events. The published limits are 60 reads and 30 writes per minute, plus 20 incoming conversion events per second. Queue limits also apply per account. [Markdown](/docs/api/rate-limits.md) Each key has three independent budgets. Using one never eats into another — a dashboard polling stats can’t starve its own pause button, and a burst of conversions from your tracker can’t block either. | Budget | Applies to | Limit | | --- | --- | --- | | **Read** | every `GET` | 60 requests per minute | | **Write** | every `POST`, `PATCH`, `DELETE` except conversions | 30 requests per minute | | **Conversions in** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 20 events per second, bursts up to 1,000 | The limits are token buckets, not fixed windows: the budget refills continuously, and a short burst up to the full minute’s allowance is fine. A typical sync — campaigns, stats, totals — is 3–4 read requests. Need more for a specific integration? Ask [@orbitoads](https://t.me/orbitoads) — limits can be raised per key. ## Headers Every response says where you stand: Example ``` X-RateLimit-Limit: 60 the budget for this kind of request, per minute X-RateLimit-Remaining: 47 requests you can make right now X-RateLimit-Reset: 1791364800 unix time when the budget is full again Retry-After: 23 only on 429 — seconds to wait ``` ## Doing more with fewer calls - **Bulk instead of loops.** Pausing 300 campaigns is one `POST /v1/campaigns/bulk`, not 300 pause calls. See [Manage campaigns](/docs/api/manage-campaigns/#doc-note-bulk). - **Create in batches.** `POST /v1/campaigns` takes up to 100 campaigns. - **Webhooks instead of polling.** Status changes arrive the moment they happen; hourly stats arrive by themselves. See [Webhooks](/docs/api/webhooks/). - **Batch conversions.** `POST /v1/postback` accepts up to 1,000 events per request (each event still counts against the events budget — batching saves round trips, not quota). ## Other limits | What | Limit | | --- | --- | | Queued or running operations per cabinet | 5 creates + 5 other operations (copy, bulk). The 6th returns `429 QUEUE_FULL`. | | Campaigns per create request | 100 | | Copies per copy request | 100 | | Campaigns per bulk request | 1,000 | | Uploaded file | 10 MB | | Page size for `GET /v1/campaigns` | 500 | ## Backing off On `429`, wait `Retry-After` seconds and retry. For anything automated, add jitter so many workers don’t retry at the same instant: Example ``` async function call(url, init, attempt = 0) { const res = await fetch(url, init); if (res.status !== 429 || attempt >= 5) return res; const wait = Number(res.headers.get('Retry-After') || 1) * 1000; await new Promise(r => setTimeout(r, wait + Math.random() * 500)); return call(url, init, attempt + 1); } ``` The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## Implementation notes ## Independent budgets per key Each key has 60 reads/minute and 30 writes/minute. Conversion ingestion has 20 events/second with bursts up to 1,000. A batched conversion consumes one event unit per item. Check X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. ## Queues and backoff An account can queue or run five create jobs and five other jobs, with one of each executing at once. After 429 wait the number of seconds in Retry-After before retrying. ## Operations and fields 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## Request example GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Report dimensions The API accepts up to 100 campaigns in a create request, up to 100 copies in one copy request, and up to 1,000 existing campaigns in one bulk operation. A 202 response identifies the queued task. Inspect failed and errors on completion before changing the next group. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/campaigns | account_id, status, title, bot_username, promote_domain, promote_domain_mode, type, limit, cursor, offset, sortBy, sortOrder | — | 200, 400, 401, 404, 429 | | POST | /api/v1/campaigns | Idempotency-Key | application/json · CreateSingleRequest \| CreateBatchRequest | 202, 400, 401, 403, 404, 409, 422, 429, 503 | | POST | /api/v1/campaigns/{ad_id}/copy | ad_id, account_id, Idempotency-Key | application/json · CopyRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/campaigns/bulk | Idempotency-Key | application/json · BulkRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/postback | — | application/json · ConversionEvent \| object \| array · [ConversionEvent] · 0 … 1000 | 202, 400, 401, 403, 404, 409, 429 | | GET | /api/v1/ingest/{token} | token, ref, event, txid, amount, currency | — | 200, 400, 401, 403, 404, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Request and event limits | Field | Documented value | | --- | --- | | GET | 60 / min | | POST, PATCH, DELETE | 30 / min | | postback, ingest | 20 events/s | | campaigns | 100 | | copy | 100 | | bulk | 1,000 | | GET campaigns | 500 / page | | POST media | 10 MB | | QUEUE_FULL | 5 create + 5 copy/bulk | Source · [Data source](https://adsly.pro/docs/api/rate-limits/) ## Related reading [Reading API errors](/docs/api/errors/)[Retrying a single operation](/docs/api/idempotency/)[Tracking a queued operation](/docs/api/tasks/)[Stepping through campaign pages](/docs/api/pagination/) Reference revision 2026-10-08 [Previous topic**Reading API errors**](/docs/api/errors/)[Next topic**Retrying a single operation**](/docs/api/idempotency/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Stats [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/stats/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Use campaign statistics for individual rows, totals for account summaries and analytics for rankings by currency. Choose a rolling window or a custom date and hour range. Record the time range with exported figures. [Markdown](/docs/api/stats.md) Three endpoints, from detailed to summary. All return data per cabinet, for every cabinet the key reaches. | Endpoint | Returns | | --- | --- | | `GET /v1/stats` | every campaign’s numbers for the period | | `GET /v1/stats/total` | each cabinet’s totals plus chart points | | `GET /v1/stats/analytics` | totals split by currency, chart, top campaigns | One campaign over a period: [`GET /v1/campaigns/{ad_id}/history`](/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory). ## Periods | `period` | Window | | --- | --- | | `1d` | last 24 hours (default for `/stats` and `/stats/total`) | | `7d` | last 7 days | | `30d` | last 30 days (default for `/stats/analytics`) | | `all` | all time | | `custom` | `startDate` and `endDate` (`YYYY-MM-DD`), optionally `startHour` and `endHour` (0–23) | Any `h` or `d` also works (`6h`, `14d`, up to 365 days). An unrecognised value is read as the last 24 hours — it doesn’t return an error, so check your spelling. All times are UTC. Example ``` # 14:00–15:59 UTC on 8 October curl -s "https://orbitoads.pro/api/v1/stats?period=custom&startDate=2026-10-08&endDate=2026-10-08&startHour=14&endHour=15" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ## GET /v1/stats Per campaign, nested by cabinet: `data[account_id][ad_id]`. Example ``` { "success": true, "data": { "53": { "90412": { "views": 640, "clicks": 7, "actions": 3, "spent": 0.96, "ctr": 1.09, "cpm": 1.5, "cpa": 0.32, "group_id": 7 } } }, "meta": { "period": "7d" } } ``` Keys are strings; values here are **numbers** (unlike the campaign object). `cpa` is spend per action; `ctr` is a percentage. ## GET /v1/stats/total The dashboard endpoint: totals and a chart for each cabinet. Example ``` { "success": true, "data": { "accounts": { "53": { "chart": [ { "label": "2026-10-08 12:00", "views": 52, "clicks": 1, "spent": 0.83, "budget": 4.95, "ctr": 1.92, "cpc": 0.83, "cpm": 16 } ], "totals": { "views": 121, "clicks": 3, "spent": 1.81, "ctr": 2.48, "cpc": 0.6, "cpm": 14.95, "campaigns": 4, "active": 2, "stopped": 2, "declined": 0, "totalBudget": 5.21, "totalSpentAllTime": 2.79 }, "cabinetType": "euro" } }, "period": "1d", "lastUpdated": "2026-10-08T10:02:54.016Z" }, "meta": { "period": "1d" } } ``` `chart` points are hourly or daily depending on the period. `cabinetType` gives the currency (`euro` → EUR, `ton` → TON, `stars` → Stars). ## GET /v1/stats/analytics Like `/stats/total`, plus spend split by currency and the top campaigns. Example ``` { "success": true, "data": { "accounts": { "53": { "chart": [ { "label": "2026-10-08 12:00", "views": 52, "clicks": 1, "spent": 0.83, "spent_ton": 0, "spent_euro": 0.83, "spent_stars": 0, "ctr": 1.92, "cpc": 0.83, "cpm": 16 } ], "totals": { "views": 121, "clicks": 3, "spent": 1.81, "spentByCurrency": { "ton": 0, "euro": 1.81, "stars": 0 }, "ctr": 2.48, "cpc": 0.6, "cpm": 14.95 }, "topCampaigns": [ { "ad_id": 90412, "account_id": 53, "title": "API test", "status": "Active", "views": 58, "clicks": 1, "actions": 1, "spent": 0.85, "ctr": 1.72, "cpc": 0.85, "cpm": 14.66, "cpa": 0.85 } ] } } }, "meta": { "period": "30d" } } ``` ## Notes - Stats follow Telegram’s own counters, synced to Orbito Ads regularly; the newest hour fills in as syncs arrive. - Never add up `spent` across cabinets with different currencies. - For conversions you track yourself (leads, deposits, sales) see [Conversions](/docs/api/conversions/) — Telegram’s `actions` are joins and bot starts, not your conversions. - Prefer the [hourly digest webhook](/docs/api/webhooks/#doc-heading-hourly_digest) over polling stats every few minutes. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## GET `/api/v1/stats` Read period metrics keyed by account and campaign. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/stats?period=7d' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "7401": { "38017": { "views": 3200, "clicks": 32, "actions": 4, "spent": 4, "ctr": 1, "cpm": 1.25, "cpa": 1, "group_id": 516 } } }, "meta": { "period": "7d" } } ``` ## GET `/api/v1/stats/total` Read account totals and chart points for the selected interval. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/stats/total?period=7d' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "accounts": { "7401": { "chart": [ { "label": "2026-11-03", "views": 3200, "clicks": 32, "spent": 4, "budget": 36, "ctr": 1, "cpc": 0.125, "cpm": 1.25 } ], "totals": { "views": 3200, "clicks": 32, "spent": 4, "ctr": 1, "cpc": 0.125, "cpm": 1.25, "campaigns": 1, "active": 1, "stopped": 0, "declined": 0, "totalBudget": 36, "totalSpentAllTime": 4 }, "cabinetType": "euro" } }, "period": "7d", "lastUpdated": "2026-11-03T12:00:00Z" }, "meta": { "period": "7d" } } ``` ## GET `/api/v1/stats/analytics` Retrieve currency splits, chart data and ranked campaigns. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/stats/analytics?period=custom&startDate=2026-11-03&endDate=2026-11-03&startHour=8&endHour=17' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "accounts": { "7401": { "chart": [ { "label": "2026-11-03", "views": 3200, "clicks": 32, "spent": 4, "ctr": 1, "cpc": 0.125, "cpm": 1.25, "spent_ton": 0, "spent_euro": 4, "spent_stars": 0 } ], "totals": { "views": 3200, "clicks": 32, "spent": 4, "spentByCurrency": { "euro": 4, "ton": 0, "stars": 0 }, "ctr": 1, "cpc": 0.125, "cpm": 1.25 }, "topCampaigns": [ { "views": 3200, "clicks": 32, "actions": 4, "spent": 4, "ctr": 1, "cpm": 1.25, "cpa": 1, "account_id": 7401, "ad_id": 38017, "title": "Conversation club · November", "status": "Active", "cpc": 0.125 } ] } } }, "meta": { "period": "custom" } } ``` ## Implementation notes ## Balances and currencies Read currency, balance_updated_at and min_budget for every account. Amounts and rates in campaign objects can be decimal strings or null. Reporting aggregates use numbers. Keep EUR, TON and Stars totals separate. ## Periods and UTC hours period accepts 1d, 7d, 30d, all, custom and supported Nh or Nd windows up to 365 days. For custom use startDate and endDate, optionally startHour/endHour at 0–23 UTC. Stats and totals default to 1d, analytics to 30d. ## Interpreting actions actions records platform events such as a channel join or bot start. Use the conversions resource for your tracker’s leads, purchases and revenue. /stats/analytics includes a chart, totals and topCampaigns per account. ## Operations and fields GET /api/v1/stats GET /api/v1/stats/total GET /api/v1/stats/analytics 1d 7d 30d all custom - GET /api/v1/stats - GET /api/v1/stats/total - GET /api/v1/stats/analytics - 1d - 7d - 30d - all - custom ## Request example GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/stats | period, startDate, endDate, startHour, endHour | — | 200, 401, 429 | | GET | /api/v1/stats/total | period, startDate, endDate, startHour, endHour | — | 200, 401, 429 | | GET | /api/v1/stats/analytics | period, startDate, endDate, startHour, endHour | — | 200, 401, 429 | | GET | /api/v1/campaigns/{ad_id}/history | ad_id, account_id, period, startDate, endDate, startHour, endHour | — | 200, 400, 401, 404 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Campaign and account statistics | Field | Documented value | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | Source · [Data source](https://adsly.pro/docs/api/stats/) ## StatsNumbers | Field | Field type | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Accessible advertising accounts](/docs/api/accounts/)[Looking up a campaign](/docs/api/campaigns/)[Creating campaigns and media](/docs/api/create-campaigns/)[Changing existing campaigns](/docs/api/manage-campaigns/)[Targeting dictionaries and groups](/docs/api/targeting/) Reference revision 2026-10-26 [Previous topic**Changing existing campaigns**](/docs/api/manage-campaigns/)[Next topic**Targeting dictionaries and groups**](/docs/api/targeting/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Targeting codes and groups [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/targeting/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Fetch country, language and topic codes before building a campaign payload. Retrieve groups to identify saved campaign folders. Cache the dictionaries and refresh them when accepted options change. [Markdown](/docs/api/targeting.md) ## GET /v1/targeting The codes [`POST /v1/campaigns`](/docs/api/create-campaigns/) accepts. The lists are the ones the Orbito Ads create form uses, so a code from here is never refused as unknown. Example ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": { "countries": [ { "code": "DE", "name": "Germany" }, { "code": "US", "name": "United States" } ], "languages": [ { "code": "en", "name": "English" }, { "code": "zh-hans", "name": "Chinese (Simplified)" } ], "topics": [ { "id": 7, "name": "Cryptocurrencies" }, { "id": 26, "name": "Investments" } ], "buttons": [ "subscribe", "view", "read", "learn_more", "download", "open", "sign_up", "buy", "order", "play", "try", "leave_request" ] } } ``` | List | Used in | Notes | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 two-letter codes, plus Telegram’s own `FT` (anonymous numbers). | | `languages[].code` | `languages` | Telegram’s language keys — e.g. `pt-br` and `pt-pt`, not `pt`. | | `topics[].id` | `topics`, `exclude_topics` | Numbers; the ids are not consecutive. | | `buttons` | `button` | Only in cabinets whose `features.ad_button` is `true`. | The lists change rarely — fetch them once and cache them for a day. ## Groups Groups are folders for campaigns in the panel. Put new campaigns or copies into one with `group_id` (existing) or `new_group_name` (created, or reused if the name exists). ### GET /v1/groups Example ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Example ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` Without `account_id` you get the groups of every cabinet the key reaches. A group belongs to one cabinet — `group_id` from another cabinet is refused. ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## GET `/api/v1/targeting` Read supported country, language, topic and CTA values. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET https://orbitoads.pro/api/v1/targeting \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "countries": [ { "code": "GB", "name": "United Kingdom" } ], "languages": [ { "code": "en", "name": "English" } ], "topics": [ { "id": 8, "name": "Example topic" } ], "buttons": [ "learn_more", "open" ] } } ``` ## GET `/api/v1/groups` List campaign groups, optionally restricted to one account. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET 'https://orbitoads.pro/api/v1/groups?account_id=7401' \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": [ { "id": 516, "account_id": 7401, "name": "Language club", "color": "#6651EF" } ] } ``` ## Implementation notes ## Read accepted values before building the form Use country and language codes, numeric topic ids and CTA values exactly as returned. Some language codes distinguish regions, such as pt-br and pt-pt. The target account must support custom buttons to use button. ## Group ownership Each group belongs to one account. Pass a group_id from that account or a new_group_name when creating or copying. An existing group with the same name can be reused. ## Operations and fields GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## Request example GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Audience test settings The campaign creation schema distinguishes four targeting modes. A channel list belongs in channels, bot names in bots and search terms in search_keywords. Country, language and topic filters describe a user audience. Read the account capabilities before building the test. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Targeting dictionaries and groups | Field | Documented value | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | Source · [Data source](https://adsly.pro/docs/api/targeting/) ## Targeting | Field | Field type | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Group | Field | Field type | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Accessible advertising accounts](/docs/api/accounts/)[Looking up a campaign](/docs/api/campaigns/)[Creating campaigns and media](/docs/api/create-campaigns/)[Changing existing campaigns](/docs/api/manage-campaigns/)[Campaign and account statistics](/docs/api/stats/) Reference revision 2026-10-08 [Previous topic**Campaign and account statistics**](/docs/api/stats/)[Next topic**Receiving campaign events**](/docs/api/webhooks/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Tasks (async operations) [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/tasks/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) Create, copy and batch changes can return HTTP 202 with a task ID. Poll the task to see progress, totals and individual failures. Keep the final list of affected campaign IDs for reconciliation. [Markdown](/docs/api/tasks.md) Some operations talk to Telegram once per campaign, so they can take longer than an HTTP request should wait. These return `202 Accepted` with a **task** instead of the final result: - `POST /v1/campaigns` — create - `POST /v1/campaigns/{ad_id}/copy` — copy - `POST /v1/campaigns/bulk` — pause, resume, budget, CPM or delete many Single-campaign changes (`PATCH`, pause, resume, budget, delete) answer directly — no task. ## The 202 response Example ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` Example ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "progress": 0, "total": 3, "succeeded": null, "failed": null, "ad_ids": [], "errors": [], "paused_reason": null, "error": null, "created_at": "2026-10-08T10:15:02.411Z", "started_at": null, "completed_at": null } } ``` ## GET /v1/tasks/{id} Example ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` Same shape as above. Poll it until `status` is final; while a task is `pending` or `running` the response carries `Retry-After: 2` — wait that long between polls. Any key of the same owner can read the task. | Field | Meaning | | --- | --- | | `type` | `create`, `copy`, `status` (bulk pause/resume), `budget`, `cpm`, `delete` | | `status` | see below | | `progress` / `total` | campaigns processed so far / in total | | `succeeded` / `failed` | counts, once known | | `ad_ids` | campaigns the task created (create, copy) or changed (bulk) | | `errors[]` | up to 50 failures: `{ ad_id, index, error }` — `index` is the position in your `campaigns` array for creates | | `paused_reason` | why a task stopped to wait, e.g. the cabinet ran out of balance | | `error` | why the whole task failed | ### Statuses | Status | Meaning | Final? | | --- | --- | --- | | `pending` | queued — the cabinet runs one create and one other operation at a time | no | | `running` | in progress | no | | `paused` | stopped to wait — usually the cabinet balance ran out mid-way. Top up the cabinet; resume it from the panel | no | | `completed` | finished. Check `failed` and `errors` — a completed task can contain individual failures | yes | | `failed` | the task as a whole failed — see `error` | yes | | `cancelled` | cancelled from the panel | yes | ## Things to know about creates - New campaign ids appear in `ad_ids` when the task completes (they are found by syncing the cabinet after the last campaign is created). - If the **first** campaign of a batch fails, the task stops there rather than repeat the same mistake 100 times. Fix the input and send again. - If Telegram can’t resolve any of a campaign’s channels or bots, that campaign fails with `No targets found: …` listing them. - Telegram reviews every new ad. A created campaign usually starts `In Review`; a [webhook](/docs/api/webhooks/) tells you when that changes. ## A polling loop Example ``` async function waitForTask(id) { for (;;) { const res = await fetch(`https://orbitoads.pro/api/v1/tasks/${id}`, { headers: { 'X-API-Key': process.env.ORBITO_API_KEY }, }); const { data } = await res.json(); if (['completed', 'failed', 'cancelled'].includes(data.status)) return data; if (data.status === 'paused') throw new Error(`Task paused: ${data.paused_reason}`); await new Promise(r => setTimeout(r, Number(res.headers.get('Retry-After') || 2) * 1000)); } } ``` Example ``` import time, requests def wait_for_task(task_id): while True: r = requests.get(f"https://orbitoads.pro/api/v1/tasks/{task_id}", headers={"X-API-Key": API_KEY}, timeout=30) task = r.json()["data"] if task["status"] in ("completed", "failed", "cancelled"): return task if task["status"] == "paused": raise RuntimeError(f"Task paused: {task['paused_reason']}") time.sleep(int(r.headers.get("Retry-After", 2))) ``` ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. ## GET `/api/v1/tasks/{id}` Read job progress, resulting ad identifiers and individual failures. | Parameter | Location | Format | Required | | --- | --- | --- | --- | | `id` | path | `integer` | Yes | | `X-API-Key` | header | `string` | Yes | cURL ``` curl -X GET https://orbitoads.pro/api/v1/tasks/96203 \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` HTTP 200 ``` { "success": true, "data": { "id": 96203, "type": "create", "status": "completed", "account_id": 7401, "total": 1, "ad_ids": [ 38019 ], "progress": 1, "succeeded": 1, "failed": 0, "errors": [], "paused_reason": null, "error": null, "created_at": "2026-11-03T12:01:00Z", "started_at": "2026-11-03T12:01:02Z", "completed_at": "2026-11-03T12:01:04Z" } } ``` ## Implementation notes ## Accepted work and completion Create, copy and bulk requests return HTTP 202 with a task id. Poll GET /api/v1/tasks/{id}, respecting Retry-After. Check failed and errors even when status is completed. ## Job outcomes pending, running and paused are nonterminal states. completed, failed and cancelled end the job. Use progress, total, ad_ids and up to 50 item errors. A paused_reason can identify a budget shortage that the operator resolves in the panel. ## Operations and fields GET /api/v1/tasks/{id} pending running paused completed failed cancelled succeeded failed errors - GET /api/v1/tasks/{id} - pending - running - paused - completed - failed - cancelled - succeeded - failed - errors ## Request example GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Report dimensions The API accepts up to 100 campaigns in a create request, up to 100 copies in one copy request, and up to 1,000 existing campaigns in one bulk operation. A 202 response identifies the queued task. Inspect failed and errors on completion before changing the next group. ## Protocol reference | Method | Route | Parameters | Request content | Response codes | | --- | --- | --- | --- | --- | | GET | /api/v1/tasks/{id} | id | — | 200, 400, 401, 404 | | POST | /api/v1/campaigns | Idempotency-Key | application/json · CreateSingleRequest \| CreateBatchRequest | 202, 400, 401, 403, 404, 409, 422, 429, 503 | | POST | /api/v1/campaigns/bulk | Idempotency-Key | application/json · BulkRequest | 202, 400, 401, 403, 404, 409, 422, 429 | | POST | /api/v1/campaigns/{ad_id}/copy | ad_id, account_id, Idempotency-Key | application/json · CopyRequest | 202, 400, 401, 403, 404, 409, 422, 429 | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Schema fields and limits · Tracking a queued operation | Field | Documented value | | --- | --- | | HTTP 202 | Location, Retry-After | | status | pending, running, paused, completed, failed, cancelled | | progress / total | integer / integer | | succeeded / failed | integer \| null | | errors[] | ≤ 50 | | ad_ids[] | integer | Source · [Data source](https://adsly.pro/docs/api/tasks/) ## Task | Field | Field type | | --- | --- | | id | integer | | type | create \| copy \| status \| budget \| cpm \| delete \| edit \| recreate | | status | pending \| running \| paused \| completed \| failed \| cancelled | | account_id | integer | | progress | integer | | total | integer | | succeeded | integer \| null | | failed | integer \| null | | ad_ids | array · [integer] | | errors | array · [object] · 0 … 50 | | paused_reason | string \| null | | error | string \| null | | created_at | string · date-time | | started_at | string \| null · date-time | | completed_at | string \| null · date-time | Source · [Data source](https://adsly.pro/docs/api/openapi.yaml) ## Related reading [Reading API errors](/docs/api/errors/)[Request and event limits](/docs/api/rate-limits/)[Retrying a single operation](/docs/api/idempotency/)[Stepping through campaign pages](/docs/api/pagination/) Reference revision 2026-10-08 [Previous topic**Retrying a single operation**](/docs/api/idempotency/)[Next topic**Stepping through campaign pages**](/docs/api/pagination/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Webhooks [Orbito Ads · English · HTML](https://orbitoads.pro/docs/api/webhooks/) Sources checked · 2026-11-27 ### Browse documentation [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [All documentation](/docs/) Get started - [API quickstart](/docs/api/) - [Keys and cabinet permissions](/docs/api/authentication/) - [Using the API reference with an assistant](/docs/api/ai-assistants/) Concepts - [Reading API errors](/docs/api/errors/) - [Request and event limits](/docs/api/rate-limits/) - [Retrying a single operation](/docs/api/idempotency/) - [Tracking a queued operation](/docs/api/tasks/) - [Stepping through campaign pages](/docs/api/pagination/) API reference - [Accessible advertising accounts](/docs/api/accounts/) - [Looking up a campaign](/docs/api/campaigns/) - [Creating campaigns and media](/docs/api/create-campaigns/) - [Changing existing campaigns](/docs/api/manage-campaigns/) - [Campaign and account statistics](/docs/api/stats/) - [Targeting dictionaries and groups](/docs/api/targeting/) Integrations - [Receiving campaign events](/docs/api/webhooks/) - [Sending confirmed conversions](/docs/api/conversions/) - [API versions and changes](/docs/api/changelog/) Machine-readable - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/en/docs/llms.txt) - [llms-full.txt](/en/docs/llms-full.txt) [Orbito Ads](/en/) [Documentation](/docs/) [API](/docs/api/) The reference distinguishes status_change, hourly_digest and a test ping. Receive callbacks on HTTPS, validate the signature against the raw body and deduplicate deliveries before processing. [Markdown](/docs/api/webhooks.md) Instead of polling, let Orbito Ads call you. Set a **Postback URL** on a key (panel → API & Webhooks → the key’s card) and every event for the cabinets that key reaches is POSTed there, signed with the key’s webhook secret. ## Events | Event | When | | --- | --- | | `status_change` | A campaign’s status changed (In Review → Active, Active → Stopped…). Sent after each sync of the cabinet, and immediately when campaigns are switched on or off in the panel or through the API. | | `hourly_digest` | At 5 minutes past each hour, with the numbers of the hour that just closed — one POST per cabinet. Hours with no views, clicks or spend are skipped. | | `ping` | When you press **Test** on the key. | ### status_change Example ``` { "event": "status_change", "delivered_at": "2026-10-08T12:00:05.123Z", "account_id": 53, "changes": [ { "ad_id": 90412, "tme_path": "yourchannel", "old_status": "In Review", "new_status": "Active" }, { "ad_id": 90388, "tme_path": "yourbot?start=promo", "old_status": "Active", "new_status": "Stopped" } ] } ``` ### hourly_digest Example ``` { "event": "hourly_digest", "delivered_at": "2026-10-08T14:05:00.000Z", "period": { "start": "2026-10-08T13:00:00.000Z", "end": "2026-10-08T14:00:00.000Z" }, "account_id": 53, "totals": { "views": 18420, "clicks": 137, "spent": 12.456, "actions": 9 }, "campaigns": [ { "ad_id": 90412, "tme_path": "yourchannel", "title": "Crypto channels — notes", "status": "Active", "views": 9100, "clicks": 73, "spent": 6.221, "actions": 4, "cpm": "0.68", "budget": "100.00" } ] } ``` `campaigns` holds at most the top 200 by spend; when more campaigns moved, a `truncated` block says how many were left out. `totals` always cover all of them. Money is in the cabinet’s currency. ## Headers Example ``` Content-Type: application/json User-Agent: Orbito-Webhook/1.0 (+https://Orbito.pro) X-Orbito-Event: status_change | hourly_digest | ping X-Orbito-Delivery: X-Orbito-Timestamp: X-Orbito-Signature: sha256= ``` ## Verify the signature The signature is HMAC-SHA256 of `.` with the key’s webhook secret (shown when the key is created or the secret rotated). Verify it over the **raw** body — parsing and re-serialising the JSON changes the bytes. Reject requests older than 5 minutes. ### Node.js (Express) Example ``` const express = require('express'); const crypto = require('crypto'); const app = express(); const SECRET = process.env.ORBITO_WEBHOOK_SECRET; app.post('/Orbito-webhook', express.raw({ type: 'application/json', limit: '2mb' }), (req, res) => { const ts = req.get('X-Orbito-Timestamp'); const sig = req.get('X-Orbito-Signature') || ''; if (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(400); const expected = 'sha256=' + crypto.createHmac('sha256', SECRET) .update(`${ts}.${req.body.toString('utf8')}`) .digest('hex'); const ok = sig.length === expected.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected)); if (!ok) return res.sendStatus(401); const event = JSON.parse(req.body.toString('utf8')); res.sendStatus(200); // answer fast, then do the work queue.push(event); // e.g. hand off to a job queue }); ``` ### Python (Flask) Example ``` import hmac, hashlib, time, os from flask import Flask, request, abort app = Flask(__name__) SECRET = os.environ["ORBITO_WEBHOOK_SECRET"].encode() @app.post("/Orbito-webhook") def orbito_webhook(): ts = request.headers.get("X-Orbito-Timestamp", "") sig = request.headers.get("X-Orbito-Signature", "") if not ts or abs(time.time() - int(ts)) > 300: abort(400) body = request.get_data() # raw bytes expected = "sha256=" + hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest() if not hmac.compare_digest(sig, expected): abort(401) event = request.get_json() # … queue the work … return "", 200 ``` ## Delivery - Your endpoint must be public **HTTPS** . `http://`, localhost and private addresses are refused. - Answer with any `2xx` within **10 seconds** . Do slow work after answering. - On a network error or a `5xx` we retry **once** , 750 ms later, with the same `X-Orbito-Delivery`. A `4xx` is not retried. - Redirects are not followed. - The key’s card in the panel shows the last delivery’s time, status and error. ## Which cabinets A key receives events for the cabinets it reaches ([Keys and access](/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches)). An agency team member’s key receives them for the cabinets shared with them, and stops the moment that access ends. ## Testing Press **Test** on the key’s card: you receive a `ping` event signed like the real ones. Example ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## API reference The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows. Example · JSON ``` { "event": "status_change", "delivered_at": "2026-11-03T12:00:00Z", "account_id": 7401, "changes": [ { "ad_id": 38017, "tme_path": "example_club", "old_status": "In Review", "new_status": "Active" } ] } ``` ## Implementation notes ## Events and callback setup Register a public HTTPS callback in the provider’s key settings. status_change reports ad state transitions. hourly_digest covers each active cabinet hour at minute 05. ping tests delivery. Configuration is outside the 22 HTTP operations in this reference. ## Signature and redelivery Verify HMAC-SHA256 over the timestamp, a literal dot and the original request bytes with the webhook secret. Reject timestamps older than five minutes. Respond 2xx within ten seconds. Network failures and 5xx get one retry after 750 ms with the same delivery id. ## Operations and fields status_change hourly_digest ping - status_change - hourly_digest - ping ## HTTP X-Orbito-Event: hourly_digest X-Orbito-Delivery: {uuid} X-Orbito-Timestamp: {unix_seconds} X-Orbito-Signature: sha256={hex} ## Schema fields and limits This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes. ## Time window · hourly_digest An hourly_digest webhook covers the hour that just ended and is emitted five minutes past the hour for each active account with traffic. Store the period timestamps, account ID and delivery ID. Separate the event time from the time the receiving server obtained it. ## Schema fields and limits · Receiving campaign events | Field | Documented value | | --- | --- | | Content-Type | application/json | | X-Orbito-Event | status_change \| hourly_digest \| ping | | X-Orbito-Delivery | UUID | | X-Orbito-Timestamp | Unix time | | X-Orbito-Signature | sha256= | | hourly_digest | :05 UTC | Source · [Data source](https://adsly.pro/docs/api/webhooks/) ## Related reading [Sending confirmed conversions](/docs/api/conversions/)[API versions and changes](/docs/api/changelog/) Reference revision 2026-10-08 [Previous topic**Targeting dictionaries and groups**](/docs/api/targeting/)[Next topic**Sending confirmed conversions**](/docs/api/conversions/) ## Sources and data - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json)