# 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) --- # Справочник разработчика [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) Документация Справочник охватывает доступ, управление кампаниями, статистику и события. Начните со списка кабинетов, доступных ключу для чтения. [Открыть оглавление документации](/ru/docs/llms.txt) [Ключи API](/api-keys?lang=ru) В этом разделе собрана документация Orbito. Начните с API. С его помощью из своей программы можно читать статистику, создавать кампании, редактировать ставки и объявления, включать и приостанавливать показы и перераспределять бюджет. Для всех ваших кабинетов используются одни методы и ключ API. ## API - Быстрый старт. Получите ключ, отправьте первый запрос и создайте кампанию примерно за пять минут. [**Quickstart** Ключ, первый запрос и ваша первая кампания через API — около пяти минут.](/ru/docs/api/) - Ключи и доступ. Настройте просмотр или управление кампаниями, список кабинетов и полномочия команды. [**Ключи и доступ** Читаемые и управляющие ключи кампании, в которых реклама имеет ключевые достижения, команды агентства.](/ru/docs/api/authentication/) - Создание кампаний. Выберите каналы, ботов, поиск или аудитории. Запрос принимает от одной до ста кампаний. [**Создайте кампании** Канал, бот, поиск и целевая аудитория, один или сто кампаний по вызову.](/ru/docs/api/create-campaigns/) - Управление. Редактируйте, приостанавливайте, возобновляйте, копируйте и удаляйте кампании, перемещайте бюджет по одной или по тысяче кампаний за раз. [**Управление кампаниями** Редактировать, перерывать и перерабатывать, перемещать бюджет, копировать, удалить — одна кампания или тысяча.](/ru/docs/api/manage-campaigns/) - Вебхуки. Получайте подписанные уведомления о статусах и почасовую сводку статистики. [**Webhooks** Подписанные изменения состояния в режиме реального времени и часы статистического потери.](/ru/docs/api/webhooks/) - ИИ-ассистенты. Передайте документацию Claude Code или другому помощнику для разработки интеграции. [**Создайте с помощью АА-ассистента** Дайте эти доки Клоду Коду или другому кодирующему агентству и пусть он напишет эту интеграцию.](/ru/docs/api/ai-assistants/) ## Базовый URL и авторизация Пример ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` Создайте ключ в разделе «API и вебхуки» на тарифе Pro или Agency. По вопросам подключения обращайтесь в поддержку Orbito. [API & Webhooks](/api-keys?lang=ru) [@orbitoads](https://t.me/orbitoads) ## Форматы для программ и ИИ - Спецификация OpenAPI 3.1 описывает все методы, параметры и коды ошибок. [OpenAPI 3.1 Специальный](/docs/api/openapi.yaml) - В `llms.txt` находится указатель, а в `llms-full.txt` — полный текст страниц. [llms.txt](/docs/llms.txt) [llms-full.txt](/docs/llms-full.txt) - У каждой страницы есть версия Markdown. Замените завершающий слеш в адресе на `.md`, например `/docs/api.md`. [/docs/api.md](/docs/api.md) Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## Примечания по интеграции ## Подключение рабочего пространства Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ### Руководства разработчика и доступ к кабинету **Начало работы с API** Начало работы с API — Серверным ключом запросите список кабинетов. Выберите кабинет и прочитайте его кампании. Для первой записи создайте остановленную кампанию с новым ключом идемпотентности и проверьте задачу по её ID. [**Начало работы с API**](/ru/docs/api/) **Ключи и права на кабинеты** Ключи и права на кабинеты — Передавайте ключ с сервера в заголовке X-API-Key. Область доступа включает один, несколько или все разрешённые кабинеты. [**Ключи и права на кабинеты**](/ru/docs/api/authentication/) **Создание кампаний и загрузка медиа** Создание кампаний и загрузка медиа — Один запрос принимает до 100 кампаний одного кабинета. Выберите каналы, ботов, поиск или аудиторию, передайте ключ операции и следите за задачей. [**Создание кампаний и загрузка медиа**](/ru/docs/api/create-campaigns/) **Изменение существующих кампаний** Изменение существующих кампаний — Управление охватывает тексты, ссылки, ставки, дневные лимиты, расписания, бюджеты и статус показов. В пакетном запросе — до 1 000 кампаний. [**Изменение существующих кампаний**](/ru/docs/api/manage-campaigns/) **Получение событий кампаний** Получение событий кампаний — Справочник описывает status_change, hourly_digest и тестовый ping. Принимайте события по HTTPS, проверяйте подпись по исходному телу и обрабатывайте повторные доставки один раз. [**Получение событий кампаний**](/ru/docs/api/webhooks/) **Документация для ИИ-ассистента** Документация для ИИ-ассистента — Поля запросов описаны в OpenAPI, поведение — в Markdown-справочнике. Храните ключи в окружении сервера. Проверьте чтение перед включением изменений кампаний. [**Документация для ИИ-ассистента**](/ru/docs/api/ai-assistants/) [Управлять API-ключами и вебхуками](/api-keys?lang=ru) ## Первый запрос Вызовите GET /api/v1/account/info с X-API-Key. Выберите id из data и передайте его как account_id в следующем запросе. Все идентификаторы и значения в примерах вымышлены. ## Операции и поля /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## Пример запроса GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ### Форматы для загрузки и обработки [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/ru/docs/api.md) ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Документация разработчика | Поле | Значение по документации | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | Источник · [Источник данных](https://adsly.pro/docs/) ## Cabinet | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Начало работы с API](/ru/docs/api/)[Ключи и права на кабинеты](/ru/docs/api/authentication/)[Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/)[Изменение существующих кампаний](/ru/docs/api/manage-campaigns/)[Получение событий кампаний](/ru/docs/api/webhooks/) [Следующая тема**Начало работы с API**](/ru/docs/api/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Начало работы с API [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) API Серверным ключом запросите список кабинетов. Выберите кабинет и прочитайте его кампании. Для первой записи создайте остановленную кампанию с новым ключом идемпотентности и проверьте задачу по её ID. [Markdown](/ru/docs/api.md) Через API Orbito можно управлять кабинетами Telegram Ads из своего приложения. У кабинетов Euro, TON и Stars общие методы, базовый адрес и ключ авторизации. | Вы хотите... | Используйте | | --- | --- | | Загрузите кампании и статистику в панель или BI | [кампании](/ru/docs/api/campaigns/), [Государства](/ru/docs/api/stats/) | | Запуск кампаний с сценария, бота или вашего CRM | [Создайте кампании](/ru/docs/api/create-campaigns/) | | Повышение предложений, пауза проигрателей, вершины победителей автоматически | [Управление кампаниями](/ru/docs/api/manage-campaigns/) | | Знать момент, когда кампания одобряется, отклоняется или выходит из бюджета | [Webhooks](/ru/docs/api/webhooks/) | | Счет вещей и продаж с вашего тракера по каждой кампании | [Конверсии](/ru/docs/api/conversions/) | ## Базовый URL Пример ``` https://orbitoads.pro/api/v1 ``` В каждом запросе передавайте ключ в заголовке `X-API-Key`. Тело запроса и ответ используют JSON. Время приводится в UTC. ## Быстрый старт ### 1. Создайте ключ В панели откройте «API и вебхуки» и нажмите «Новый ключ». Нужен тариф Pro или Agency. Укажите доступные кабинеты. Для создания и изменения кампаний включите «Разрешить управление кампаниями». Скопируйте ключ сразу. После закрытия его значение больше не показывается. Пример ``` export ORBITO_API_KEY="orb_…" ``` ### 2. Получите список кабинетов Пример ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "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` кабинета. В остальных запросах он передаётся как `account_id`. Все денежные показатели выражены в валюте конкретного кабинета. ### 3. Прочитайте список кампаний Пример ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. Создайте выключенную кампанию без расхода бюджета Пример ``` 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"] }' ``` Создание требует обращения к Telegram и выполняется в фоновом режиме. API вернёт `202 Accepted` и идентификатор задачи. Пример ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. Дождитесь завершения задачи Пример ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` При статусе `completed` поле `ad_ids` содержит идентификатор новой кампании. После этого можно добавить бюджет и включить показы. Пример ``` 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 проверяет каждое новое объявление перед показом. Этап проверки виден в [статус](/ru/docs/api/campaigns/#doc-note-statuses)е кампании. При изменении статуса интеграция может получить вебхук. [Webhook](/ru/docs/api/webhooks/) ## Пять правил интеграции 1. Сохраняйте кампанию по паре `(account_id, ad_id)`. В разных кабинетах Telegram использует одинаковые `ad_id`. Если ключ видит несколько кабинетов, явно передавайте `account_id`. 2. Для создания, копирования, пакетных операций и перемещения бюджета нужен `Idempotency-Key`. Выделяйте новый UUID каждой операции и сохраняйте его при повторе. Это защищает от повторного создания кампании или двойного списания. [Индемотивы](/ru/docs/api/idempotency/) 3. Создание, копирование и пакетные операции возвращают задачу. Проверяйте `GET /v1/tasks/{id}` до её завершения. [Задачи](/ru/docs/api/tasks/) 4. Денежные значения возвращаются строками, например `"spent": "3.541000"`. Для расчётов используйте десятичный тип. 5. Для программной обработки используйте стабильное поле `code`. Пользователю показывайте пояснение из `error`. [ошибки](/ru/docs/api/errors/) ## Структура ответа Пример ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## Следующие шаги - «[Ключи и доступ](/ru/docs/api/authentication/)» описывает просмотр, управление кампаниями и права команды агентства. - В разделе об ИИ-ассистентах есть примеры заданий для Claude Code и других инструментов программирования. [Создайте вместе с Клодом и прочими ассистентами](/ru/docs/api/ai-assistants/) - Спецификацию OpenAPI можно импортировать в Postman, Insomnia или генератор клиентского кода. [OpenAPI Спец](/docs/api/openapi.yaml) ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. Пример · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` Пример · 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 } } ] } ``` ## Примечания по интеграции ## Первый запрос Вызовите GET /api/v1/account/info с X-API-Key. Выберите id из data и передайте его как account_id в следующем запросе. Все идентификаторы и значения в примерах вымышлены. ## Идентификаторы кабинета и кампании Храните account_id и ad_id вместе. В разных кабинетах может встретиться один и тот же ad_id. Если ключу доступны несколько кабинетов, передавайте account_id для выбора нужной записи. ## Принято в обработку и завершено Создание, копирование и массовый запрос возвращают HTTP 202 с id задачи. Опросите GET /api/v1/tasks/{id} с учётом Retry-After. Даже при статусе completed проверьте failed и errors. ## Операции и поля 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} ## Пример запроса GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Начало работы с API | Поле | Значение по документации | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | Источник · [Источник данных](https://adsly.pro/docs/api/) ## CampaignStatus | Поле | Тип поля | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Документация разработчика](/ru/docs/)[Ключи и права на кабинеты](/ru/docs/api/authentication/)[Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Дата обновления источника 2026-10-08 [Предыдущая тема**Документация разработчика**](/ru/docs/)[Следующая тема**Ключи и права на кабинеты**](/ru/docs/api/authentication/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Доступные рекламные кабинеты [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/accounts/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Список кабинетов показывает валюту, доступный баланс, уровень доступа и поддерживаемые поля. Храните account_id вместе с идентификатором кампании. [Markdown](/ru/docs/api/accounts.md) Кабинет в Orbito соответствует одному рекламному аккаунту Telegram Ads. Каждая кампания принадлежит одному кабинету. Его идентификатор передаётся в поле `account_id`. ## GET /v1/account/info Метод возвращает кабинеты, которые сейчас доступны этому ключу. Пример ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "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 } } ] } ``` | поле | Значение | | --- | --- | | `id` | `account_id` перейти на другие звонки. | | `cabinet_type` | `euro`, `ton` или `stars`. | | `currency` | `EUR`, `TON` или `STARS` — валюта денежного поля **Каждый** в этом кабинете: баланс, бюджет, расход, CPM . Никогда не добавляйте деньги по кабинетам разных валют. | | `access_level` | Вход в Вашу: `owner`, `manager` (член агентства, который может изменить кампании) или `viewer` (Член комиссии, чтено только в чтении) Писатели нуждаются `owner` или `manager`. | | `balance` | Деньги на кабинете, еще не даны кампаниям (десятиметровая строка). Открыты при синхронизации кабинета — см. `balance_updated_at` . | | `min_budget` | Самый маленький не нулевый `budget` может иметь новую кампанию в этом кабинете. | | `features.ad_button` | Форма рекламы кабинета имеет настроенный кнопку (поле `button` на создание/редактирование). | | `features.crypto_filters` | Форма рекламы кабинета содержит крипто-канальные фильтры. | У специальных партнёрских ключей, для которых показатели пересчитываются, поле `balance` имеет значение `null`. ## Примечания - `GET /v1/account/info` расходует один запрос на чтение. Вызывайте его при запуске приложения и после ошибки записи `ACCOUNT_NOT_FOUND`. - Отключённый кабинет исчезает из списка. То же происходит, если у пользователя отозвали доступ. - Кабинеты подключают в панели Orbito. API управляет кампаниями внутри подключённых кабинетов. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## GET `/api/v1/account/info` Получить доступные ключу кабинеты, валюты, лимиты и роли. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Да | 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 } } ] } ``` ## Примечания по интеграции ## Балансы и валюты Для каждого кабинета проверьте currency, balance_updated_at и min_budget. Денежные суммы и ставки в объектах кампаний могут быть десятичными строками или null. В агрегатах отчётов это числа. Ведите раздельные итоги EUR, TON и Stars. ## Доступность полей features.ad_button показывает поддержку выбора кнопки, features.crypto_filters — фильтров криптоканалов. Доступные действия определяются в том числе is_active и access_level. ## Операции и поля GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## Пример запроса GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Доступные рекламные кабинеты | Поле | Значение по документации | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | Источник · [Источник данных](https://adsly.pro/docs/api/accounts/) ## Cabinet | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Money | Поле | Тип поля | | --- | --- | | Money | string \| null | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Чтение данных кампании](/ru/docs/api/campaigns/)[Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/)[Изменение существующих кампаний](/ru/docs/api/manage-campaigns/)[Статистика кампаний и кабинетов](/ru/docs/api/stats/)[Справочники таргетинга и группы](/ru/docs/api/targeting/) Дата обновления источника 2026-10-08 [Предыдущая тема**Постраничное чтение кампаний**](/ru/docs/api/pagination/)[Следующая тема**Чтение данных кампании**](/ru/docs/api/campaigns/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Документация для ИИ-ассистента [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/ai-assistants/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Поля запросов описаны в OpenAPI, поведение — в Markdown-справочнике. Храните ключи в окружении сервера. Проверьте чтение перед включением изменений кампаний. [Markdown](/ru/docs/api/ai-assistants.md) Этой документацией могут пользоваться разработчики и их ИИ-ассистенты. Каждая страница доступна в Markdown. Весь раздел можно загрузить одним файлом, а контракт API — прочитать в формате OpenAPI. Передайте ассистенту ссылки на подходящие файлы. ## Файлы для ИИ-агентов | Файлы | Что это такое | Когда его использовать | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | Индекс каждой страницы, с односторонними резюмеми ( [формат txt](https://llmstxt.org/) ) | Пусть агент выбирает страницы, которые ему нужны | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | Все страницы в одном файле Markdown (около 80 KB ) | Инструменты, которые загружают большой файл в целом; веб-фетч инструменты могут сократить его коротко, поэтому предпочтите `llms.txt` + страницы там | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 спецификация: конечные точки, параметры, схемы, коды ошибок | Типированные клиенты, Валидация запроса, Постман | | `.md` | Страница как Markdown, e.g . [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | Одна одна тема | На странице документации есть кнопка «Скопировать Markdown». Скопированный текст можно сразу вставить в чат. ## Задание на интеграцию API для Claude Code Откройте проект, который будет обращаться к Orbito, и вставьте этот текст в Claude Code или другой помощник для разработки. В последнем абзаце опишите свою задачу. Пример ``` Подключи API Orbito Ads к этому проекту. До написания кода прочитай https://orbitoads.pro/ru/docs/llms.txt и перечисленные там Markdown-страницы по задаче. Полный справочник доступен по адресу https://orbitoads.pro/ru/docs/llms-full.txt, спецификация OpenAPI — https://orbitoads.pro/docs/api/openapi.yaml. - Используй базовый адрес https://orbitoads.pro/api/v1 и заголовок X-API-Key. Бери ключ из переменной окружения ORBITO_API_KEY. Не записывай его в код или журналы. - Сохраняй кампанию по паре (account_id, ad_id). В разных кабинетах встречаются одинаковые ad_id. - Для каждого POST к /campaigns, /campaigns/bulk, /campaigns/{id}/copy или /campaigns/{id}/budget создавай новый UUID в заголовке Idempotency-Key. При повторе той же операции отправляй исходный UUID. - Создание, копирование и массовые изменения возвращают 202 и задачу. Опрашивай GET /tasks/{id} с интервалом из Retry-After до статуса completed или failed. - Денежные значения приходят десятичными строками. Перед сравнением разбери их с сохранением точности. - После 429 выжди интервал Retry-After. Если при записи пришёл 5xx, проверь кампанию через GET до повторного запроса с новым Idempotency-Key. - Для логики обработки ошибок используй поле code, для сообщения пользователю — error. - Напиши небольшой типизированный клиент и тесты с подменой HTTP-ответов. Нужная функция: <например, каждый час ставить на паузу кампании кабинета 53, у которых CPA за последние 24 часа превышает 4 EUR>. ``` ## Задание для разового запроса в чате Для разового вопроса вставьте следующее задание в ChatGPT, Claude.ai или другой чат с доступом к веб-страницам. Пример ``` Прочитай https://orbitoads.pro/ru/docs/llms.txt и указанные там страницы о кампаниях и статистике. Напиши на Python скрипт для API Orbito Ads, который выведет все кампании со статусом Active в моих кабинетах и расходы каждой за последние 7 дней. Отсортируй их по расходам. Получи ключ из ORBITO_API_KEY. ``` ## Правила проекта для CLAUDE.md Добавьте этот блок в `CLAUDE.md` проекта. Claude Code читает файл в начале сеанса и сможет применять правила при следующих изменениях интеграции. Пример ``` ## Интеграция с API Orbito Ads - Перед изменением вызова проверь https://orbitoads.pro/ru/docs/llms.txt, нужную страницу .md и https://orbitoads.pro/docs/api/openapi.yaml. Имена методов и полей бери из спецификации. - Читай ORBITO_API_KEY из окружения. Не добавляй ключ в коммиты, вывод терминала и логи. - Идентифицируй кампанию по (account_id, ad_id). При каждом POST на создание кампании или перемещение средств передавай Idempotency-Key. У каждой операции свой UUID, общая для всех её повторов. - При создании, копировании и массовых операциях проверяй GET /v1/tasks/{id}. Изменение бюджета, паузу и удаление активных кампаний проводи через один модуль с тестами. Перед запуском разового скрипта на боевых данных запроси подтверждение. ``` ## Права доступа для ИИ-агента - Начните с ключа на чтение. Он даёт доступ к данным без права менять кампании. Подключите ключ с правом управления после проверки кода записи. - Для тестовых кампаний задавайте `"active": false` и `"budget": 0`. Кампания останется выключенной и не потратит деньги. После теста её можно удалить. - На время разработки ограничьте область ключа тестовым кабинетом. - Передавайте помощнику тело ошибки. Стабильный `code`, пояснение `error` и имя поля в `param` позволяют исправлять конкретные запросы. - В истории кампании каждое изменение через API отмечено значком «🔌 API». По этим записям можно проверить действия интеграции. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. Пример · 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' ``` ## Примечания по интеграции ## Ключи и права на кабинеты Храните X-API-Key на сервере. Для отчётов достаточно доступа на чтение. Для изменений нужны право управления кампаниями, роль владельца или менеджера этого кабинета и действующие тарифные права на функцию. ## Что передать разработчику Передайте схему OpenAPI, вымышленный id кабинета, операцию, ожидаемый ответ и тест повтора. Рабочий ключ сервер читает из хранилища секретов. Для отчёта начните со списков кабинетов и кампаний. ## Операции и поля /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 ## Пример запроса GET /docs/api/openapi.yaml ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Документация для ИИ-ассистента | Поле | Значение по документации | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | Источник · [Источник данных](https://adsly.pro/docs/api/ai-assistants/) ## По теме [Документация разработчика](/ru/docs/)[Начало работы с API](/ru/docs/api/)[Ключи и права на кабинеты](/ru/docs/api/authentication/) Дата обновления источника 2026-10-08 [Предыдущая тема**Ключи и права на кабинеты**](/ru/docs/api/authentication/)[Следующая тема**Разбор ошибок API**](/ru/docs/api/errors/) ## Источники и данные - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Ключи и права на кабинеты [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/authentication/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Передавайте ключ с сервера в заголовке X-API-Key. Область доступа включает один, несколько или все разрешённые кабинеты. Для записи нужны ключ управления кампаниями и роль менеджера либо владельца. [Markdown](/ru/docs/api/authentication.md) ## Как передавать ключ Передавайте ключ в HTTP-заголовке каждого запроса. Пример ``` X-API-Key: orb_0f3c… (68 символов: префикс orb_ и 64 шестнадцатеричных символа) ``` API использует сам ключ для авторизации. Обмен токенами и OAuth здесь не требуются. Храните ключ на своём сервере. Код браузера и мобильного приложения не должен содержать ключ. ## Как получить ключ Откройте в панели «API и вебхуки» и нажмите «Новый ключ». Функция доступна на тарифах Pro и Agency. У одного пользователя может быть до пяти активных ключей. Скопируйте значение сразу после создания. Сервис хранит его SHA-256-хеш. Если значение потерялось, отзовите старый ключ и создайте новый. ## Разрешения ключа | разрешение | Как вы получаете | Что это позволяет | | --- | --- | --- | | **Читать** | Каждый ключ | кампании, статистика, конверсии, задания, целевые коды, вебхоки, отправляющие конверсии нам | | **Управление кампаниями** | Нажмите **разрешение на управление кампаниями** , когда вы создаете ключ, или переключите его позже на карте ключа. | все в Читать, плюс создавать, редактировать, перерывать/резумировать, бюджет, копировать, массовые действия, удалять, загружать СМИ | Для дашбордов и отчётов создавайте ключ с доступом на чтение. При попытке записи он получит `403 READ_ONLY_KEY`. Право управления выдавайте приложению, которому доверяете менять кампании. Оба типа ключей позволяют работать только внутри кабинета. Бюджет перемещается между его балансом и кампаниями. Вывести деньги таким ключом нельзя. При каждой записи проверяются активный тариф Pro или Agency и право на конкретную функцию. При отсутствии доступа по тарифу сервер возвращает `403 FEATURE_NOT_AVAILABLE`. ## Какие кабинеты доступны ключу При создании ключа выберите кабинеты, к которым он получит доступ. | Объем | Ключевые достижения | | --- | --- | | Все мои кабинеты (по умолчанию) | каждая кабина, которую вы можете открыть в панели, включая добавленные позже | | несколько | Кабинеты, которые вы забивали | | Один рекламный счет | В этом кабинете только | Область действия ключа ограничена правами пользователя в панели и проверяется при каждом запросе. После отзыва доступа к кабинету ключ сразу теряет его тоже. Актуальный список вернёт `GET /v1/account/info`. Если ключу доступны несколько кабинетов, в операциях с одним кабинетом передавайте `account_id`. Без этого поля сервер вернёт `400 ACCOUNT_ID_REQUIRED`. ## Доступ агентства и команды Права API наследуются из панели отдельно для каждого рекламного кабинета. | Кто вы есть | Кабинет Ваших ключевых достижений | Можно управлять кампаниями | | --- | --- | --- | | Владелец аккаунта (регулярный пользователь) | Ваши собственные кабинеты | Все из них | | Agency Владелец | Ваши личные и агентские кабинеты | Все из них | | Agency члены команды | Кабинеты, которые агентство делится с вами | Кабинеты совместно с **менеджер** доступом; **Вид** кабинеты остаются читать только | - Участники команды создают собственные ключи на своей странице «API и вебхуки». Для них действует тариф агентства. - В разделе «Ключи команды» владелец агентства видит владельцев ключей, право управления кампаниями, число доступных кабинетов и время последнего запроса. Там же он может отозвать любой ключ команды. - Метод `GET /v1/account/info` возвращает `access_level` для каждого кабинета. Допустимы `owner`, `manager` и `viewer`. При попытке записи с ролью `viewer` сервер вернёт `403 VIEW_ONLY_ACCESS`. - Исключение участника, перевод на роль наблюдателя и окончание тарифа агентства сразу меняют права его ключей. Дополнительно отзывать их вручную не требуется. Менеджер управляет кампаниями кабинета. Наблюдателю доступны просмотр кампаний и статистика. Владелец может отдельно разрешить участнику добавлять кабинеты, приглашать коллег и делиться собственными кабинетами в пределах своих прав. ## Отзыв и замена ключей - Нажмите «Отозвать» в карточке ключа. Он сразу перестанет работать. - Чтобы заменить ключ без перерыва, создайте новый, установите его в приложении и затем отзовите старый. На время перехода оба ключа могут быть активны. - Секрет для проверки подписи вебхуков хранится отдельно от ключа API. Его можно заменить независимо. [Webhooks](/ru/docs/api/webhooks/) ## Как хранить ключи - Создавайте отдельный ключ для каждой интеграции. Тогда отключение одного приложения не затронет остальные. - Храните ключи в переменных окружения или хранилище секретов. Не добавляйте их в репозиторий, сообщения и обращения в поддержку. - Для чтения отчётов достаточно права просмотра. Право управления давайте только коду, который меняет кампании. - Ограничьте список кабинетов теми, которые нужны интеграции. - При подозрении на утечку сначала отзовите ключ. Изменения, внесённые через API, видны в истории кампании с пометкой «🔌 API». ## Ошибки авторизации | HTTP | `code` | Значение | | --- | --- | --- | | 401 | `API_KEY_MISSING` | Название No `X-API-Key` | | 401 | `API_KEY_INVALID` | неправильный, отложенный или истек ключ | | 401 | `NO_ACCOUNTS` | Ключ не достигает активного кабинета на данный момент | | 403 | `READ_ONLY_KEY` | Письма с ключом, который не имеет кампаний управления | | 403 | `VIEW_ONLY_ACCESS` | Письмо для кабинета, которое вы поделились с вами в виде просмотра | | 403 | `FEATURE_NOT_AVAILABLE` | Данный план не включает в себя | | 403 | `WRITE_NOT_ALLOWED` | Этот тип ключа (выданный Orbito Ads для партнеров) не может писать | Полный перечень кодов приведён в разделе «[Ошибки](/ru/docs/api/errors/) API». Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## Примечания по интеграции ## Подключение рабочего пространства Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## Ключи и права на кабинеты Храните X-API-Key на сервере. Для отчётов достаточно доступа на чтение. Для изменений нужны право управления кампаниями, роль владельца или менеджера этого кабинета и действующие тарифные права на функцию. Результаты запроса и поля ответа | API | HTTP | Что означает | | --- | --- | --- | | API_KEY_MISSING | 401 | Передайте ключ в заголовке X-API-Key. | | API_KEY_INVALID | 401 | Указанный ключ недействителен, просрочен или отозван. | | NO_ACCOUNTS | 401 | Ключу не доступен ни один активный рекламный кабинет. | | READ_ONLY_KEY | 403 | Ключ допускает чтение. Для записи нужно разрешение на управление кампаниями. | | VIEW_ONLY_ACCESS | 403 | Роль Viewer даёт просмотр. Для изменения нужны права записи в этом кабинете. | | FEATURE_NOT_AVAILABLE | 403 | В текущий тариф операция не входит. | | WRITE_NOT_ALLOWED | 403 | Тип ключа, который поставщик выдаёт партнёрам, допускает только чтение. | [Разбор ошибок API](/ru/docs/api/errors/) ## Область действия и отзыв Ключ провайдера охватывает один, выбранные или все доступные кабинеты. Права проверяются при каждом запросе. На соответствующих тарифах доступно до пяти активных ключей на человека. Потерянный ключ отзывается, секрет вебхука меняется отдельно. ## Операции и поля X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## Пример запроса GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Ключи и права на кабинеты | Поле | Значение по документации | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | Источник · [Источник данных](https://adsly.pro/docs/api/authentication/) ## Cabinet | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Документация разработчика](/ru/docs/)[Начало работы с API](/ru/docs/api/)[Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Дата обновления источника 2026-10-08 [Предыдущая тема**Начало работы с API**](/ru/docs/api/)[Следующая тема**Документация для ИИ-ассистента**](/ru/docs/api/ai-assistants/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Чтение данных кампании [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/campaigns/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Фильтруйте список по статусу и назначению или запросите кампанию и её историю. Используйте пару account_id и ad_id — номер объявления может повторяться в разных кабинетах. [Markdown](/ru/docs/api/campaigns.md) Кампания в API соответствует одному объявлению Telegram. Её определяет пара `(account_id, ad_id)`. Одинаковые `ad_id` могут встретиться в разных кабинетах, поэтому сохраняйте оба идентификатора. ## Поля объекта кампании Полная карточка, которую возвращает `GET /v1/campaigns/{ad_id}`, имеет следующую структуру. Пример ``` { "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" } ``` | поле | Значение | | --- | --- | | `title` | Ваше внутреннее имя для рекламы. | | `text` | Рекламный текст люди видят. | | `status` | Что Telegram делает с рекламой — см. [Статус](/ru/docs/api/campaigns/#doc-note-statuses) . | | `active` | Что вы просили: `true` = должен быть бег. Кампания с `active: true` и статус `Stopped` Он возвращается, как только у него будет бюджет. | | `promote_url` / `tme_path` | Что объявление приводит к: веб-сайт URL или ссылка `t.me/` (канал, бот, мини-апп, пост). | | `target_type` | `channels`, `bots`, `search` или `users` — см. [Создайте кампании](/ru/docs/api/create-campaigns/) . | | `targets` | Название рекламных целей (каналов или ботов), когда известно. | | `cpm` | Подарок за 1000 просмотров, в валюте кабинета. | | `budget` | Деньги **левый** на кампании. `budget + spent` - это все, что было дано. | | `spent` | Деньги потрачены до сих пор. | | `daily_budget` | Ежедневные расходы, если один установлен. | | `views`, `clicks`, `actions`, `opens` | `actions` — это действия платформы (присоединяются, бот начинается) — не ваши конверсии; для тех, кто видит [Конверсии](/ru/docs/api/conversions/). | | `ctr`, `cvr` | Проценты: `"1.15"` означает 1,15 %. | | `cpc`, `cpa` | Стоимость по клику и по действию. | | `views_per_user` | Сколько раз один человек может увидеть рекламу (1–4). | | `schedule` | в дни и часы, показанные объявления, или `null` — Это работает вокруг часы. Смотреть [Срок](/ru/docs/api/manage-campaigns/#doc-note-schedule). | | `group_id` | Группа кампании в панели, если есть. | | `auto_cpm_enabled` | Автомобиль Orbito Ads CPM Управляет предложением. | | `date` | Когда была создана реклама: 11 секунд, как строка. | | `status_changed_at` | Последнее изменение состояния. не поражены статистическими обновлениями — хорошо для «что изменилось с тех пор». | | `synced_at` | Если же в собственном распоряжении – `schedule`, `text`, `views_per_user`, целевые — были последним чтением из Telegram. Смотреть [свежесть](/ru/docs/api/campaigns/#doc-heading-freshness). | Поля `cpm`, `budget`, `spent`, `ctr`, `cvr`, `cpc` и `cpa` передаются строками, чтобы сохранить десятичную точность. Счётчики `views`, `clicks`, `actions` и `opens` — числа. Денежные показатели выражены в валюте кабинета. [Рекламный счет](/ru/docs/api/accounts/) ## Статусы | Статус | Значение | Что вы можете сделать | | --- | --- | --- | | `Active` | и бегать . | Перерыв, изменение предложения, добавление бюджета. | | `In Review` | Ожидается отзыв Telegram; пока еще не показано. | Чекайте — вебхок рассказывает вам, когда он меняется. | | `Declined` | Telegram отказался от рекламы. | Редактировать текст или ссылку (ресубмит), или создать новый. | | `On Hold` | Отключен — вами или правила автоматизации. | Изображение . | | `Stopped` | Бюджет использовался. | Добавить бюджет; он снова работает, если `active` является `true`. | | `Paused` | Пауза Telegram для всего кабинета (редко). | Контактный номер [@orbitoads](https://t.me/orbitoads). | | `Deleted` | Удалено. в истории, скрыто от списков. | — | ## GET /v1/campaigns Метод возвращает кампании из всех кабинетов, доступных ключу. Пример ``` 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" ``` | Параметры | дефальты | Значение | | --- | --- | --- | | `account_id` | — | Только этот кабинет. ( `accountId` также работает.) | | `status` | Все, кроме удаленного | Один статус или несколько, комма-отделенных. | | `title` | — | Название содержит этот текст. | | `bot_username` | — | Реклама одного бота или канала: совпадает с пользовательским именем в `tme_path`, случайно-нечувствительный, номер `@`. `foo` не совпадает `foobar`. | | `promote_domain` | — | Принимает `example.com` или полный URL; `www.` , схема, маршрут и порт игнорируются. | | `promote_domain_mode` | `exact` | `suffix` также совпадает с субдоменами ( `x.example.com` ). | | `type` | — | `bot` (боты и мини-приложения), `channel` (каналы, группы, сообщения) или `site` (внешние веб-сайты). | | `limit` | 100 | 1–500. | | `cursor` | — | Страница — см. [Страница](/ru/docs/api/pagination/) . рекомендуется. | | `offset`, `sortBy`, `sortOrder` | — | Офсетная страницация (≤ 500 на кабинет). | Все переданные фильтры применяются одновременно по условию AND. Неизвестное имя бота или домен дадут пустой список. Пример ``` { "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 /v1/campaigns/{ad_id}` возвращает кампанию с таргетингом, параметрами объявления и расписанием. В быстром списке эти поля опущены. Для удалённой кампании возвращается `status: "Deleted"`. Пример ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Для этого запроса `account_id` обязателен, когда одинаковый `ad_id` есть в нескольких доступных кабинетах. Без него сервер вернёт `400 ACCOUNT_ID_REQUIRED`. ### Свежесть данных Счётчики и статусы всех кампаний обновляются каждый час. Расписание, текст, `views_per_user` и таргетинг синхронизируются при чтении самого объявления. - Если локальная копия старше пяти минут, `GET /v1/campaigns/{ad_id}` сначала запрашивает объявление у Telegram. При таком чтении становятся видны изменения, внесённые напрямую в интерфейсе Telegram. - Кампании со статусами `Active`, `In Review` и `On Hold` дополнительно синхронизируются в фоне примерно каждые три часа. - Изменения, внесённые через панель Orbito или её API, появляются в копии сразу. Если Telegram не успел ответить, сервер вернёт сохранённую версию. Поле `synced_at` показывает время её последней синхронизации. ## GET /v1/campaigns/{ad_id}/history Метод возвращает один итог по выбранной кампании за период. Почасовую разбивку можно получить в разделе статистики. Пример ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "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` (по умолчанию), `7d`, `30d` или `custom`. Для произвольного периода нужны `startDate` и `endDate` в формате ГГГГ-ММ-ДД по UTC. По желанию задайте `startHour` и `endHour` от 0 до 23. Если за период нет данных, ответ — `404 NOT_FOUND`. ## Синхронизация локальной копии 1. Обойдите все страницы `GET /v1/campaigns?cursor=`. Добавляйте и обновляйте записи по паре `(account_id, ad_id)`. 2. Подпишитесь на вебхуки для изменений статусов и почасовой статистики. Это избавит от ежеминутного опроса. [Webhooks](/ru/docs/api/webhooks/) 3. Раз в сутки полностью пересинхронизируйте список, чтобы учесть пропущенные события. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## GET `/api/v1/campaigns` Получить список кампаний с фильтрами и пагинацией. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `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` | Да | 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}` Получить одну кампанию с таргетингом, креативом и расписанием. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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` Получить суммарные показатели кампании за выбранные даты и часы. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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" } } ``` ## Примечания по интеграции ## Идентификаторы кабинета и кампании Храните account_id и ad_id вместе. В разных кабинетах может встретиться один и тот же ad_id. Если ключу доступны несколько кабинетов, передавайте account_id для выбора нужной записи. ## Фильтры и статус Фильтры объединяются через И. Несколько status передаются через запятую. Список по умолчанию исключает Deleted, детальный запрос может вернуть удалённую кампанию. active отражает запрошенное состояние показов, status — решение площадки. ## Операции и поля 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 ## Пример запроса GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Чтение данных кампании | Поле | Значение по документации | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | Поле | Тип поля | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Доступные рекламные кабинеты](/ru/docs/api/accounts/)[Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/)[Изменение существующих кампаний](/ru/docs/api/manage-campaigns/)[Статистика кампаний и кабинетов](/ru/docs/api/stats/)[Справочники таргетинга и группы](/ru/docs/api/targeting/) Дата обновления источника 2026-10-08 [Предыдущая тема**Доступные рекламные кабинеты**](/ru/docs/api/accounts/)[Следующая тема**Создание кампаний и загрузка медиа**](/ru/docs/api/create-campaigns/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Версии и обновления API [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/changelog/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Версия включена в путь API. Клиент должен корректно обрабатывать дополнительные поля и новые значения перечислений. В октябре 2026 опубликованы расписания, операции управления и итоги за период. [Markdown](/ru/docs/api/changelog.md) ## Версии API Версия указана в пути `/api/v1`. В пределах v1 контракт расширяется с сохранением совместимости. | Добавление (может произойти в любое время) | Разрыв (только в новой версии) | | --- | --- | | Новые конечные точки | Удаление или переименование конечного пункта или поля | | Новые факультативные поля запроса | Новое необходимое поле | | Новые поля ответа | Изменение типа или значения поля | | Новые значения в энумах ( `status`, ошибка `code`) | Удаление единой ценности | | Новые коды ошибок | Осуществление валидного запроса недействительным | Клиенту стоит пропускать незнакомые поля и корректно обрабатывать новые значения перечислений и коды ошибок. Несовместимое изменение публикуется отдельно в `/api/v2`. О нём сообщается здесь заранее, пока v1 продолжает работать параллельно. ## История изменений ### 26 октября 2026 · итоги за период - В каждой строке `topCampaigns` ответа `GET /v1/stats/analytics` теперь есть `cpm` — расход на 1 000 показов за выбранный период. Сохранились `cpc` и `cpa`. [`GET /v1/stats/analytics`](/ru/docs/api/stats/#doc-note-get-v1statsanalytics) - Исправлен расчёт окон в один-два дня. Отдельные дни теперь складываются в тот же итог, что и единый диапазон. Раньше из-за первых минут после полуночи UTC результат одного дня был примерно на 1–2% ниже. Диапазоны от трёх дней уже считались правильно. - Исправлена выдача нулей для диапазонов длительностью до двух дней, начавшихся более 29 дней назад. Теперь возвращаются фактические значения. ### 8 октября 2026 · расписание объявлений - Параметр `schedule` позволяет выбрать дни и часы показов при создании, редактировании (`PATCH /v1/campaigns/{ad_id}`), копировании и массовом `set_schedule`. Значение `null` удаляет расписание. Оно доступно в `GET /v1/campaigns/{ad_id}` и само по себе не включает и не выключает кампанию. [Срок](/ru/docs/api/manage-campaigns/#doc-note-schedule) - Пауза, возобновление и редактирование сохраняют расписание. Копии и пересозданные кампании наследуют его. - Исправлена повторная модерация при изменении только `cpm`, `active` или `schedule`. Для них используются штатные формы ставки и статуса Telegram. Изменение других полей по-прежнему может вернуть объявление на проверку. [Эди](/ru/docs/api/manage-campaigns/#doc-note-edit) - Кампания с нулевым бюджетом теперь возвращает 400 и `param: "schedule"` без изменений. Сначала добавьте бюджет, затем назначьте расписание. - `GET /v1/campaigns/{ad_id}` запрашивает объявление у Telegram, если копия старше пяти минут. Правки расписания, текста и `views_per_user` в интерфейсе Telegram становятся видны в API. Поле `synced_at` указывает время последнего чтения. [свежесть](/ru/docs/api/campaigns/#doc-heading-freshness) ### 8 октября 2026 · управление кампаниями - При включённом управлении доступны создание до 100 кампаний через `POST /v1/campaigns`, редактирование через PATCH, пауза, возобновление, бюджет, копирование, массовые действия, удаление и загрузка `POST /v1/media`. Прежние ключи сохраняют доступ на чтение, пока владелец не разрешит запись. - Новые методы чтения — `GET /v1/campaigns/{ad_id}` с таргетингом, `GET /v1/tasks/{id}`, `GET /v1/groups` и `GET /v1/targeting`. - Участники агентства могут создавать свои ключи. Доступ к общим кабинетам определяется ролью. Владелец агентства видит все ключи команды и может отозвать любой. - При создании, копировании, массовом изменении и перемещении бюджета нужен `Idempotency-Key`. - Лимиты разделены — 30 запросов записи и 60 запросов чтения в минуту. - В `GET /v1/account/info` появились `access_level`, `currency`, `balance`, `balance_updated_at`, `min_budget` и `features`. - Помимо текста `error`, ошибки содержат `code` и `request_id`. Ответ 500 больше не раскрывает внутренний текст ошибки. - Во всех методах, которые принимали `accountId`, также можно передавать `account_id`. - Исправлен `cpa` для `GET /v1/stats?period=all`. Он отражает расход на действие, как и за остальные периоды. Ранее возвращался расход на клик. ### 2026-10-04 - Фильтры URL применяются к обоим вебхукам. Событие `status_change` получают только ключи пользователей с доступом к кабинету. ### 2026-09-18 - Для конверсий выделен независимый лимит 20 событий в секунду. В пакете допускается до 1 000 событий. ### 2026-06-30 - Добавлен приём и просмотр конверсий через `POST /v1/postback`, `GET /v1/ingest/{token}` и `GET /v1/conversions`. ### Предыдущие изменения - В `GET /v1/campaigns` добавлена курсорная пагинация и фильтры `bot_username`, `promote_domain` и `type`. Доступны методы статистики и вебхуки `status_change` и `hourly_digest`. Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## Примечания по интеграции ## Версия в адресе Текущий контракт использует /api/v1. В совместимом обновлении могут появиться необязательные поля, методы, значения перечислений и коды ошибок. Сохраняйте незнакомые статусы, пропускайте неиспользуемые поля ответа. ## Какие изменения отслеживать В текущей схеме есть недельные расписания, изменения кампаний в пределах кабинета и CPM в topCampaigns. Удаление поля, смена типа или новое обязательное поле запроса требуют новой версии API. ## Операции и поля /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 ## Пример запроса GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Версии и обновления API | Поле | Значение по документации | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/changelog/) ## По теме [Получение событий кампаний](/ru/docs/api/webhooks/)[Передача подтверждённых конверсий](/ru/docs/api/conversions/) Дата обновления источника 2026-10-26 [Предыдущая тема**Передача подтверждённых конверсий**](/ru/docs/api/conversions/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Передача подтверждённых конверсий [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/conversions/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Передайте из сервера или трекера ссылочный идентификатор кампании либо инвайт, тип события и уникальный ID транзакции. Сумма и валюта позволяют сопоставить доход и рекламный расход. [Markdown](/ru/docs/api/conversions.md) Telegram считает показы, клики и вступления. Дальнейшие действия, такие как заявка, депозит или продажа, регистрирует ваш сервер или трекер. Передавайте эти события в Orbito. Тогда конверсии и выручка появятся в карточке кампании, отчётах и правилах автоматизации. ## Включение отслеживания конверсий В карточке ключа включите «Принимать постбэки». Без этой настройки сервер вернёт `403 INGEST_DISABLED`. Для внешнего трекера нажмите «Создать ссылку трекера». Адрес показывается один раз и позволяет только отправлять конверсии. ## Как конверсия связывается с кампанией Добавьте в ссылку каждого объявления идентификатор, которым управляет ваша система. - Для бота или Mini App подойдут `t.me/yourbot?start=REF` и `?startapp=REF`. - Для сайта передайте идентификатор клика или субидентификатор трекера, например `https://example.com/?subid=REF`. В событии передайте тот же REF в поле `ref`. По нему сервис найдёт ссылки кампаний в доступных ключу кабинетах. Если один `ref` встречается в нескольких кампаниях одного кабинета, конверсия будет учтена для каждой из них. ## Из серверного приложения · POST /v1/postback Пример ``` 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" }' ``` Пример ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` В запросе может быть до 1 000 событий. Отправьте массив или объект `{"events": [...]}`. Ответ содержит отдельный результат для каждого события, например `{"accepted":998,"failed":2,"results":[...]}`. Одна ошибка не отменяет остальные события. ## Из трекера · GET /v1/ingest/{token} Вставьте URL в настройки постбэка вашего трекера и подставьте его макросы. Пример ``` # 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} ``` Сверьте названия макросов с документацией трекера. Ответ передаётся простым текстом — `OK`, `OK (deduped)` или сообщение об ошибке с HTTP-кодом. После 4xx исправьте запрос, после 5xx можно повторить отправку. ## Поля | поле | Также принято как | Требуется | Значение | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | ИЕ1 | Идентификатор от ссылки рекламы. до 512 символов. | | `invite_link` | `invitelink`, `link` | ИЕ1 | Для канальных объявлений: создана уникальная приглашенная ссылка Orbito Ads. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | Да | Становятся `lead`, `conversion` или `purchase` (разбираются такие слова, как `signup`, `ftd`, `deposit`, `sale`). | | `txid` | `tid` , `transaction_id` , `order_id` , `rdtk_event_id` , заголовок `X-Idempotency-Key` | Да | Идентификация вашего имени на этот случай. Посылать то же `txid` Вновь обновляется событие вместо того, чтобы два раза его рассчитать. До 128 символов. | | `amount` | `payout`, `sum`, `revenue`, `value` | Не | Номер; отрицательный для зарядов. | | `currency` | `cur`, `cnv_currency` | Не | Код ISO 4217 без одного, сумма записывается как USD. | | `status` | — | Не | Слово собственного статуса вашей сети (подтверждено, приостановлено ...), хранится так, как есть. | | `event_time` | `timestamp`, `date` | Не | ISO или час УНИКС; хранится в течение последних 90 дней. | | `account_id` | `accountId` | Иноды | Необходимо, когда один и тот же `ref` существует в нескольких ваших кабинетах (`409` иначе). | | `meta` | — | Не | Ваш собственный объект JSON, до 4 KB. | Для отмеченного поля нужен `ref` или `invite_link`. ## Лимиты и повторные запросы На один ключ разрешено 20 событий в секунду с кратковременным всплеском до 1 000. Это отдельная квота от чтения и записи. После ответа 429 выдержите интервал из `Retry-After`. Повтор безопасен благодаря устранению дубликатов по `txid`. ## GET /v1/conversions Ответ содержит итоги по кампаниям. Каждое принятое событие учитывается один раз. Пример ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | Параметры | Значение | | --- | --- | | `adId` | Одна из кампаний. | | `days` | Только события, полученные за последние 1–365 дней. | - Выручка `revenue` разделена по валютам. Пересчёта по курсу нет. - Если `ref` совпал у нескольких кампаний, `ad_id` в записи события будет `null`. - Отправленные суммы служат вашим отчётам. Они не влияют на выставленные счета и оплату услуг Orbito. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## POST `/api/v1/postback` Передать одну конверсию или пакет до 1 000 событий. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Да | 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 } } ``` ### Схема тела запроса 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}` Передать конверсию трекера через ссылку только для записи. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `token` | path | `string` | Да | | `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` Получить количество конверсий и выручку по исходным валютам. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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 } } ] } ``` ## Примечания по интеграции ## Связь события с объявлением Активируйте приём postback на ключе провайдера. Передавайте ref или invite_link, тип события event и постоянный txid. Основные события — lead, conversion и purchase. Если метка найдена в разных кабинетах, укажите account_id. Результаты запроса и поля ответа | API | Что означает | | --- | --- | | account_id / accountId | Для поля account_id поддерживается имя accountId. Укажите кабинет, если один ref встречается в нескольких кабинетах. При неоднозначном совпадении вернётся HTTP 409. | ## Дедупликация и валюта Повтор txid обновляет событие. В одном пакете возможны успешные и ошибочные элементы. Для выручки укажите ISO-валюту, по умолчанию USD. Отрицательная сумма отражает возврат платежа. Ссылка трекера только для записи и отвечает текстом OK или OK (deduped). ## Операции и поля 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 ## Пример запроса GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Передача подтверждённых конверсий | Поле | Значение по документации | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | Источник · [Источник данных](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | Поле | Тип поля | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | Поле | Тип поля | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Получение событий кампаний](/ru/docs/api/webhooks/)[Версии и обновления API](/ru/docs/api/changelog/) Дата обновления источника 2026-10-08 [Предыдущая тема**Получение событий кампаний**](/ru/docs/api/webhooks/)[Следующая тема**Версии и обновления API**](/ru/docs/api/changelog/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Создание кампаний и загрузка медиа [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/create-campaigns/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Один запрос принимает до 100 кампаний одного кабинета. Выберите каналы, ботов, поиск или аудиторию, передайте ключ операции и следите за задачей. Медиа для креатива загрузите заранее. [Markdown](/ru/docs/api/create-campaigns.md) Метод `POST /v1/campaigns` создаёт кампании в одном кабинете. Нужны ключ с правом управления кампаниями и заголовок `Idempotency-Key`. В ответ приходит `202` с идентификатором задачи. Кампании появляются после её завершения. [Задача](/ru/docs/api/tasks/) ## Пример создания кампании Пример ``` 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"] }' ``` Пример ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## Пакетное создание Передайте до 100 кампаний в массиве `campaigns`. На верхнем уровне укажите `account_id` и параметры группы. Они применятся ко всем элементам пакета. Пример ``` { "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"] } ] } ``` Кампании создаются по очереди. При ошибке первого элемента задача останавливается. Исправьте данные и отправьте пакет снова. В `errors` у каждой ошибки указан индекс кампании в вашем массиве. ## Поля | поле | Требуется | Значение | | --- | --- | --- | | `title` | Да | Внутреннее название, показано в панели. | | `text` | Да | Применяются правила собственной длины и содержания Telegram — отказ возвращается в задачу `errors`. | | `promote_url` | Да | Что открывает объявление: `https://t.me/channel`, `t.me/bot?start=ref`, `@channel` или веб-сайт URL. | | `cpm` | Да | Подача на 1000 просмотров в валюте кабинета, большая за 0. слишком низкая для цели → Telegram 's минимум возвращается в ошибку. | | `budget` | Да | Денежные средства перемещены из рекламного счета баланса в кампанию: `0`или, по крайней мере, рекламный счет `min_budget` ([Рекламный счет](/ru/docs/api/accounts/)). С `0` Реклама создается, но не может работать до того момента, пока вы не добавите бюджет. | | `target_type` | Да | `channels`, `bots`, `search` или `users` — см. ниже. | | `active` | Не | `false` создает его отключен. по умолчанию `true` . | | `daily_budget` | Не | Ежедневные расходы капель. | | `views_per_user` | Не | Сколько раз один человек может увидеть рекламу, 1–4. | | `media` | Не | Фото или видео токен с [`POST /v1/media`](/ru/docs/api/create-campaigns/#doc-note-upload-media) . | | `picture` | Не | `true` показывает в рекламе аватара продвинутого канала. | | `button` | Не | Нажатие в рекламном разделе: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request`. Только там, где рекламный счет `features.ad_button` Это `true`. | | `website_name` | Не | Название бренда, отображаемое выше веб-сайта. | | `schedule` | Не | Показать объявление только в выбранные дни и часы недели, e.g . дни недели 9:00–18:00. Формат: [Срок](/ru/docs/api/manage-campaigns/#doc-note-schedule) . Без него объявление проходит вокруг часа. | Только на верхнем уровне передаются `account_id`, `group_id` и `new_group_name`. Идентификатор кабинета нужен, если ключу доступно несколько. Для папки укажите существующий ID либо имя для создания или повторного использования. [Группа](/ru/docs/api/targeting/#doc-note-groups) Неизвестное поле вызовет `400 VALIDATION_ERROR`. Его имя будет в `param`, поэтому опечатка не приведёт к тихой потере настройки. ## Таргетинг ### `channels` — показы в указанных каналах Пример ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | поле | Значение | | --- | --- | | `channels` | 1–100 общественных каналов: `@name`, `name` или `t.me/name`. | | `languages`, `topics`, `exclude_topics` | Напряженный по языку и теме канала ( [Коды](/ru/docs/api/targeting/) ). | | `add_similar_channels` | Также добавляют подобные каналы. | ### `bots` — показы в ботах Пример ``` { "target_type": "bots", "bots": ["@somebot"] } ``` Обязательное поле `bots` принимает от 1 до 100 публичных ботов. ### `search` — показы по поисковым запросам в Telegram Пример ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` Обязательное поле `search_keywords` принимает от 1 до 100 фраз, до 64 символов в каждой. ### `users` — показы выбранной аудитории Пример ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | поле | Значение | | --- | --- | | `countries` | ISO коды стран. | | `languages` | Языковые коды . | | `topics`, `exclude_topics` | Интересы по теме ID. | | `audience_channels` | Люди, которые читают эти каналы. | Для аудиторного таргетинга нужен хотя бы один из перечисленных параметров. Допустимые значения приведены в справочнике кодов таргетинга. [Целевые коды](/ru/docs/api/targeting/) При выполнении задачи Telegram сопоставляет каналы, ботов и поисковые фразы со своими идентификаторами. Ненайденные цели пропускаются. Если подходящих целей нет, кампания получит в `errors` сообщение `No targets found` для каналов и ботов либо `No valid search queries found` для поиска. ## После создания кампании 1. Опросите `GET /v1/tasks/{id}` до статуса `completed`. Идентификаторы новых кампаний находятся в `ad_ids`. [`GET /v1/tasks/{id}`](/ru/docs/api/tasks/) 2. Новая кампания проходит модерацию Telegram. После `In Review` она получает `Active` или `Declined`. О смене статуса сообщит вебхук. [Webhook](/ru/docs/api/webhooks/) 3. Для изменения, пополнения или остановки используйте методы управления кампаниями. [Управление кампаниями](/ru/docs/api/manage-campaigns/) ## Загрузка медиафайлов `POST /v1/media` загружает изображение или видео и возвращает медиатокен для создания, редактирования и копирования кампании. Токен принадлежит кабинету, в который загружен файл. Загружайте медиа в кабинет будущей кампании. Пример ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` Пример ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - Передайте файл JPG, PNG, GIF, WEBP или MP4 размером до 10 МБ как `multipart/form-data` в поле `file`. - В некоторых кабинетах доступны только изображения 16:9 шириной от 640 пикселей. При отклонении в `error` вернётся причина от Telegram. ## Ошибки | Код | Когда | | --- | --- | | `VALIDATION_ERROR` | Поле отсутствует, неизвестно, неправильного типа, или не принадлежит этому `target_type` — `param` говорит, что. | | `IDEMPOTENCY_KEY_REQUIRED` | Номер `Idempotency-Key` | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | Скажите, какой кабинет / какой кабинет недоступен. | | `VIEW_ONLY_ACCESS` | У вас есть визитный доступ к этому кабинету. | | `QUEUE_FULL` | 5 создает уже квеированные в этом рекламном счете. | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | В настоящее время кабинет не может принимать ручные изменения. | Отказ Telegram по тексту, ставке или ссылке отдельной кампании не отменяет весь запрос. Такие ошибки перечислены в `errors` задачи. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## POST `/api/v1/campaigns` Поставить в очередь создание одной или до 100 кампаний одного кабинета. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Да | | `X-API-Key` | header | `string` | Да | 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": [] } } ``` ### Схема тела запроса 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" } ] } ``` Результаты запроса и поля ответа | API | HTTP | Что означает | | --- | --- | --- | | VALIDATION_ERROR | 400 | Проверьте поля запроса и исправьте неверные значения перед повтором. | | IDEMPOTENCY_KEY_REQUIRED | 400 | Передайте обязательный заголовок Idempotency-Key с запросом записи. | | VIEW_ONLY_ACCESS | 403 | Роль Viewer даёт просмотр. Для изменения нужны права записи в этом кабинете. | | QUEUE_FULL | 429 | В очереди кабинета уже пять задач создания. Дождитесь освобождения места. | [Разбор ошибок API](/ru/docs/api/errors/) ## POST `/api/v1/media` Загрузить медиа и получить токен файла для выбранного кабинета. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | | `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 } } ``` ### Схема тела запроса JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` Пример · 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" ] } ] } ``` ## Примечания по интеграции ## Одна кампания или пакет В одиночном запросе title, text, promote_url, cpm, budget и target_type задаются в корне. В пакетном запросе в campaigns помещают 1–100 объектов, общие account_id и группу — в корень. Бюджет равен нулю либо не меньше min_budget кабинета. ## Таргетинг и файлы Режимы — channels, bots, search и users. В списке каналов, ботов или фраз допускается 1–100 значений, по 64 символа на поисковую фразу. Для аудитории нужен хотя бы один фильтр. JPG, PNG, GIF, WebP и MP4 до 10 МБ привязываются к кабинету загрузки. ## Принято в обработку и завершено Создание, копирование и массовый запрос возвращают HTTP 202 с id задачи. Опросите GET /api/v1/tasks/{id} с учётом Retry-After. Даже при статусе completed проверьте failed и errors. ## Операции и поля POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## Пример запроса GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Настройки теста аудитории В схеме создания кампании есть четыре режима таргетинга. Каналы передают в channels, имена ботов — в bots, поисковые запросы — в search_keywords. Страны, языки и тематики задают аудиторию пользователей. Перед тестом проверьте возможности кабинета. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Создание кампаний и загрузка медиа | Поле | Значение по документации | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | Источник · [Источник данных](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | Поле | Тип поля | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Доступные рекламные кабинеты](/ru/docs/api/accounts/)[Чтение данных кампании](/ru/docs/api/campaigns/)[Изменение существующих кампаний](/ru/docs/api/manage-campaigns/)[Статистика кампаний и кабинетов](/ru/docs/api/stats/)[Справочники таргетинга и группы](/ru/docs/api/targeting/) Дата обновления источника 2026-10-08 [Предыдущая тема**Чтение данных кампании**](/ru/docs/api/campaigns/)[Следующая тема**Изменение существующих кампаний**](/ru/docs/api/manage-campaigns/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Разбор ошибок API [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/errors/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Проверяйте HTTP-статус и код ошибки вместе. При отсутствии ключа вернётся 401. Исправьте поля перед повторной записью, а после превышения лимита дождитесь указанного срока. [Markdown](/ru/docs/api/errors.md) ## Формат ответа Для всех ошибок API возвращает ответ одинаковой структуры. Пример ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | поле | Все время | Значение | | --- | --- | --- | | `error` | Да | Показать это, не перестаньте — текст может улучшиться. | | `code` | Все ошибки в V1 | Стабильная, машиночитаемая. отрасль на этом. | | `param` | По ошибкам ввода | Поле, которое было неправильно, как путь: `cpm`, `campaigns[2].channels[0]`, `account_id`. | | `request_id` | Большинство ошибок | Точно так же, как и заголовок ответа `X-Request-Id`. цитировать его для поддержки. | В ошибке могут быть дополнительные поля. Если Telegram отклонил слишком низкую ставку, ответ содержит `min_cpm` и `currency`. Для `UNKNOWN_AD_IDS` возвращается `missing`, а для `QUEUE_FULL` — `limit`. ## Коды состояния HTTP | Статус | Значение | В отставку ? | | --- | --- | --- | | 200 | Доно | — | | 202 | Принятое, проходящее в фоне — опрос на [Задача](/ru/docs/api/tasks/) | — | | 400 | Заявление неправильно (поле, значение, отсутствие `account_id`) — или Telegram отказался от изменения | Нет — корректировать запрос | | 401 | Ни один ключ, ни плохой ключ, или ключ не достигает кабины | Не | | 403 | Ключ или план не разрешается делать это | Не | | 404 | Не нашли среди кабинетов эти ключевые достижения | Не | | 409 | Конфликт с текущим состоянием (кабинет закрыт, Telegram сессия закончилась, такой же запрос идет вперед) | Иногда — посмотрите код | | 413 | Файлы слишком большие | Не | | 422 | `Idempotency-Key` переиспользуется для другого запроса | Нет — используйте новый ключ | | 429 | Ограничение скорости или полный рейс | Да, после `Retry-After` секунды | | 500 | Наш bug — уже зарегистрирован | Сначала читайте государство, а затем выйдите с баккоффом | | 503 | Временно недоступно | Да, после `Retry-After` | ## Коды ошибок ### Авторизация и права доступа | Код | HTTP | Что делать | | --- | --- | --- | | `API_KEY_MISSING` | 401 | Отправьте `X-API-Key` | | `API_KEY_INVALID` | 401 | Ключ ошибочен, отложен или истекает. создайте новый. | | `NO_ACCOUNTS` | 401 | Ключ не достигает активного кабинета на данный момент (кабинет деактивирован, доступ удален). | | `FORBIDDEN` | 403 | Этот ключевой тип не допускается для его владельца. | | `READ_ONLY_KEY` | 403 | Нажмите **Управление кампаниями** для ключа в панели. | | `WRITE_NOT_ALLOWED` | 403 | Этот тип ключа (выданный Orbito Ads для партнеров) никогда не пишет. | | `VIEW_ONLY_ACCESS` | 403 | Ваш доступ к этому кабинету — это Viewer.Спросите владельца агентства о менеджере. | | `FEATURE_NOT_AVAILABLE` | 403 | План не включает в себя это действие (ответ называется `feature`). | | `SUBSCRIPTION_REQUIRED` | 403 | Владелец кабинета не имеет активной подписки. | | `ACCOUNT_INACTIVE` | 403 | Кабинет деактивирован. | ### Поиск кабинетов, кампаний и задач | Код | HTTP | Что делать | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | Ключ достигает нескольких кабинетов (или это `ad_id` существует в нескольких) — проходит `account_id`. | | `ACCOUNT_NOT_FOUND` | 404 | Это `account_id` Недоступны с этим ключом. Проверка `GET /v1/account/info`. | | `CAMPAIGN_NOT_FOUND` | 404 | Никакой такой кампании в кабинетах ключа (или его удаляют). | | `TASK_NOT_FOUND` | 404 | Нет такой задачи для владельца этого ключа. | | `NOT_FOUND` | 404 | Никаких статистических данных на эту кампанию и период. | | `UNKNOWN_AD_IDS` | 400 | Около `ad_ids` в массовом звонке не являются кампаниями этого кабинета; `missing` перечисляет их. | ### Параметры запроса | Код | HTTP | Что делать | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` назвал поле; `error` говорит, что не так. Неизвестные поля также отвергаются. | | `UNSUPPORTED_MEDIA` | 400 | Скачать JPG, PNG, GIF, WEBP или MP4 в поле `file` | | `FILE_TOO_LARGE` | 413 | Загрузить небольшой файл (10 MB максимум). | ### Состояние Telegram и рекламного кабинета | Код | HTTP | Что делать | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram отказался от изменения; `error` носит свою причину. с низкой офертой вы также получите `param: "cpm"`, `min_cpm` и `currency` . | | `BUDGET_UNCHANGED` | 400 | Telegram принял финансирование счета, но бюджет кампании не переместился. Проверьте баланс рекламного счета (`GET /v1/account/info`). | | `INSUFFICIENT_AD_BALANCE` | 400 | Вы попросили вывести больше, чем у кампании есть. вывести меньше, или использовать `withdraw_all`. | | `CABINET_AUTH_EXPIRED` | 409 | Telegram сеанс кабинета истекает. владелец снова соединяет его в панели; затем выходит. | | `CABINET_LOCKED` | 409 | Кабинет находится под автоматическим управлением; ручные изменения блокируются. | ### Ограничения и повторные попытки | Код | HTTP | Что делать | | --- | --- | --- | | `RATE_LIMITED` | 429 | Продолжительность `Retry-After` секунды. смотреть [Ограничения темпа](/ru/docs/api/rate-limits/) . | | `QUEUE_FULL` | 429 | Кабинет уже имеет 5 операций, которые завершены.Почекайте задания, чтобы закончить, а затем выйдите (то же `Idempotency-Key` хорошо). | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | Добавьте `Idempotency-Key` заголовка. | | `IDEMPOTENCY_KEY_INVALID` | 400 | Используйте 8–255 символов; UUID является идеальным. | | `IDEMPOTENCY_KEY_REUSED` | 422 | Этот ключ был использован для другого запроса — новая операция, новый ключ. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | Первый запрос с этим ключом по-прежнему работает. возвращение за несколько секунд. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | Ничего не было сделано. возвращение с тем же ключом. | | `INGEST_DISABLED` | 403 | Нажмите **Получить Postback** для ключа ( [Конверсии](/ru/docs/api/conversions/)) . | | `INTERNAL_ERROR` | 500 | Проверьте состояние с GET перед отходом письма; свяжитесь с [@orbitoads](https://t.me/orbitoads) с `request_id`, если оно продолжается. | ## Когда повторять запрос - После ошибки 4xx исправьте входные данные. Такой ответ не расходует `Idempotency-Key`. Исправленный запрос можно отправить с тем же ключом. - После 429 или 503 повторите запрос через интервал из `Retry-After`. - После ответа 5xx на запись проверьте кампанию запросом GET. Изменение могло дойти до Telegram. Повтор с тем же ключом вернёт сохранённый ответ 5xx. Если проверка показала, что операцию нужно провести снова, используйте новый ключ. - При сетевом тайм-ауте повторите запись с исходным `Idempotency-Key`. Выполненная операция вернёт прежний результат, а незапущенная выполнится сейчас. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. Пример · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | Код | 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 | ## Примечания по интеграции ## Как читать ошибку При ошибке ответ содержит success=false и error. Обрабатывайте code в коде клиента, передавайте request_id поддержке. В param может быть неверное поле, в missing — неизвестные ad_id, при отклонённой ставке — min_cpm и currency. ## Повтор по HTTP-статусу При 400 исправьте запрос, при 401 проверьте ключ, при 403 — права. Для 404 сверьте кабинет и ad_id. Ошибку 409 разбирайте по code. Для квот и временных сбоев учитывайте Retry-After. При конфликте 422 новая операция требует нового ключа. ## Операции и поля error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## Пример запроса GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Разбор ошибок API | Поле | Значение по документации | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | Источник · [Источник данных](https://adsly.pro/docs/api/errors/) ## Error | Поле | Тип поля | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Лимиты запросов и событий](/ru/docs/api/rate-limits/)[Повтор одной операции](/ru/docs/api/idempotency/)[Отслеживание задачи в очереди](/ru/docs/api/tasks/)[Постраничное чтение кампаний](/ru/docs/api/pagination/) Дата обновления источника 2026-10-08 [Предыдущая тема**Документация для ИИ-ассистента**](/ru/docs/api/ai-assistants/)[Следующая тема**Лимиты запросов и событий**](/ru/docs/api/rate-limits/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Повтор одной операции [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/idempotency/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Выдавайте новый Idempotency-Key каждой операции создания, копирования, массового изменения или бюджета. При повторе сохраняйте ключ и тело запроса. Конфликтующая операция со старым ключом будет отклонена. [Markdown](/ru/docs/api/idempotency.md) Иногда сервер успевает принять запрос, но соединение обрывается до получения ответа. Повтор запроса без защиты может дважды пополнить баланс или создать две одинаковые кампании. Заголовок `Idempotency-Key` связывает повтор с исходной операцией. ## Когда нужен ключ идемпотентности | КЛЮЧАЯ | Название | | --- | --- | | `POST /v1/campaigns` | Требован | | `POST /v1/campaigns/{ad_id}/copy` | Требован | | `POST /v1/campaigns/bulk` | Требован | | `POST /v1/campaigns/{ad_id}/budget` | Требован | | Другие письма ( `PATCH` , пауза / резюме, `DELETE` , СМИ) | опционально — они безопасны для повторения самостоятельно | Если пропустить заголовок, эти операции вернут `400 IDEMPOTENCY_KEY_REQUIRED`. ## Как передавать ключ идемпотентности Для каждой новой операции сгенерируйте случайный UUID. Во всех повторных попытках выполнить именно эту операцию передавайте тот же UUID. Пример ``` 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 ``` Пример ``` 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 ``` ## Что возвращает повторный запрос | Ситирование | Ответ | | --- | --- | | Первый запрос с этим ключом | Идут нормально. | | Такой же ключ, такой же запрос, первый закончен | Ответ **хранили** , неизменный, с заголовком `Idempotent-Replayed: true`. | | Такой же ключ, такой же запрос, первый все еще работает | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After` . Отправляйтесь на короткое время. | | Один и тот же ключ, другое тело или конечная точка | `422 IDEMPOTENCY_KEY_REUSED` Новая операция требует нового ключа. | | Первый запрос закончился в 4xx (плохой вход, план, полный конец...) | Ключ выпущен: исправьте запрос и отправьте его с ключом **То же** . | | Первый запрос закончился в 5xx | 5x хранится и переиграется — изменение может достичь Telegram, а ключ существует, чтобы остановить его в работе два раза. Проверьте кампанию с `GET`Используйте новый ключ, если вы все еще хотите действовать. | Запросы считаются одинаковыми, если совпадают HTTP-метод, путь и JSON-тело. Порядок ключей в JSON роли не играет. ## Правила обработки ключа - Область идемпотентности привязана к ключу API. Одинаковые значения у разных интеграций не конфликтуют. - Запись хранится 24 часа. По истечении срока то же значение запускает новую операцию. - Допускается строка от 8 до 255 символов. Удобный стандартный вариант — UUID. - Если сервису не удалось сохранить ключ, операция не запускается. При ответе `503 IDEMPOTENCY_UNAVAILABLE` повторите запрос с тем же ключом. Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## Примечания по интеграции ## Один идентификатор на операцию Для создания, копирования, массового изменения и переноса бюджета обязателен Idempotency-Key. На операцию нужен новый случайный ключ из 8–255 символов, на повторы — тот же. В течение 24 часов он связан с API-ключом, методом, путём и JSON. ## Параллельный и изменённый повтор Завершённый ответ повторяется с Idempotent-Replayed: true. Дублирующий запрос в работе вернёт 409 и Retry-After, изменённый — 422. После ошибки проверки 4xx ключ освобождается. После сохранённого 5xx сначала проверьте состояние объекта. ## Операции и поля Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## Пример запроса GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Повтор одной операции | Поле | Значение по документации | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | Источник · [Источник данных](https://adsly.pro/docs/api/idempotency/) ## По теме [Разбор ошибок API](/ru/docs/api/errors/)[Лимиты запросов и событий](/ru/docs/api/rate-limits/)[Отслеживание задачи в очереди](/ru/docs/api/tasks/)[Постраничное чтение кампаний](/ru/docs/api/pagination/) Дата обновления источника 2026-10-08 [Предыдущая тема**Лимиты запросов и событий**](/ru/docs/api/rate-limits/)[Следующая тема**Отслеживание задачи в очереди**](/ru/docs/api/tasks/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Изменение существующих кампаний [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/manage-campaigns/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Управление охватывает тексты, ссылки, ставки, дневные лимиты, расписания, бюджеты и статус показов. В пакетном запросе — до 1 000 кампаний. В результате задачи проверяйте частичные ошибки. [Markdown](/ru/docs/api/manage-campaigns.md) Для всех методов раздела нужны ключ с правом управления кампаниями и доступ менеджера или владельца к кабинету. Кампанию определяет пара `(account_id, ad_id)`. Если ключу доступны несколько кабинетов, передайте `account_id` в теле запроса или параметрах URL. В историю кампании в панели добавляется запись с пометкой «🔌 API». | Звонок | Что она делает | Ответы | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | изменение текста, ссылки, предложения, кап, график, на/от | Стремясь | | `POST /v1/campaigns/{ad_id}/pause` | Отключить | Стремясь | | `POST /v1/campaigns/{ad_id}/resume` | Переключиться на | Стремясь | | `POST /v1/campaigns/{ad_id}/budget` | Добавить или отменить бюджет | Стремясь | | `DELETE /v1/campaigns/{ad_id}` | Удаление | Стремясь | | `POST /v1/campaigns/{ad_id}/copy` | 1 - 100 копий | 202 + [Задача](/ru/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | 1 акция на 1000 кампаний | 202 + задания | Синхронные методы возвращают обновлённую кампанию в поле `data`. [Объект кампании](/ru/docs/api/campaigns/#doc-note-the-campaign-object) ## Редактирование В `PATCH /v1/campaigns/{ad_id}` передавайте только изменившиеся значения. Пример ``` 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." }' ``` | поле | Значение | | --- | --- | | `title`, `text`, `promote_url` | Творчество и связь. | | `cpm` | Новые предложения, большие чем 0. | | `daily_budget` | Каждая капель | | `views_per_user` | 1–4. | | `active` | `true` / `false` — так же, как и повторная / пауза. | | `schedule` | Дни и часы для отображения объявления; `null` удаляет его — см. [Срок](/ru/docs/api/manage-campaigns/#doc-note-schedule) . | | `media`, `picture`, `button`, `website_name` | Как и в [Создать](/ru/docs/api/create-campaigns/#doc-note-fields). | Ставка `cpm`, переключатель `active` и расписание `schedule` применяются сразу без повторной модерации. Изменение `title`, `text`, `promote_url`, `media`, `picture`, `button`, `website_name`, `views_per_user` или `daily_budget` требует полной формы объявления. Telegram отправляет его на повторную проверку со статусом `In Review`. Ставку, состояние и расписание меняйте отдельным запросом, если объявление должно продолжать показы. Telegram не позволяет менять каналы, страны и другие параметры таргетинга существующего объявления. Создайте кампанию с новой аудиторией либо скопируйте текущую и настройте копию. [Копирование](/ru/docs/api/manage-campaigns/#doc-note-copy) Поле `meta` в ответе сообщает, как применены изменения. | поле | Значение | | --- | --- | | `status_warning` | Поле сохранилось, но Telegram не применил переключатель на/от (например, нет бюджета). | | `status_intent_only` | Ваш выбор на / от хранения хранится и действует, когда Telegram может (в обзоре, нет бюджета). | | `status_already_set` | Кампания была уже в том государстве, в котором вы просили. | Ставка ниже минимума Telegram для этой аудитории вернёт `400 PLATFORM_REJECTED`. При `param: "cpm"` смотрите нижнюю границу в `min_cpm` и валюту в `currency`. ## Остановка и возобновление Пример ``` 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` означает, что выбор сохранён до момента, когда его можно будет применить. Например, объявление ещё на проверке, отклонено или исчерпало бюджет. При фактической смене статуса придёт вебхук. [Статус Webhook](/ru/docs/api/webhooks/) ## Расписание показов Расписание задаёт дни недели и часы показа. Например, показывайте рекламу по будням с 9 до 18 часов или только вечером. За пределами выбранных часов показов нет. Установка, изменение и удаление расписания сохраняют `status` и `active`. Функция доступна для всех типов кабинетов. Пример ``` 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" } }' ``` | поле | Значение | | --- | --- | | `days` | `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun` — каждый из них имеет время (0–23) в день, когда реклама проходит. `9` Значит 09:00–09:59И так `[9, …, 17]` Это 9:00–18:00. Одна из дней, когда вы выйдете или отправите `[]`Но не бежит. По крайней мере, 1 час в целом. | | `timezone` | Часы, за которым следуют часы. `"viewer"` - местное время каждого зрителя; только для целевой аудитории (`target_type: "users"`). В противном случае A UTC Офсет → `"+03:00"`, `"-05:00"`, `"+05:30"`. Офсет Telegram предлагает: полные часы от `-12:00` Для `+14:00`плюс `-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"` и `"+3"` Они также принимаются. | Чтобы снова разрешить круглосуточный показ, передайте `"schedule": null`. Кампании без бюджета нельзя назначить расписание. Для остановленной кампании с нулевым остатком сервер вернёт `400 PLATFORM_REJECTED` с `param: "schedule"` и сохранит прежние настройки. Сначала пополните бюджет. У кампании на паузе (`On Hold`) с бюджетом расписание можно менять. Объект кампании возвращает расписание для всех семи дней со смещением вида `+03:00`. Можно прочитать его, изменить один день и отправить обратно. `GET /v1/campaigns/{ad_id}` учитывает и правки в Telegram. Некорректный час за пределами 0–23, неизвестный день, пустое расписание, неподдерживаемое смещение или `viewer` у канального, бот- или поискового объявления дадут `400 VALIDATION_ERROR`. В `param` указан точный путь, например `schedule.days.mon`. [свежесть](/ru/docs/api/campaigns/#doc-heading-freshness) При копировании и пересоздании расписание наследуется от исходной кампании. Для группы кампаний используйте массовое действие `set_schedule`. [Копии](/ru/docs/api/manage-campaigns/#doc-note-copy) ## Бюджет кампании `POST /v1/campaigns/{ad_id}/budget` перемещает средства между балансом кабинета и кампанией. Нужен заголовок `Idempotency-Key`. Пример ``` 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` | Эффективность | | --- | --- | --- | | `add` | Требован | Кабинет баланса → кампания. | | `withdraw` | Требован | Кампания → баланс кабинета. Больше, чем кампания имеет → `400 INSUFFICIENT_AD_BALANCE`. | | `withdraw_all` | — | Все осталось на кампании – баланс кабинета. | `meta.moved` — фактически перемещённая сумма. Если из кампании удалось вернуть меньше запрошенного, `meta.partial` будет равно `true`. Средства остаются внутри рекламного кабинета. ## Копирование кампании `POST /v1/campaigns/{ad_id}/copy` создаёт копии с таргетингом оригинала. Переданные поля заменяют исходные значения. Запросу нужен `Idempotency-Key`. Он возвращает задачу, в `ad_ids` которой появятся идентификаторы копий. Пример ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | поле | Значение | | --- | --- | | `copies` | 1 - 100 и дефолт 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | Обычно для каждой копии. `budget` : `0` или, по крайней мере, кабинета `min_budget`. | | `schedule` | Копии сохраняют оригинал [Срок](/ru/docs/api/manage-campaigns/#doc-note-schedule); отправьте один, чтобы заменить его, или `null` за ни одного. | | `group_id` / `new_group_name` | Поставьте копии в группу. | ## Удаление Пример ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` Удалённая кампания с показами остаётся в статистике со статусом `Deleted`. Кампания без показов удаляется полностью. При повторном удалении вернётся `404 CAMPAIGN_NOT_FOUND`. ## Массовые операции `POST /v1/campaigns/bulk` применяет одно действие максимум к 1 000 кампаниям одного кабинета. Передайте `Idempotency-Key`. Результат возвращается через задачу. Пример ``` 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` | Дополнительное поле | Эффективность | | --- | --- | --- | | `pause` | — | Отключить | | `resume` | — | Переключиться на | | `add_budget` | `amount` | Добавить к каждой кампании | | `withdraw_budget` | `amount` | Выход из каждой кампании | | `withdraw_all_budget` | — | Отменить все из каждой кампании | | `set_cpm` | `cpm` | Поставьте одинаковое предложение на каждом | | `set_schedule` | `schedule` | Поставьте один и тот же [Срок](/ru/docs/api/manage-campaigns/#doc-note-schedule) на каждый; `"schedule": null` удаляет | | `delete` | — | Удаляем каждый | В списке допускаются только существующие кампании выбранного кабинета. При чужих или неизвестных `ad_id` ничего не ставится в очередь, а `400 UNKNOWN_AD_IDS` перечислит их в `missing`. Дубликаты пропускаются. В `errors` задачи попадут отказы Telegram. Для `set_schedule` это, в частности, нулевой бюджет и `"timezone": "viewer"` у объявления без аудиторного таргетинга. ## Как остановить кампании с высокой ценой действия Пример ``` 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 Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## PATCH `/api/v1/campaigns/{ad_id}` Изменить переданные настройки кампании, сохраняя пропущенные поля. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | | `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" } } ``` ### Схема тела запроса 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" } ``` Результаты запроса и поля ответа | API | Что означает | | --- | --- | | status_warning | Изменения полей сохранены, но включить или выключить показ не удалось, например из-за нехватки бюджета. | | status_intent_only | Желаемое состояние записано. Оно может вступить в силу после проверки или пополнения баланса. | | status_already_set | У кампании уже было запрошенное состояние. | [Отслеживание задачи в очереди](/ru/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` Запросить приостановку показов кампании. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | | `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` Запросить возобновление кампании, когда показы доступны. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | | `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` Перенести бюджет между балансом кабинета и одной кампанией. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Да | | `X-API-Key` | header | `string` | Да | 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 } } ``` ### Схема тела запроса 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` Поставить в очередь до 100 копий с исходным таргетингом и настройками на замену. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Да | | `X-API-Key` | header | `string` | Да | 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": [] } } ``` ### Схема тела запроса 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` Поставить в очередь одну операцию для 1 000 кампаний одного кабинета. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Да | | `X-API-Key` | header | `string` | Да | 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": [] } } ``` ### Схема тела запроса 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}` Удалить кампанию с сохранением накопленной статистики показов. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Да | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | | `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 } } ``` ## Примечания по интеграции ## Изменяемые поля и расписание Изменения cpm, active и schedule не запускают новую проверку креатива. Изменение креатива может её запустить. Таргетинг существующей кампании фиксирован. Расписание задаётся по дням недели, часам 0–23 и смещению UTC. Для users доступно viewer. Значение null снимает расписание. ## Перемещение бюджета внутри кабинета add переводит средства в кампанию. withdraw возвращает указанную сумму, withdraw_all — остаток на баланс кабинета. Проверьте meta.moved и meta.partial. Внешние пополнения, счета и возвраты проходят через биллинг. ## Принято в обработку и завершено Создание, копирование и массовый запрос возвращают HTTP 202 с id задачи. Опросите GET /api/v1/tasks/{id} с учётом Retry-After. Даже при статусе completed проверьте failed и errors. ## Операции и поля 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 ## Пример запроса GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Изменение существующих кампаний | Поле | Значение по документации | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | Поле | Тип поля | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | Поле | Тип поля | | --- | --- | | days | object | | timezone | string | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Доступные рекламные кабинеты](/ru/docs/api/accounts/)[Чтение данных кампании](/ru/docs/api/campaigns/)[Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/)[Статистика кампаний и кабинетов](/ru/docs/api/stats/)[Справочники таргетинга и группы](/ru/docs/api/targeting/) Дата обновления источника 2026-10-08 [Предыдущая тема**Создание кампаний и загрузка медиа**](/ru/docs/api/create-campaigns/)[Следующая тема**Статистика кампаний и кабинетов**](/ru/docs/api/stats/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Постраничное чтение кампаний [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/pagination/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Начните с пустого cursor. Передавайте значение meta.next_cursor, пока оно не станет null, сохраняя выбранные фильтры. На странице доступно до 500 записей кампаний. [Markdown](/ru/docs/api/pagination.md) Постраничная выдача используется в `GET /v1/campaigns`. Можно выбрать один из двух режимов. ## Постраничная выдача по курсору В первый запрос добавьте пустой `cursor=`. В последующие передавайте `meta.next_cursor` из предыдущего ответа. Значение `null` означает, что страницы закончились. Пример ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` Пример ``` 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 ``` - Передавайте курсор как есть. Он действует для того же набора фильтров. - Сначала результаты группируются по кабинету, затем сортируются по убыванию `ad_id`. Новые кампании не нарушают порядок уже прочитанных страниц. - По курсору можно получить весь кабинет, в том числе 100 000 кампаний. - Фильтры `bot_username`, `promote_domain` и `type` всегда включают этот режим. - В списке опускаются сводка таргетинга, медиа и последнее действие. Полную карточку вернёт `GET /v1/campaigns/{ad_id}`. [`GET /v1/campaigns/{ad_id}`](/ru/docs/api/campaigns/#doc-note-get-one-campaign) ## Выдача со смещением для небольших кабинетов Без курсора используйте `limit` и `offset`, при необходимости задайте `sortBy` и `sortOrder`. Этим способом доступно до 500 кампаний из каждого кабинета. Если их больше, `meta.truncated` будет равно `true`, а `meta.next_step` укажет на курсорную пагинацию. Пример ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## Размер страницы Допустимые значения `limit` — от 1 до 500. По умолчанию возвращается 100 записей. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. Пример · 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' ``` Пример · 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' ``` ## Примечания по интеграции ## Обход большого списка Начните GET /api/v1/campaigns с cursor= и нужными фильтрами. Для следующей страницы сохраните фильтры и передайте meta.next_cursor без изменений. Остановитесь при null. limit — от 1 до 500, по умолчанию 100. ## Порядок сортировки и предел смещения В режиме курсора записи идут по кабинетам, внутри — по убыванию ad_id. Фильтры bot_username, promote_domain и type включают этот режим. При offset доступны sortBy и sortOrder и читаются до 500 кампаний на кабинет. При meta.truncated продолжайте по курсору. ## Операции и поля GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## Пример запроса GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Постраничное чтение кампаний | Поле | Значение по документации | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | Источник · [Источник данных](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Разбор ошибок API](/ru/docs/api/errors/)[Лимиты запросов и событий](/ru/docs/api/rate-limits/)[Повтор одной операции](/ru/docs/api/idempotency/)[Отслеживание задачи в очереди](/ru/docs/api/tasks/) Дата обновления источника 2026-10-08 [Предыдущая тема**Отслеживание задачи в очереди**](/ru/docs/api/tasks/)[Следующая тема**Доступные рекламные кабинеты**](/ru/docs/api/accounts/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Лимиты запросов и событий [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/rate-limits/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Для чтения, записи и входящих событий действуют отдельные квоты. Опубликованы 60 чтений и 30 записей в минуту, а также 20 конверсий в секунду. У каждого кабинета дополнительно ограничена очередь. [Markdown](/ru/docs/api/rate-limits.md) Для каждого ключа действуют отдельные лимиты на чтение, запись и отправку конверсий. Частый опрос статистики не помешает приостановить кампанию, а поток событий из трекера не исчерпает лимиты чтения и записи. | Бюджет | Применяется к | Ограничение | | --- | --- | --- | | **Читать** | Каждый `GET` | 60 запросов в минуту | | **Писать** | `POST`, `PATCH`, `DELETE`, за исключением конверсий | 30 запросов в минуту | | **Конверсии в** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 20 событий в секунду, взрывы до 1000 | Доступный лимит пополняется непрерывно. За короткий интервал можно использовать весь минутный запас. Обычная синхронизация списка кампаний, статистики и итогов занимает 3–4 запроса на чтение. Если для вашей интеграции нужен больший лимит, обратитесь в поддержку Orbito. Лимиты можно изменить для отдельного ключа. [@orbitoads](https://t.me/orbitoads) ## Заголовки HTTP Каждый ответ содержит заголовки с текущим состоянием лимита запросов. Пример ``` 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 ``` ## Как сократить число запросов - Остановить 300 кампаний можно одним запросом `POST /v1/campaigns/bulk`. Состав операции описан в справке по управлению кампаниями. [Управление кампаниями](/ru/docs/api/manage-campaigns/#doc-note-bulk) - Для создания используйте пакеты. Один вызов `POST /v1/campaigns` принимает до 100 кампаний. - Подпишитесь на вебхуки. Изменения статусов приходят по мере появления, а статистика — каждый час. [Webhooks](/ru/docs/api/webhooks/) - Один вызов `POST /v1/postback` принимает до 1 000 событий конверсии. Каждое событие учитывается в квоте. Пакет уменьшает число сетевых запросов. ## Другие лимиты | Что | Ограничение | | --- | --- | | Проводить или выполнять операции по кабинету | 5 создает + 5 других операций (копию, массу). 6 возвращает `429 QUEUE_FULL` . | | Кампания по созданию запроса | 100 | | Копии по запросу копии | 100 | | Кампания по массовому запросу | 1,000 | | Загруженные файлы | 10 Мб | | Размер страницы для `GET /v1/campaigns` | 500 | ## Пауза перед повторной попыткой При ответе 429 подождите столько секунд, сколько указано в `Retry-After`. В автоматической обработке добавьте небольшой случайный интервал, чтобы несколько процессов не повторили запрос одновременно. Пример ``` 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); } ``` Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## Примечания по интеграции ## Независимые квоты на ключ На ключ доступны 60 чтений и 30 изменений в минуту. Приём конверсий — 20 событий в секунду с пиком до 1 000. В пакете каждый элемент расходует единицу квоты. Остаток показывают X-RateLimit-Limit, X-RateLimit-Remaining и X-RateLimit-Reset. ## Очереди и повтор запроса В каждом кабинете до пяти задач создания и пяти прочих задач в очереди или работе. Одновременно выполняется по одной задаче каждого типа. После 429 подождите указанное в Retry-After число секунд. ## Операции и поля 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## Пример запроса GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Измерения отчёта API принимает до 100 кампаний на создание, до 100 копий за один запрос и до 1000 существующих кампаний на массовое изменение. Код 202 возвращает задачу из очереди. До изменения следующей группы проверьте failed и errors завершённой задачи. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Лимиты запросов и событий | Поле | Значение по документации | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/rate-limits/) ## По теме [Разбор ошибок API](/ru/docs/api/errors/)[Повтор одной операции](/ru/docs/api/idempotency/)[Отслеживание задачи в очереди](/ru/docs/api/tasks/)[Постраничное чтение кампаний](/ru/docs/api/pagination/) Дата обновления источника 2026-10-08 [Предыдущая тема**Разбор ошибок API**](/ru/docs/api/errors/)[Следующая тема**Повтор одной операции**](/ru/docs/api/idempotency/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Статистика кампаний и кабинетов [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/stats/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Запрашивайте статистику по кампаниям, сводку по кабинету или рейтинг с разделением по валютам. Выберите скользящий период либо даты и часы. При экспорте сохраняйте границы периода. [Markdown](/ru/docs/api/stats.md) Для статистики есть три метода с разной детализацией. Каждый возвращает данные по кабинетам, доступным ключу. | КЛЮЧАЯ | Возвращение | | --- | --- | | `GET /v1/stats` | Количество кампаний за каждый период | | `GET /v1/stats/total` | Тотали каждого кабинета плюс графические точки | | `GET /v1/stats/analytics` | Общая сумма распределена по валюте, графике, топ-кампаниям | Историю одной кампании за период запрашивайте через `GET /v1/campaigns/{ad_id}/history`. [`GET /v1/campaigns/{ad_id}/history`](/ru/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## Периоды отчёта | `period` | окно | | --- | --- | | `1d` | Последние 24 часа (обычно для `/stats` и `/stats/total`) | | `7d` | 7 дней | | `30d` | Последние 30 дней (дефальт для `/stats/analytics`) | | `all` | Все время | | `custom` | `startDate` и `endDate` ( `YYYY-MM-DD` ), опционально `startHour` и `endHour` (0–23) | Кроме готовых периодов принимаются `h` и `d`, например `6h` или `14d`. Максимум — 365 дней. При неизвестном значении сервер использует последние 24 часа, поэтому проверяйте написание. Время указывается в UTC. Пример ``` # 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 Показатели сгруппированы по кабинету и кампании. Обращаться к записи можно как `data[account_id][ad_id]`. Пример ``` { "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" } } ``` Ключи объекта — строки, значения в этом ответе — числа. `cpa` показывает расход на действие, `ctr` — кликабельность в процентах. ## GET /v1/stats/total Метод для дашборда возвращает суммарные показатели и график по каждому кабинету. Пример ``` { "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` точки сгруппированы по часам или дням в зависимости от периода. Валюта определяется по `cabinetType`. Для `euro` это EUR, для `ton` в данных указан TON, для `stars` — Stars. ## GET /v1/stats/analytics К итогам и графикам из `/stats/total` добавляются расходы по валютам и список кампаний с наибольшими показателями. Пример ``` { "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" } } ``` ## Примечания - Данные регулярно синхронизируются со счётчиками Telegram. Последний час дополняется по мере синхронизации. - Складывайте расходы только в пределах одной валюты. - Свои лиды, депозиты и продажи регистрируйте через API конверсий. В статистике Telegram поле действий отражает подписки и запуски бота. [Конверсии](/ru/docs/api/conversions/) - Для регулярных отчётов используйте почасовой вебхук вместо частого опроса статистики. [Веб-хок вещь вещь Веб-хак вещью вещь](/ru/docs/api/webhooks/#doc-heading-hourly_digest) ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## GET `/api/v1/stats` Получить показатели периода по ключам кабинета и кампании. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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` Получить итоги по кабинетам и точки графиков за период. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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` Получить разбивку по валютам, графики и рейтинг кампаний. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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" } } ``` ## Примечания по интеграции ## Балансы и валюты Для каждого кабинета проверьте currency, balance_updated_at и min_budget. Денежные суммы и ставки в объектах кампаний могут быть десятичными строками или null. В агрегатах отчётов это числа. Ведите раздельные итоги EUR, TON и Stars. ## Периоды и часы UTC В period укажите 1d, 7d, 30d, all, custom или окно Nh/Nd до 365 дней. Для custom нужны startDate и endDate, дополнительно startHour/endHour от 0 до 23 по UTC. Для stats и total по умолчанию 1d, для analytics — 30d. ## Что считается действием actions — действия на площадке, например подписка или старт бота. Лиды, покупки и выручку своего трекера смотрите в conversions. /stats/analytics возвращает график, итоги и topCampaigns по кабинетам. ## Операции и поля 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 ## Пример запроса GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Статистика кампаний и кабинетов | Поле | Значение по документации | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | Источник · [Источник данных](https://adsly.pro/docs/api/stats/) ## StatsNumbers | Поле | Тип поля | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Доступные рекламные кабинеты](/ru/docs/api/accounts/)[Чтение данных кампании](/ru/docs/api/campaigns/)[Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/)[Изменение существующих кампаний](/ru/docs/api/manage-campaigns/)[Справочники таргетинга и группы](/ru/docs/api/targeting/) Дата обновления источника 2026-10-26 [Предыдущая тема**Изменение существующих кампаний**](/ru/docs/api/manage-campaigns/)[Следующая тема**Справочники таргетинга и группы**](/ru/docs/api/targeting/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Справочники таргетинга и группы [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/targeting/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Загрузите коды стран, языков и тематик перед сборкой запроса. Запрос групп вернёт сохранённые папки кампаний. Кэшируйте справочники и обновляйте при изменении допустимых значений. [Markdown](/ru/docs/api/targeting.md) ## GET /v1/targeting Метод возвращает допустимые коды для `POST /v1/campaigns`. Тот же список использует форма создания кампании в панели. [`POST /v1/campaigns`](/ru/docs/api/create-campaigns/) Пример ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "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" ] } } ``` | Список | Используется в | Примечания | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 двухзначные коды, плюс Telegram собственные `FT` (анонимные номера). | | `languages[].code` | `languages` | Языковые ключи Telegram — e.g, `pt-br` и `pt-pt`, а не `pt` . | | `topics[].id` | `topics`, `exclude_topics` | Цифры; ID не последовательны. | | `buttons` | `button` | Только в кабинетах, `features.ad_button` из которых `true` . | Справочники меняются редко. Их можно запросить один раз и хранить в кэше сутки. ## Группы таргетинга Группы — папки кампаний внутри кабинета. Для новой кампании или копии передайте `group_id` существующей папки либо `new_group_name`. По имени будет найдена существующая папка или создана новая. ### GET /v1/группы Пример ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Пример ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` Без `account_id` ответ содержит группы всех доступных кабинетов. Группа принадлежит одному кабинету. Чужой `group_id` для кампании из другого кабинета будет отклонён. ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## GET `/api/v1/targeting` Получить допустимые страны, языки, тематики и кнопки объявлений. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Да | 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` Получить группы кампаний, при необходимости по одному кабинету. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Да | 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" } ] } ``` ## Примечания по интеграции ## Значения для формы кампании Используйте возвращённые коды стран и языков, числовые id тематик и значения кнопок. Языковые коды могут различаться по регионам, например pt-br и pt-pt. Поле button доступно при поддержке кабинетом. ## Принадлежность группы У каждой группы один кабинет. При создании или копировании передайте его group_id либо new_group_name. Если название уже есть в этом кабинете, группу можно использовать повторно. ## Операции и поля GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## Пример запроса GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Настройки теста аудитории В схеме создания кампании есть четыре режима таргетинга. Каналы передают в channels, имена ботов — в bots, поисковые запросы — в search_keywords. Страны, языки и тематики задают аудиторию пользователей. Перед тестом проверьте возможности кабинета. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Справочники таргетинга и группы | Поле | Значение по документации | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | Источник · [Источник данных](https://adsly.pro/docs/api/targeting/) ## Targeting | Поле | Тип поля | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Group | Поле | Тип поля | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Доступные рекламные кабинеты](/ru/docs/api/accounts/)[Чтение данных кампании](/ru/docs/api/campaigns/)[Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/)[Изменение существующих кампаний](/ru/docs/api/manage-campaigns/)[Статистика кампаний и кабинетов](/ru/docs/api/stats/) Дата обновления источника 2026-10-08 [Предыдущая тема**Статистика кампаний и кабинетов**](/ru/docs/api/stats/)[Следующая тема**Получение событий кампаний**](/ru/docs/api/webhooks/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Отслеживание задачи в очереди [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/tasks/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Создание, копирование и массовые изменения могут вернуть HTTP 202 и ID задачи. Проверяйте прогресс, итоги и отдельные ошибки по задаче. Сохраните итоговый список затронутых кампаний для сверки. [Markdown](/ru/docs/api/tasks.md) В некоторых операциях сервис обращается к Telegram отдельно для каждой кампании. Чтобы не держать HTTP-соединение открытым, API сразу возвращает `202 Accepted` и идентификатор задачи. Так работают следующие методы. - `POST /v1/campaigns` — создание. - `POST /v1/campaigns/{ad_id}/copy` — копирование. - `POST /v1/campaigns/bulk` — массовая пауза, возобновление показов, изменение бюджета или CPM и удаление. Изменения одной кампании через PATCH, пауза, возобновление, изменение бюджета и удаление возвращают результат сразу. ## Ответ HTTP 202 Пример ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` Пример ``` { "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} Пример ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` Опросите задачу до итогового статуса. Пока она находится в `pending` или `running`, сервер возвращает `Retry-After: 2`. Подождите две секунды перед следующим запросом. Читать задачу можно любым ключом её владельца. | поле | Значение | | --- | --- | | `type` | `create` , `copy` , `status` (бульк пауза / резюме), `budget` , `cpm` , `delete` | | `status` | Смотреть ниже | | `progress` / `total` | Кампании, обрабатываемые до сих пор / в целом | | `succeeded` / `failed` | Считается, когда-то известно | | `ad_ids` | кампании, созданные заданием (создание, копирование) или изменение (полковка) | | `errors[]` | до 50 неудач: `{ ad_id, index, error }` — `index` является местом в вашем диапазоне `campaigns` для создателей | | `paused_reason` | Почему задача перестала ждать, e.g . кабинет вышел из равновесия | | `error` | Почему все задание провалилось | ### Статусы задач | Статус | Значение | И финал ? | | --- | --- | --- | | `pending` | Куавед — кабинет выполняет одну создание, а другую операцию одновременно | Не | | `running` | В прогрессирующем | Не | | `paused` | остановился, чтобы ждать — обычно баланс кабинета вышел в середине пути. Вверх кабинет; рецидивируйте его с панели | Не | | `completed` | Проверьте `failed` и `errors` — выполненная задача может содержать индивидуальные неудачи | Да | | `failed` | Задача в целом провалилась — см. `error` | Да | | `cancelled` | Отменить с панели | Да | ## Как завершается создание кампаний - После создания последней кампании кабинет синхронизируется, и поле `ad_ids` заполняется идентификаторами новых кампаний. - Если не удалось создать первую кампанию пакета, задача останавливается. Исправьте входные данные и отправьте запрос повторно. - Если Telegram не нашёл ни одного указанного канала или бота, кампания завершится ошибкой `No targets found` со списком целей. - Telegram проверяет каждое новое объявление. Обычно оно получает статус `In Review`. Об изменении состояния может сообщить вебхук. [Webhook](/ru/docs/api/webhooks/) ## Пример опроса статуса Пример ``` 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)); } } ``` Пример ``` 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 Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. ## GET `/api/v1/tasks/{id}` Узнать ход задачи, идентификаторы кампаний и ошибки отдельных элементов. | Параметр | Где передать | Формат | Обязательный | | --- | --- | --- | --- | | `id` | path | `integer` | Да | | `X-API-Key` | header | `string` | Да | 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" } } ``` ## Примечания по интеграции ## Принято в обработку и завершено Создание, копирование и массовый запрос возвращают HTTP 202 с id задачи. Опросите GET /api/v1/tasks/{id} с учётом Retry-After. Даже при статусе completed проверьте failed и errors. ## Состояния задачи pending, running и paused — промежуточные состояния. completed, failed и cancelled — конечные. Используйте progress, total, ad_ids и до 50 поэлементных ошибок. paused_reason может указать на нехватку средств, которую оператор устраняет через панель. ## Операции и поля 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 ## Пример запроса GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Измерения отчёта API принимает до 100 кампаний на создание, до 100 копий за один запрос и до 1000 существующих кампаний на массовое изменение. Код 202 возвращает задачу из очереди. До изменения следующей группы проверьте failed и errors завершённой задачи. ## Справочник протокола | Метод | Путь запроса | Параметры | Содержимое запроса | Коды ответа | | --- | --- | --- | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## Поля и ограничения схемы · Отслеживание задачи в очереди | Поле | Значение по документации | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/tasks/) ## Task | Поле | Тип поля | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/openapi.yaml) ## По теме [Разбор ошибок API](/ru/docs/api/errors/)[Лимиты запросов и событий](/ru/docs/api/rate-limits/)[Повтор одной операции](/ru/docs/api/idempotency/)[Постраничное чтение кампаний](/ru/docs/api/pagination/) Дата обновления источника 2026-10-08 [Предыдущая тема**Повтор одной операции**](/ru/docs/api/idempotency/)[Следующая тема**Постраничное чтение кампаний**](/ru/docs/api/pagination/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Получение событий кампаний [Orbito Ads · Русский · HTML](https://orbitoads.pro/ru/docs/api/webhooks/) Источники проверены · 2026-11-27 ### Разделы документации [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Вся документация](/ru/docs/) Начало работы - [Начало работы с API](/ru/docs/api/) - [Ключи и права на кабинеты](/ru/docs/api/authentication/) - [Документация для ИИ-ассистента](/ru/docs/api/ai-assistants/) Основные понятия - [Разбор ошибок API](/ru/docs/api/errors/) - [Лимиты запросов и событий](/ru/docs/api/rate-limits/) - [Повтор одной операции](/ru/docs/api/idempotency/) - [Отслеживание задачи в очереди](/ru/docs/api/tasks/) - [Постраничное чтение кампаний](/ru/docs/api/pagination/) Справочник API - [Доступные рекламные кабинеты](/ru/docs/api/accounts/) - [Чтение данных кампании](/ru/docs/api/campaigns/) - [Создание кампаний и загрузка медиа](/ru/docs/api/create-campaigns/) - [Изменение существующих кампаний](/ru/docs/api/manage-campaigns/) - [Статистика кампаний и кабинетов](/ru/docs/api/stats/) - [Справочники таргетинга и группы](/ru/docs/api/targeting/) Интеграции - [Получение событий кампаний](/ru/docs/api/webhooks/) - [Передача подтверждённых конверсий](/ru/docs/api/conversions/) - [Версии и обновления API](/ru/docs/api/changelog/) Файлы и схемы - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ru/docs/llms.txt) - [llms-full.txt](/ru/docs/llms-full.txt) [Orbito Ads](/ru/) [Документация](/ru/docs/) [API](/ru/docs/api/) Справочник описывает status_change, hourly_digest и тестовый ping. Принимайте события по HTTPS, проверяйте подпись по исходному телу и обрабатывайте повторные доставки один раз. [Markdown](/ru/docs/api/webhooks.md) Чтобы получать события без опроса API, укажите Postback URL в карточке ключа в разделе «API и вебхуки». Для каждого доступного ключу кабинета Orbito отправляет события на этот адрес методом POST. Подпись запроса рассчитывается с отдельным секретом вебхука. ## События | событие | Когда | | --- | --- | | `status_change` | Статус кампании изменился (In Review → Active, Active → Stoped...).Послано после каждой синхронизации кабинета, и сразу же, когда кампании переключаются или отключаются в панели или через API. | | `hourly_digest` | При 5 минутах проходит каждый час, с количеством часов, которые только что закрыты — один POST на кабинет. | | `ping` | При нажатии **Тест** на ключ. | ### status_change Пример ``` { "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 Пример ``` { "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` входят до 200 кампаний с наибольшим расходом. Если изменения затронули больше кампаний, `truncated` показывает, сколько пропущено. Итоги в `totals` охватывают все кампании. Денежные показатели приведены в валюте кабинета. ## Заголовки HTTP Пример ``` 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= ``` ## Проверка подписи Соедините значение `X-Orbito-Timestamp`, точку и исходные байты тела запроса. Вычислите HMAC-SHA256 с секретом вебхука, который показывается при создании ключа или замене секрета. Проверяйте подпись до разбора JSON. Повторная сериализация меняет байты. Отклоняйте запросы старше пяти минут. ### Node.js (экспресс) Пример ``` 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 }); ``` ### Пайтон ( флаконы ) Пример ``` 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 ``` ## Доставка событий - Адрес вебхука должен быть доступен извне по HTTPS. HTTP, localhost и внутренние IP-адреса отклоняются. - Верните любой ответ 2xx в течение 10 секунд. Долгую обработку выполняйте после ответа. - При сетевой ошибке или 5xx сервис повторит доставку один раз через 750 мс с тем же `X-Orbito-Delivery`. После 4xx повторной попытки нет. - Сервис не переходит по перенаправлениям. - В карточке ключа видны время, статус и ошибка последней доставки. ## Доступные для вебхука кабинеты Ключ получает события только для доступных ему кабинетов. Участнику агентства приходят события из кабинетов, которыми с ним поделились. После отзыва доступа доставка по ним сразу прекращается. [Ключи и доступ](/ru/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## Тестовая отправка Нажмите «Тест» в карточке ключа. На адрес вебхука придёт событие `ping` с той же подписью, что у обычных событий. Пример ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## Справочник API Для полного рекламного API нужен выделенный ключ провайдера этого рабочего пространства. В запросах клиента используется API-ключ Orbito. Заказы, выдача кабинетов и внешние платежи обрабатываются отдельно. Пример · 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" } ] } ``` ## Примечания по интеграции ## События и подключение Задайте публичный HTTPS-адрес в настройках ключа провайдера. status_change сообщает об изменении статуса. hourly_digest приходит на 05-й минуте за активный час кабинета. ping проверяет доставку. Настройка выполняется отдельно от 22 HTTP-операций справочника. ## Подпись и повторная доставка Проверьте HMAC-SHA256 секретом вебхука по исходным байтам timestamp + точка + тело. Отклоняйте запрос старше пяти минут. Ответьте 2xx за десять секунд. После сетевой ошибки или 5xx одна повторная доставка через 750 мс придёт с тем же id. ## Операции и поля 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} ## Поля и ограничения схемы Таблица составлена по открытому контракту v1. Регистр в именах полей и параметров имеет значение. HTTP-коды каждой операции разделяют успешный ответ, проверки входных данных и доступа. Полные структуры запроса и ответа приведены в связанной спецификации. ## Период измерения · hourly_digest Вебхук hourly_digest охватывает завершившийся час и отправляется в пять минут следующего часа по каждому кабинету с трафиком. Сохраните границы периода, ID кабинета и доставки. В отчёте различайте время события и время получения сервером. ## Поля и ограничения схемы · Получение событий кампаний | Поле | Значение по документации | | --- | --- | | 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 | Источник · [Источник данных](https://adsly.pro/docs/api/webhooks/) ## По теме [Передача подтверждённых конверсий](/ru/docs/api/conversions/)[Версии и обновления API](/ru/docs/api/changelog/) Дата обновления источника 2026-10-08 [Предыдущая тема**Справочники таргетинга и группы**](/ru/docs/api/targeting/)[Следующая тема**Передача подтверждённых конверсий**](/ru/docs/api/conversions/) ## Источники и данные - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Referencia técnica [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) Documentación La referencia cubre acceso, campañas, estadísticas y eventos. Empieza consultando las cuentas visibles con una clave de lectura. [Ver el índice de documentación](/es/docs/llms.txt) [Claves de API](/api-keys?lang=en) Esta documentación explica cómo usar Orbito Ads desde tu aplicación. La API permite consultar estadísticas, crear campañas, cambiar pujas y textos, pausar o reactivar anuncios y mover presupuestos. La misma interfaz y una clave de API sirven para todas tus cuentas. ## API - [**Inicio Quickstart** clave, primera solicitud y su primera campaña a través de la API - Alrededor de cinco minutos.](/es/docs/api/) - [**Temas y acceso** Las claves de lectura y gestión de campañas, cuya publicidad cuenta con un alcance clave, equipos de agencia.](/es/docs/api/authentication/) - [**Creación de campañas** Canal, bot, búsqueda y alojamiento del público, una o cientos de campañas por llamada.](/es/docs/api/create-campaigns/) - [**Gestión de campañas** Edit, pausa y resume, mover el presupuesto, copiar, borrar — una campaña o mil.](/es/docs/api/manage-campaigns/) - [**Webhóks** Los cambios de estado firmados en tiempo real y una digestión estadística horaria.](/es/docs/api/webhooks/) - [**Construcción con un asistente de AI** Manda estos documentos a la empresa de codificación de la empresa o a un agente de codificação y deje que escriba la integración.](/es/docs/api/ai-assistants/) ## URL base y autenticación Ejemplo ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` Crea la clave en el panel: [API y Webhooks](/api-keys?lang=en) (Pro y Plan de Agencia). Las preguntas - [@orbitoads](https://t.me/orbitoads). ## Formatos legibles por máquinas - [OpenAPI 3.1 Específico](/docs/api/openapi.yaml) — cada punto final, parámetro y código de error. - [llms.txt](/docs/llms.txt) — el índice AI agentes leen; [llms-full.txt](/docs/llms-full.txt) — todas las páginas en un archivo. - Cada página tiene un gemelo Markdown: añadir `.md` a su camino, e.g . [/docs/api.md](/docs/api.md) . El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## Notas de implementación ## Conectar el espacio El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ### Guías de desarrollo y acceso a la cuenta **Primeros pasos con la API** Primeros pasos con la API — Consulta las cuentas con una clave en el servidor. Elige una, pide sus campañas y crea un borrador pausado con una clave de idempotencia nueva. [**Primeros pasos con la API**](/es/docs/api/) **Claves y permisos de cuenta** Claves y permisos de cuenta — Envía la clave desde el servidor en X-API-Key. Limita su alcance a una, varias o todas las cuentas permitidas. [**Claves y permisos de cuenta**](/es/docs/api/authentication/) **Crear campañas y medios** Crear campañas y medios — Una solicitud admite hasta 100 campañas de una cuenta. Elige canales, bots, búsqueda o audiencia y envía una clave de operación. [**Crear campañas y medios**](/es/docs/api/create-campaigns/) **Modificar campañas existentes** Modificar campañas existentes — La gestión abarca texto, enlaces, pujas, límites diarios, horarios, presupuesto y entrega. Un lote admite hasta 1.000 campañas. [**Modificar campañas existentes**](/es/docs/api/manage-campaigns/) **Recibir eventos de campaña** Recibir eventos de campaña — Se publican status_change, hourly_digest y ping de prueba. Recibe por HTTPS, valida la firma con el cuerpo original y elimina duplicados antes de procesar. [**Recibir eventos de campaña**](/es/docs/api/webhooks/) **Documentación para un asistente de IA** Documentación para un asistente de IA — Consulta los campos en OpenAPI y el comportamiento en Markdown. Guarda las claves en el entorno del servidor. [**Documentación para un asistente de IA**](/es/docs/api/ai-assistants/) [Gestionar claves API y webhooks](/api-keys?lang=en) ## Primera solicitud Envía GET /api/v1/account/info con X-API-Key. Elige un id de data y úsalo como account_id en la siguiente solicitud. Los datos e identificadores de ejemplo son ficticios. ## Operaciones y campos /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## Ejemplo de solicitud GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ### Recursos legibles por máquinas [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/es/docs/api.md) ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Documentación para desarrolladores | Campo | Valor documentado | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | Fuente · [Fuente de datos](https://adsly.pro/docs/) ## Cabinet | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Primeros pasos con la API](/es/docs/api/)[Claves y permisos de cuenta](/es/docs/api/authentication/)[Crear campañas y medios](/es/docs/api/create-campaigns/)[Modificar campañas existentes](/es/docs/api/manage-campaigns/)[Recibir eventos de campaña](/es/docs/api/webhooks/) [Tema siguiente**Primeros pasos con la API**](/es/docs/api/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Primeros pasos con la API [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) API Consulta las cuentas con una clave en el servidor. Elige una, pide sus campañas y crea un borrador pausado con una clave de idempotencia nueva. Consulta la tarea devuelta. [Markdown](/es/docs/api.md) La API de Orbito Ads te permite controlar tus cuentas de Telegram Ads desde tu aplicación con las mismas operaciones del panel. Una clave y una URL base sirven para cuentas Euro, TON y Stars. | Quieres... | Uso | | --- | --- | | Empuje campañas y estadísticas en un panel de control o BI | [Campañas](/es/docs/api/campaigns/), [Estados](/es/docs/api/stats/) | | Campañas de lanzamiento de un script, un bot o su CRM | [Creación de campañas](/es/docs/api/create-campaigns/) | | Aumentar las ofertas, los perdedores de pausa, superar los ganadores automáticamente | [Gestión de campañas](/es/docs/api/manage-campaigns/) | | Saber el momento en que una campaña es aprobada, rechazada o se agota del presupuesto | [Webhóks](/es/docs/api/webhooks/) | | Cuenta lidera y ventas de su rastreador contra cada campaña | [Conversiones](/es/docs/api/conversions/) | ## URL base Ejemplo ``` https://orbitoads.pro/api/v1 ``` Cada solicitud lleva su llave en el encabezado `X-API-Key`. Los cuerpos de solicitud y respuesta son JSON . Todas las veces son UTC . ## Inicio rápido ### 1. Crear una clave En el panel abrir **API y Webhooks** → **+ Nuevas claves** ( Pro y Agency planes). Elige qué armarios alcanza la clave. Para crear y cambiar campañas, marca **Permite gestionar campañas** — sin ella la clave sólo lee. Copia la clave: se muestra una vez. Ejemplo ``` export ORBITO_API_KEY="orb_…" ``` ### 2. Listar los armarios que la llave ve Ejemplo ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "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 } } ] } ``` Mantenga `id` — es el `account_id` cada otra llamada utiliza. Todo el dinero en un gabinete está en su `currency` . ### 3. Campañas de lectura Ejemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. Crear una campaña (switched off, por lo que no se gasta nada) Ejemplo ``` 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"] }' ``` Creando charlas a Telegram , por lo que funciona en el fondo. Consigue `202 Accepted` y una tarea: Ejemplo ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. Esperar la tarea Ejemplo ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` Cuando `status` es `completed` , `ad_ids` mantiene el id de la nueva campaña. Ahora usted puede financiarlo y encenderlo: Ejemplo ``` 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 revisa cada nuevo anuncio antes de que funcione; los `status` de la campaña muestran dónde está (ver [Estatutos](/es/docs/api/campaigns/#doc-note-statuses) ). Un [Webhook](/es/docs/api/webhooks/) le dice el momento en que cambia. ## Cinco reglas de integración 1. **`ad_id` Solo es único dentro de una cuenta publicitaria.** Telegram reutiliza ad ids a través de gabinetes. Almacene y busque campañas por el par `(account_id, ad_id)` , y pase `account_id` cada vez que una llave ve más de un armario. 2. **Envíe una `Idempotency-Key` Crear, copiar, en gran medida y en las llamadas presupuestarias** — una nueva UUID por operación, la misma cuando la retrata. Una retratición nunca crea una segunda campaña o mueve el dinero dos veces. Ver [impotencia](/es/docs/api/idempotency/) . 3. **Crear, copiar y devolver en gran parte una tarea.** Votación `GET /v1/tasks/{id}` hasta que termine. Ver [Tareas](/es/docs/api/tasks/) . 4. **Los campos de dinero son líneas** ( `"spent": "3.541000"` ) para mantener los decimales exactos. Parse ellos como decimal antes de hacer aritmética. 5. **La rama en `code`El show `error`.** Cada error tiene una máquina estable legible `code` y una sentencia humana en `error` . Ver [Errores](/es/docs/api/errors/) . ## Estructura de la respuesta Ejemplo ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## Siguientes pasos - [Temas y acceso](/es/docs/api/authentication/) — sólo lectura vs claves de gestión de campañas, equipos de agencia. - [Construcción con el Ayuntamiento de Cloud y otros asistentes de la AI](/es/docs/api/ai-assistants/) — que un agente de codificación escriba la integración. - [OpenAPI Específicas](/docs/api/openapi.yaml) — importar en Postman, Insomnia o un generador de clientes. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. Ejemplo · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` Ejemplo · 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 } } ] } ``` ## Notas de implementación ## Primera solicitud Envía GET /api/v1/account/info con X-API-Key. Elige un id de data y úsalo como account_id en la siguiente solicitud. Los datos e identificadores de ejemplo son ficticios. ## Identificadores de cuenta y campaña Guarda account_id y ad_id juntos. El mismo ad_id puede aparecer en varias cuentas. Incluye account_id para seleccionar el registro correcto con una clave de varias cuentas. ## Aceptación y finalización Crear, copiar y operar en lote devuelve HTTP 202 con un id. Consulta GET /api/v1/tasks/{id} respetando Retry-After. Revisa failed y errors incluso si el estado es completed. ## Operaciones y campos 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} ## Ejemplo de solicitud GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Primeros pasos con la API | Campo | Valor documentado | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | Fuente · [Fuente de datos](https://adsly.pro/docs/api/) ## CampaignStatus | Campo | Tipo de campo | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Documentación para desarrolladores](/es/docs/)[Claves y permisos de cuenta](/es/docs/api/authentication/)[Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Revisión de la referencia 2026-10-08 [Tema anterior**Documentación para desarrolladores**](/es/docs/)[Tema siguiente**Claves y permisos de cuenta**](/es/docs/api/authentication/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Cuentas publicitarias accesibles [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/accounts/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) La lista indica moneda, saldo, nivel de acceso y campos admitidos por cuenta. Guarda el account_id junto al identificador de campaña. [Markdown](/es/docs/api/accounts.md) Una cuenta de Orbito corresponde a una cuenta publicitaria de Telegram Ads. Cada campaña pertenece a una única cuenta, identificada por `account_id`. ## GET /v1/account/info Devuelve las cuentas a las que la clave tiene acceso en este momento. Ejemplo ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "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 } } ] } ``` | Campo | Significa | | --- | --- | | `id` | El `account_id` para pasar a otras llamadas. | | `cabinet_type` | `euro` , `ton` o `stars` . | | `currency` | `EUR` , `TON` o `STARS` — la moneda de **Cada uno** campo de dinero en este gabinete: saldo, presupuesto, gastado, CPM . Nunca añadir dinero a través de gabinetes de diferentes monedas. | | `access_level` | Su acceso: `owner` , `manager` (miembro interinstitucional que puede cambiar campañas) o `viewer` (institucional, solo lectura). Es necesario `owner` o `manager` . | | `balance` | Dinero en el gabinete, aún no dado a las campañas (cadena decimal). Refrescado cuando el gabinete sincroniza - ver `balance_updated_at` . | | `min_budget` | El más pequeño no cero `budget` una nueva campaña en este gabinete puede tener. | | `features.ad_button` | El formulario de anuncio del armario tiene un botón personalizado ( campo `button` en la creación/edita). | | `features.crypto_filters` | El formulario de anuncio del gabinete tiene filtros de criptocanal. | Las claves especiales de socios que muestran cifras ajustadas devuelven `null` en `balance`. ## Notas - `GET /v1/account/info` cuesta una solicitud de lectura — llámalo al inicio y cuando un escrito devuelve `ACCOUNT_NOT_FOUND` , no antes de cada llamada. - Un gabinete desaparece de la lista cuando se desactiva o su acceso a ella es eliminado. - Los gabinetes se añaden en el panel Orbito Ads; el API administra campañas dentro de ellos. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## GET `/api/v1/account/info` Lista las cuentas accesibles con sus monedas, límites y roles. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Sí | 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 } } ] } ``` ## Notas de implementación ## Saldos y monedas Revisa currency, balance_updated_at y min_budget por cuenta. En campañas, importes y tipos pueden ser cadenas decimales o null. Los agregados usan números. Separa EUR, TON y Stars. ## Disponibilidad de funciones features.ad_button indica si admite elegir botón y features.crypto_filters si hay filtros de canales cripto. Comprueba is_active y access_level antes de ofrecer acciones. ## Operaciones y campos GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## Ejemplo de solicitud GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Cuentas publicitarias accesibles | Campo | Valor documentado | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | Fuente · [Fuente de datos](https://adsly.pro/docs/api/accounts/) ## Cabinet | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Money | Campo | Tipo de campo | | --- | --- | | Money | string \| null | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Consultar una campaña](/es/docs/api/campaigns/)[Crear campañas y medios](/es/docs/api/create-campaigns/)[Modificar campañas existentes](/es/docs/api/manage-campaigns/)[Estadísticas de campañas y cuentas](/es/docs/api/stats/)[Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Revisión de la referencia 2026-10-08 [Tema anterior**Recorrer páginas de campañas**](/es/docs/api/pagination/)[Tema siguiente**Consultar una campaña**](/es/docs/api/campaigns/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Documentación para un asistente de IA [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/ai-assistants/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Consulta los campos en OpenAPI y el comportamiento en Markdown. Guarda las claves en el entorno del servidor. Prueba la lectura antes de activar cambios. [Markdown](/es/docs/api/ai-assistants.md) Estas páginas sirven tanto a desarrolladores como a asistentes de programación. Cada página está disponible en Markdown, hay una descarga con el conjunto completo y el contrato de la API se publica en OpenAPI. Da al asistente los enlaces que correspondan a la tarea. ## Archivos para agentes de IA | archivo | ¿Qué es | Cuándo utilizarlo | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | Índice de cada página, con resúmenes de una línea ( [El formato txt](https://llmstxt.org/) ) | Que el agente elija las páginas que necesita | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | Todas las páginas en un archivo de marcado (alrededor de 80 kB) | Herramientas que cargan un archivo grande entero; herramientas web-fetch pueden cortarlo corto, por lo que prefiere `llms.txt` + páginas allí | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec: endpoints, parameters, schemas, error codes | Clientes clasificados, validación de solicitudes, Postman | | `.md` | La página como Markdown, e.g . [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | Un solo tema | Cada página también tiene **Copiar la página como Markdown** en la parte superior, pegarlo directamente en un chat. ## Instrucción para integrar la API con Claude Code Pruebe esto en Claude Code (o otro agente de codificación) en el proyecto que debe hablar con Orbito Ads . Editar el último párrafo para decir lo que está construyendo. Ejemplo ``` Integra la API de Orbito Ads en este proyecto. Antes de escribir código, consulta https://orbitoads.pro/es/docs/llms.txt y las páginas Markdown relevantes. La documentación completa está en https://orbitoads.pro/es/docs/llms-full.txt y el contrato OpenAPI en https://orbitoads.pro/docs/api/openapi.yaml. - Usa https://orbitoads.pro/api/v1 y la cabecera X-API-Key. Lee ORBITO_API_KEY del entorno y mantén la clave fuera del código y de los registros. - Identifica la campaña por (account_id, ad_id). Un mismo ad_id puede aparecer en varias cuentas. - Para cada POST a /campaigns, /campaigns/bulk, /campaigns/{id}/copy o /campaigns/{id}/budget genera un UUID nuevo en Idempotency-Key. Reutiliza ese UUID al reintentar la misma operación. - Crear, copiar y ejecutar cambios masivos devuelve 202 con una tarea. Consulta GET /tasks/{id} respetando Retry-After hasta que el estado sea completed o failed. - Los importes se envían como cadenas decimales. Conviértelos a un tipo decimal antes de compararlos. - Tras un 429, espera el intervalo de Retry-After. Si una escritura devuelve 5xx, consulta la campaña con GET antes de repetirla con otro Idempotency-Key. - Usa code para decidir cómo gestionar un error y error para el mensaje que ve la persona usuaria. - Escribe un cliente pequeño con métodos tipados y pruebas que simulen las respuestas HTTP. Función solicitada: . ``` ## Instrucción para una tarea puntual en el chat Para una pregunta en lugar de un cambio de base de código ( Claude.ai , ChatGPT o cualquier chat con acceso web): Ejemplo ``` Lee https://orbitoads.pro/es/docs/llms.txt y sus páginas de campañas y estadísticas. Escribe un script de Python para la API de Orbito Ads que enumere todas mis campañas en estado Active y el gasto de cada una en los últimos 7 días. Ordénalas por gasto y lee la clave de ORBITO_API_KEY. ``` ## Reglas para el CLAUDE.md de tu proyecto Si su proyecto tiene un `CLAUDE.md` ( Claude Code lo lee al comienzo de cada sesión), agregue este bloque para que cada cambio futuro a la integración siga las mismas reglas: Ejemplo ``` ## Integración con la API de Orbito Ads - Antes de cambiar una llamada, consulta https://orbitoads.pro/es/docs/llms.txt, la página .md pertinente y https://orbitoads.pro/docs/api/openapi.yaml. Toma de la especificación los nombres de rutas y campos. - Lee ORBITO_API_KEY del entorno. Evita que aparezca en commits, en la consola o en los registros. - Identifica las campañas por (account_id, ad_id). Envía Idempotency-Key en cada POST que cree campañas o mueva fondos. Genera un UUID por operación y reutilízalo en los reintentos. - Al crear, copiar o realizar cambios masivos, consulta GET /v1/tasks/{id}. Centraliza los cambios de presupuesto, pausas y eliminaciones de campañas activas en un módulo con pruebas. Solicita autorización antes de ejecutar un script puntual en producción. ``` ## Permisos y seguridad del agente - **Desarrollar con una clave de lectura única.** El agente puede explorar datos reales y nada puede cambiar. Cambiar a una clave con **Gestión de campañas** sólo cuando se revisa el código de escritura. - **Crea campañas con `"active": false` y `"budget": 0` mientras se prueba.** Nada funciona y nada se gasta; eliminarlos después. - **Reducir el alcance de la clave** a un gabinete de prueba mientras la integración es nueva. - **Deja que el agente lea los errores.** Cada error dice qué arreglar ( `error` ) y lleva un estable `code` y el `param` que estaba equivocado - los agentes fijan sus propias peticiones de éstos sin adivinar. - Todo lo que los cambios API muestran en la historia de la campaña del panel marcaron **🔌 API** , por lo que puede revisar lo que hizo el agente. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. Ejemplo · 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' ``` ## Notas de implementación ## Claves y permisos de cuenta Guarda X-API-Key en el servidor. Para informes basta lectura. Los cambios requieren gestión de campañas, rol de propietario o gestor en esa cuenta y plan activo con la función habilitada. ## Un encargo reproducible Entrega el contrato OpenAPI, un id ficticio, la operación, respuesta esperada y prueba de reintento. El servidor obtiene la clave real de su almacén de secretos. Para informes empieza por cuentas y campañas. ## Operaciones y campos /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 ## Ejemplo de solicitud GET /docs/api/openapi.yaml ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Documentación para un asistente de IA | Campo | Valor documentado | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | Fuente · [Fuente de datos](https://adsly.pro/docs/api/ai-assistants/) ## Lecturas relacionadas [Documentación para desarrolladores](/es/docs/)[Primeros pasos con la API](/es/docs/api/)[Claves y permisos de cuenta](/es/docs/api/authentication/) Revisión de la referencia 2026-10-08 [Tema anterior**Claves y permisos de cuenta**](/es/docs/api/authentication/)[Tema siguiente**Interpretar errores de la API**](/es/docs/api/errors/) ## Fuentes y datos - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Claves y permisos de cuenta [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/authentication/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Envía la clave desde el servidor en X-API-Key. Limita su alcance a una, varias o todas las cuentas permitidas. Para escribir se requieren permiso de gestión en la clave y rol de gestor o titular. [Markdown](/es/docs/api/authentication.md) ## Enviar la clave Envía la clave en una cabecera HTTP en cada solicitud. Ejemplo ``` X-API-Key: orb_0f3c… (68 caracteres: orb_ seguido de 64 dígitos hexadecimales) ``` La propia clave autentica la solicitud. No hay flujo OAuth ni intercambio de tokens. Guárdala en el servidor y evita incluirla en aplicaciones web o móviles. ## Obtener una clave En el panel, abre «API y webhooks» y pulsa «Nueva clave». Pro y Agency permiten hasta 5 claves activas por persona. Copia la clave al crearla: solo se muestra una vez y el servicio guarda únicamente su hash SHA-256. Si la pierdes, revócala y genera otra. ## Permisos de la clave | Permiso | Cómo lo consigues | Lo que permite | | --- | --- | --- | | **Lea** | Cada clave | campañas, estadísticas, conversiones, tareas, códigos de selección, webhooks, envío de conversiones a nosotros | | **Gestión de campañas** | marca **Permite gestionar campañas** cuando creas la llave, o enciendela más tarde en la tarjeta de la llave | todo en Leer, más crear, editar, pausa/resumir, presupuesto, copiar, acciones a granel, eliminar, subir los medios | Una clave de lectura recibe `403 READ_ONLY_KEY` si intenta escribir. Úsala para informes y paneles. Reserva el permiso de gestión para aplicaciones autorizadas a cambiar campañas. Con ambas clases de clave el presupuesto solo se mueve entre el saldo de la cuenta y sus campañas. Ninguna permite retirar fondos. Al escribir se comprueban el plan Pro o Agency activo en ese momento y los permisos de la función en el panel. Si el plan no permite la operación, la API devuelve `403 FEATURE_NOT_AVAILABLE`. ## Cuentas a las que da acceso la clave Al crear la clave, elige a qué cuentas puede acceder. | Ámbito | La llave alcanza | | --- | --- | | Todos mis armarios (por defecto) | cada armario que se puede abrir en el panel, incluyendo los añadidos más tarde | | Varias | los armarios que cosquillaste | | Una cuenta de publicidad | que el armario sólo | El alcance sólo **Cancilleros** lo que se puede abrir en el panel — nunca lo ensancha. Se vuelve a comprobar en cada solicitud: cuando usted pierde acceso a un gabinete, sus llaves lo pierden en el mismo momento. `GET /v1/account/info` siempre lista exactamente lo que la clave alcanza ahora mismo. Si una operación afecta a una cuenta y la clave tiene acceso a varias, incluye `account_id`. Si falta, la API responde con `400 ACCOUNT_ID_REQUIRED`. ## Acceso de agencias y equipos API acceso sigue el acceso que tiene en el panel, armario por gabinete: | ¿Quiénes son | Gabinetes tu llave alcanza | Puede gestionar las campañas en | | --- | --- | --- | | Propietario de la cuenta (usuario ordinario) | sus propios armarios | Todos los | | Agency propietario | sus gabinetes personales y de agencia | Todos los | | Agency miembro del equipo | los gabinetes que la agencia compartió con usted | armarios compartidos con **Gestión** acceso; **Vistas** gabinetes permanecen solo lectura | - Los miembros del equipo crean sus propias llaves en su propia página **API y Webhooks** . El plan de la agencia las cubre. - El propietario de la agencia ve cada clave que el equipo creó bajo **API Webhooks y las claves del equipo** —cuyo es, si puede gestionar campañas, cuántos gabinetes alcanza, cuando fue usado por última vez— y puede revocar cualquiera de ellos. - `GET /v1/account/info` devuelve `access_level` para cada gabinete: `owner` , `manager` o `viewer` . Un escriba a un gabinete `viewer` devuelve `403 VIEW_ONLY_ACCESS` . - Si el propietario retira a un miembro, los baja a Viewer, o el plan de agencia termina, las llaves del miembro siguen inmediatamente — nada que revocar a mano. Lo que significan los roles en el panel: **Gestión** — gestión de campaña completa en ese gabinete; **Vistas** — campañas y estadísticas solamente. El propietario también puede permitir que un miembro añadir gabinetes, invitar compañeros de equipo o compartir sus propios gabinetes (nunca por encima de su propio nivel). ## Revocar y rotar claves - **Revocación** una llave en su tarjeta en el panel. Deja de funcionar inmediatamente. - **Rotación** = crear una nueva llave, desplegarla, luego revocar la vieja. Dos claves pueden estar activas de inmediato, por lo que no hay tiempo de inactividad. - El **Webhook Secreción** (para verificar [Webhooks](/es/docs/api/webhooks/) ) está separado de la llave y se puede girar por su cuenta. ## Almacenamiento seguro de claves - Una llave por integración, para que puedas revocar una sin romper las otras. - Almacene las claves en variables ambientales o un gestor secreto. Nunca las comprometa, nunca las pegue en chats o entradas. - Preferir claves de sólo lectura; añadir **Gestión de campañas** solamente donde el código cambia las campañas. - Reducir el alcance a los gabinetes necesita una integración. - Si una clave puede haber filtrado, revocarla primero e investigar segundo. Cada cambio realizado a través del API aparece en la historia de la campaña en el panel marcado **🔌 API** . ## Errores de autenticación | HTTP | `code` | Significa | | --- | --- | --- | | 401 | `API_KEY_MISSING` | no `X-API-Key` cabecera | | 401 | `API_KEY_INVALID` | incorrecta, revocada o caducada clave | | 401 | `NO_ACCOUNTS` | la llave no alcanza ningún gabinete activo ahora mismo | | 403 | `READ_ONLY_KEY` | una escritura con una clave que no tiene Administrar campañas | | 403 | `VIEW_ONLY_ACCESS` | a escribir a un gabinete compartido con usted como Visor | | 403 | `FEATURE_NOT_AVAILABLE` | el plan no incluye esta acción | | 403 | `WRITE_NOT_ALLOWED` | este tipo de clave (publicado por Orbito Ads para socios) no puede escribir | Consulta el catálogo completo de códigos en «[Errores](/es/docs/api/errors/) de la API». El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## Notas de implementación ## Conectar el espacio El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## Claves y permisos de cuenta Guarda X-API-Key en el servidor. Para informes basta lectura. Los cambios requieren gestión de campañas, rol de propietario o gestor en esa cuenta y plan activo con la función habilitada. Resultados y campos de respuesta | API | HTTP | Significado | | --- | --- | --- | | API_KEY_MISSING | 401 | Pasa la clave en la cabecera X-API-Key. | | API_KEY_INVALID | 401 | La clave es incorrecta, ha caducado o fue revocada. | | NO_ACCOUNTS | 401 | La clave no tiene acceso a ninguna cuenta publicitaria activa. | | READ_ONLY_KEY | 403 | La clave permite lectura. Para modificar campañas se necesita permiso de gestión. | | VIEW_ONLY_ACCESS | 403 | El rol Viewer permite consultar la cuenta. Para cambiarla se requiere escritura. | | FEATURE_NOT_AVAILABLE | 403 | El plan actual no incluye la operación. | | WRITE_NOT_ALLOWED | 403 | El tipo de clave que el proveedor entrega a socios no permite escritura. | [Interpretar errores de la API](/es/docs/api/errors/) ## Alcance y revocación Una clave del proveedor abarca una, varias o todas las cuentas autorizadas. Se comprueba en cada llamada. Los planes admitidos permiten cinco claves activas por persona. Revoca las claves perdidas y rota el secreto del webhook por separado. ## Operaciones y campos X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## Ejemplo de solicitud GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Claves y permisos de cuenta | Campo | Valor documentado | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | Fuente · [Fuente de datos](https://adsly.pro/docs/api/authentication/) ## Cabinet | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Documentación para desarrolladores](/es/docs/)[Primeros pasos con la API](/es/docs/api/)[Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Revisión de la referencia 2026-10-08 [Tema anterior**Primeros pasos con la API**](/es/docs/api/)[Tema siguiente**Documentación para un asistente de IA**](/es/docs/api/ai-assistants/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Consultar una campaña [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/campaigns/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Filtra por estado y destino o consulta una campaña y su historial. Usa juntos account_id y ad_id, pues el ID de anuncio se puede repetir en cuentas distintas. [Markdown](/es/docs/api/campaigns.md) En la API, una campaña representa un anuncio de Telegram. Identifícala por `(account_id, ad_id)`. Telegram reutiliza `ad_id` en cuentas distintas. ## Campos del objeto de campaña `GET /v1/campaigns/{ad_id}` devuelve: Ejemplo ``` { "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" } ``` | Campo | Significa | | --- | --- | | `title` | Su nombre interno para el anuncio. | | `text` | El mensaje que la gente ve. | | `status` | Lo que Telegram está haciendo con el anuncio — ver [Estatutos](/es/docs/api/campaigns/#doc-note-statuses) . | | `active` | Lo que usted pidió: `true` = debe correr. Una campaña con `active: true` y el estado `Stopped` se reanudará tan pronto como tenga presupuesto de nuevo. | | `promote_url` / `tme_path` | Lo que el anuncio conduce a: un sitio web URL , o un enlace `t.me/` (canal, bot, mini-app, post). | | `target_type` | `channels`, `bots` , `search` o `users` — ver [Creación de campañas](/es/docs/api/create-campaigns/) . | | `targets` | Nombres de usuario los objetivos de anuncio (canallas o bots), cuando se sabe. | | `cpm` | Bid por 1.000 puntos de vista, en la moneda del gabinete. | | `budget` | Dinero **La izquierdas** en la campaña. `budget + spent` es todo lo que se dio. | | `spent` | Dinero gastado hasta ahora. | | `daily_budget` | Gorra de gasto diario, si se establece uno. | | `views`, `clicks`, `actions`, `opens` | Los contadores de tiempo de vida. `actions` son acciones de plataforma (comidas, bot comienza) — no sus conversiones; para los que ven [Conversiones](/es/docs/api/conversions/) . | | `ctr`, `cvr` | Porcentajes: `"1.15"` significa 1,15 %. | | `cpc`, `cpa` | Costo por clic y por acción. | | `views_per_user` | Cuantas veces una persona puede ver el anuncio (1–4). | | `schedule` | Días de semana y horas se muestra el anuncio, o `null` — corre alrededor del reloj. Ver [Calendario](/es/docs/api/manage-campaigns/#doc-note-schedule) . | | `group_id` | El grupo de la campaña en el panel, si lo hay. | | `auto_cpm_enabled` | Orbito Ads ’s Auto CPM gestiona la oferta. | | `date` | Cuando se creó el anuncio: unix segundos, como cadena. | | `status_changed_at` | Cambio de estado. No tocado por las actualizaciones de estadísticas — bueno para “lo que cambió desde”. | | `synced_at` | Cuando los ajustes propios del anuncio — `schedule` , `text` , `views_per_user` , segmentación — fueron leídos por última vez desde Telegram . Véase [Fría](/es/docs/api/campaigns/#doc-heading-freshness) . | **Los campos de dinero son las líneas decimales** (`cpm`, `budget`, `spent`, `ctr`, `cvr`, `cpc`, `cpa`Los decimales permanecen exactos. Los contadores (`views`, `clicks`, `actions`, `opens`Son números . Todos los fondos están en la moneda de la cuenta de publicidad (ver [Cuentas de publicidad](/es/docs/api/accounts/)). ## Estados | Estatuto | Significa | ¿Qué puedes hacer? | | --- | --- | --- | | `Active` | Corrida → | Pausa, cambio de oferta, añadir presupuesto. | | `In Review` | Esperando la revisión de Telegram ; no se muestra todavía. | Espera — un Webhook te dice cuando cambia. | | `Declined` | Telegram rechazó el anuncio. | Editar el texto o enlace (resubmitir), o crear uno nuevo. | | `On Hold` | Apagó —por usted o una regla de automatización. | El resumen. | | `Stopped` | Presupuesto utilizado. | Añadir presupuesto; se ejecuta de nuevo si `active` es `true` . | | `Paused` | Pausa por Telegram para todo el gabinete (rare). | Contacto [@orbitoads](https://t.me/orbitoads) . | | `Deleted` | Quitado en la historia, escondido de las listas. | — | ## GET /v1/campaigns Campañas de cada gabinete la llave alcanza. Ejemplo ``` 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" ``` | Parámetros | Definición | Significa | | --- | --- | --- | | `account_id` | — | Sólo este gabinete. ( `accountId` también funciona.) | | `status` | todos menos suprimidos | Un estado o varios, separados por coma. | | `title` | — | El título contiene este texto. | | `bot_username` | — | Ads of one bot or channel: match the username in `tme_path` , case-insensible, no `@` . `foo` no coincide con `foobar` . | | `promote_domain` | — | Anuncios de sitios web cuyo enlace está en este host. Acepta `example.com` o un total URL ; `www.` , esquema, camino y puerto son ignorados. | | `promote_domain_mode` | `exact` | `suffix` también coincide con subdominios ( `x.example.com` ). | | `type` | — | `bot` (bots y mini-apps), `channel` (canales, grupos, puestos) o `site` (sitios web externos). | | `limit` | 100 | 1–500. | | `cursor` | — | Pagination — ver [Paginación](/es/docs/api/pagination/) . Recomendado. | | `offset`, `sortBy`, `sortOrder` | — | Página de inicio (≤ 500 por armario). | Los filtros se combinan con AND . Un bot desconocido o dominio devuelve una lista vacía, no un error. Ejemplo ``` { "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 } } ``` ## Obtener una campaña `GET /v1/campaigns/{ad_id}` — el objeto completo arriba, incluyendo el objetivo, campos creativos y `schedule` (el punto final de la lista deja a los que se quedan rápidos). Las campañas eliminadas también se devuelven, con `status: "Deleted"` . Ejemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id` sólo se necesita cuando el mismo `ad_id` existe en varios de sus armarios ( `400 ACCOUNT_ID_REQUIRED` le dice). ### Fría Las contrataciones y el estado se refrescan para cada campaña cada hora. Los ajustes propios del anuncio — `schedule`, `text` , `views_per_user` , segmentación — provienen de leer el anuncio en sí mismo, por lo que: - `GET /v1/campaigns/{ad_id}` vuelve a leer el anuncio de Telegram cuando nuestra copia es mayor que **5 minutos** , antes de responder. Un cambio de alguien hecho directamente en la interfaz de anuncio de Telegram aparece aquí dentro de esa ventana. - Las campañas de ejecución ( `Active`, `In Review` , `On Hold` ) también son releídas en el fondo sobre cada 3 horas. - Los cambios realizados a través de Orbito Ads —el panel o este API— están en la copia inmediatamente. Si Telegram no responde a tiempo, usted obtiene la copia almacenada; `synced_at` le dice lo viejo que es. ## GET /v1/campaigns/{ad_id}/history Los totales de una campaña durante un período —un único agregado, no puntos por hora. Ejemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "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` (por defecto), `7d` , `30d` o `custom` con `startDate` / `endDate` ( `YYYY-MM-DD` , UTC ) y opcional `startHour` / `endHour` (0–23). No hay datos para el período → `404 NOT_FOUND` . ## Sincronizar una copia local 1. Page through `GET /v1/campaigns?cursor=` and upsert by `(account_id, ad_id)` . 2. Suscríbete a [Webhooks](/es/docs/api/webhooks/) para los cambios de estado y las estadísticas por hora en lugar de encuestar cada minuto. 3. Re-sinc totalmente una vez al día para atrapar cualquier cosa que un Webhook perdió. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## GET `/api/v1/campaigns` Obtiene campañas filtradas por páginas. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `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` | Sí | 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}` Consulta una campaña con segmentación, creatividad y horario. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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` Obtiene los totales de una campaña para un intervalo de fechas u horas. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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" } } ``` ## Notas de implementación ## Identificadores de cuenta y campaña Guarda account_id y ad_id juntos. El mismo ad_id puede aparecer en varias cuentas. Incluye account_id para seleccionar el registro correcto con una clave de varias cuentas. ## Filtros y estado Los filtros se combinan con AND y status admite valores separados por coma. La lista omite Deleted por defecto, el detalle puede devolverlo. active guarda la intención de entrega y status la decisión de la plataforma. ## Operaciones y campos 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 ## Ejemplo de solicitud GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Consultar una campaña | Campo | Valor documentado | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | Campo | Tipo de campo | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Cuentas publicitarias accesibles](/es/docs/api/accounts/)[Crear campañas y medios](/es/docs/api/create-campaigns/)[Modificar campañas existentes](/es/docs/api/manage-campaigns/)[Estadísticas de campañas y cuentas](/es/docs/api/stats/)[Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Revisión de la referencia 2026-10-08 [Tema anterior**Cuentas publicitarias accesibles**](/es/docs/api/accounts/)[Tema siguiente**Crear campañas y medios**](/es/docs/api/create-campaigns/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Versiones y cambios de la API [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/changelog/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) La versión va en la ruta. El cliente debe admitir campos adicionales y valores de enumeración nuevos. En octubre de 2026 se añadieron horarios, operaciones y totales por periodo. [Markdown](/es/docs/api/changelog.md) ## Versiones de la API La versión está en el camino: `/api/v1` . Dentro de `v1` sólo hacemos **Adicción** cambios: | Aditivo (puede suceder en cualquier momento) | Breaking (sólo en una nueva versión) | | --- | --- | | nuevos endpoints | eliminar o renombrar un punto final o campo | | nuevos campos de solicitud opcional | un nuevo campo requerido | | nuevas esferas de respuesta | cambiar el tipo o significado de un campo | | nuevos valores en enums ( `status` , error `code` ) | eliminación de un valor enum | | nuevos códigos de error | invalidando una solicitud válida | Así que escriba a los clientes que **Descuidando los campos que no conocen** y **- Manejo de valores enum desconocidos y códigos de error** con gracia. Un cambio de ruptura enviaría como `/api/v2` , anunció aquí primero, con `v1` seguía corriendo junto a él. ## Historial de cambios ### 2026-10-26 — totales del período - **Nuevas →** cada `topCampaigns` hileras de [`GET /v1/stats/analytics`](/es/docs/api/stats/#doc-note-get-v1statsanalytics) lleva `cpm` — gastar por 1.000 puntos de vista durante el período — junto a `cpc` y `cpa`. - **Fijo de:** una ventana de uno o dos días ahora se suma exactamente a los mismos días solicitados como un rango. Los primeros minutos después de la medianoche ( UTC ) solían dejarse de tales ventanas, por lo que un solo día volvió alrededor del 1–2% bajo; rangos de tres días y más ya eran correctos y no cambian. - **Fijo de:** una ventana de hasta dos días que comienza más de 29 días atrás devuelto ceros; ahora vuelve los números de ese día. ### 2026-10-08 — calendario de anuncios - **Nuevas → `schedule`** — mostrar una campaña sólo los días de semana y horas escogidos. Ponla en la creación, `PATCH /v1/campaigns/{ad_id}` , copia, o muchas campañas a la vez con la acción masiva **set_schedule** ; `null` lo elimina. `GET /v1/campaigns/{ad_id}` lo devuelve. Formato: [Calendario](/es/docs/api/manage-campaigns/#doc-note-schedule) . No cambia la campaña encendido o apagado. - Pausing, resumir y editar una campaña mantiene su agenda; copias y campañas recreativas la heredan. - **Fijo de:** `PATCH /v1/campaigns/{ad_id}` con sólo `cpm` , `active` y/o `schedule` envió la campaña de vuelta a la revisión de Telegram . Estos ahora pasan por los formularios de oferta y estatus propios de Telegram y nunca desencadenan una revisión; otros campos todavía hacen ( Telegram ’ s regla) — ver [Edit](/es/docs/api/manage-campaigns/#doc-note-edit) . - **Fijo de:** establecer un calendario en una campaña sin presupuesto podría enviarlo de vuelta a revisar. Tal campaña ahora responde `400` con `param: "schedule"` y se deja sin tocar — añadir el presupuesto primero, a continuación, establecer el calendario. - **`GET /v1/campaigns/{ad_id}` En la actualidad:** re-lea el anuncio de Telegram cuando la copia es mayor de 5 minutos, por lo que `schedule`, `text` y `views_per_user` Los cambios que se han hecho en el Telegram. Nuevos campos **`synced_at`** Dice cuando el anuncio fue la última lectura. Ver [Fría](/es/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08 — gestión de campañas - **Nueva: escribir acceso.** Los cables pueden llevar **Gestión de campañas** : `POST /v1/campaigns` (create, hasta 100 por llamada), `PATCH /v1/campaigns/{ad_id}`, `POST …/pause`, `…/resume`, `…/budget`, `…/copy`, `POST /v1/campaigns/bulk`, `DELETE /v1/campaigns/{ad_id}`, `POST /v1/media`. Las claves existentes permanecen sólo leídas hasta que la desactives. - **Los nuevos lectores:** `GET /v1/campaigns/{ad_id}` (una campaña con objetivos), `GET /v1/tasks/{id}` , `GET /v1/groups` , `GET /v1/targeting` . - **Miembros de la agencia** puede crear claves; una llave alcanza los gabinetes compartidos con el miembro, a su nivel de acceso. El propietario de la agencia ve todas las claves del equipo ( API & Webhooks → Las llaves del equipo) y puede revocarlas. - **Idempotency-Key** requeridas para crear, copiar, a granel y presupuesto. - **Limitación de la tasa de escritura:** 30 solicitudes por minuto, aparte de las 60 lecturas. - **`GET /v1/account/info`** Adidas `access_level`, `currency`, `balance`, `balance_updated_at`, `min_budget`, `features`. - **Errores** añadir `code` y `request_id` junto al texto sin cambios `error`. Un `500` ya no incluye texto de error interno. - `account_id` se acepta en todas partes `accountId` fue (tanto trabajo). - **Fijo de:** `GET /v1/stats?period=all` devuelto costo por clic como `cpa` ; ahora es costo por acción, como cada otro período. ### 2026-10-04 - URL filtros se aplican a ambos laudos web; `status_change` sólo alcanza las claves cuyo propietario puede ver el gabinete. ### 2026-09-18 - Las conversiones obtienen su propio presupuesto (20 eventos/s) aparte del límite de lectura; lotes de hasta 1.000 eventos. ### 2026-06-30 - Conversiones de entrada: `POST /v1/postback`, `GET /v1/ingest/{token}` , `GET /v1/conversions` . ### Antes - `GET /v1/campaigns` con paginación del cursor y los filtros `bot_username` , `promote_domain` y `type`; Estadísticas endpoints; `status_change` y `hourly_digest` webhooks. El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## Notas de implementación ## Rutas versionadas El contrato actual usa /api/v1. Cambios aditivos pueden incorporar campos opcionales, operaciones, valores y errores. Conserva estados desconocidos e ignora campos de respuesta sin uso. ## Cambios que conviene seguir El esquema incluye horarios semanales, escritura por cuenta y CPM en topCampaigns. Cambiar un tipo, eliminar un campo o exigir un nuevo dato de entrada requiere una nueva versión. ## Operaciones y campos /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 ## Ejemplo de solicitud GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Versiones y cambios de la API | Campo | Valor documentado | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/changelog/) ## Lecturas relacionadas [Recibir eventos de campaña](/es/docs/api/webhooks/)[Enviar conversiones confirmadas](/es/docs/api/conversions/) Revisión de la referencia 2026-10-26 [Tema anterior**Enviar conversiones confirmadas**](/es/docs/api/conversions/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Enviar conversiones confirmadas [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/conversions/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Envía desde servidor o tracker la referencia de campaña o enlace de invitación, evento e ID único de transacción. Los campos de importe y moneda permiten relacionar ingresos con gasto. [Markdown](/es/docs/api/conversions.md) Telegram cuenta impresiones, clics e incorporaciones. Tu servidor o rastreador conoce lo que ocurre después, como un registro, un depósito o una venta. Envía estos eventos a Orbito Ads para ver las conversiones e ingresos de cada campaña en el panel, los informes y las reglas automáticas. ## Activar el seguimiento de conversiones En la tarjeta de la llave en el panel, encienda **Recuperación de postbacks** . Sin ella, envía devoluciones `403 INGEST_DISABLED` . Para un rastreador, también pulse **Descargar URL de Tracker** — usted consigue un solo escrito URL (mostrado una vez) que puede publicar conversiones pero no puede leer nada. ## Cómo se atribuye una conversión a su campaña Cada anuncio vincula en algún lugar con un identificador que controla: - a bot o mini-app: `t.me/yourbot?start=REF` o `?startapp=REF` - un sitio web: el clic de su rastreador id o sub id en el enlace, e.g . `https://site.com/?subid=REF` Cuando envías una conversión, incluye que `REF` como `ref` . Orbito Ads encuentra la campaña cuyo enlace lo lleva, en los gabinetes la llave alcanza. Si varias campañas de un gabinete comparten el mismo `ref` , la conversión cuenta para cada uno de ellos. ## Desde tu servidor · POST /v1/postback Ejemplo ``` 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" }' ``` Ejemplo ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` Hasta 1.000 eventos a la vez: `{ "events": [ {…}, {…} ] }` (o una matriz desnuda).La respuesta reporta cada uno — `{ "accepted": 998, "failed": 2, "results": [ … ] }` — por lo que un mal evento nunca hunde el lote. ## Desde un rastreador · GET /v1/ingest/{token} Pegue el rastreador URL en la configuración de postback de su rastreador, con sus macros: Ejemplo ``` # 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} ``` Compruebe los nombres macro contra la propia documentación de su rastreador. La respuesta es texto simple: `OK` , `OK (deduped)` , o un mensaje de error con su estado HTTP (4xx — don't retry, 5xx — retry). ## Campos | Campo | También se acepta como | Requisitos | Significa | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | YES1 | El identificador del enlace del anuncio. Hasta 512 caracteres. | | `invite_link` | `invitelink`, `link` | YES1 | Para los anuncios de canales: el enlace de invitación único Orbito Ads creado. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | Sí | Se convierte en `lead`, `conversion` o `purchase` (palabras como `signup`, `ftd` , `deposit`, `sale` se entienden). Se rechazan palabras desconocidas. | | `txid` | `tid`, `transaction_id` , `order_id` , `rdtk_event_id` , cabecera `X-Idempotency-Key` | Sí | Su id para este evento. Enviar el mismo `txid` de nuevo actualiza el evento en lugar de contarlo dos veces. Hasta 128 caracteres. | | `amount` | `payout`, `sum`, `revenue`, `value` | No | Número; negativo para los contrapesos. | | `currency` | `cur`, `cnv_currency` | No | ISO 4217 código. Sin uno, se registra una cantidad como USD . | | `status` | — | No | La propia palabra de estado de su red (aprobado, pendiente...), almacenada como está. | | `event_time` | `timestamp`, `date` | No | ISO o unix time; mantenido dentro de los últimos 90 días. | | `account_id` | `accountId` | A veces | Necesitado cuando el mismo `ref` existe en varios de sus gabinetes (`409` de lo contrario). | | `meta` | — | No | Su propio objeto JSON, hasta 4 KB . | 1 `ref` o `invite_link` . ## Límites y reintentos 20 eventos por segundo por clave, con ráfagas de hasta 1.000 — aparte de los presupuestos leídos y escritos. En `429` esperar `Retry-After` ; retratar siempre es seguro porque `txid` deduplica. ## GET /v1/conversions Totales por campaña, contados una vez por evento: Ejemplo ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | Parámetros | Significa | | --- | --- | | `adId` | Una campaña. | | `days` | Sólo los eventos recibidos en los últimos 1-365 días. | - `revenue` es por moneda: las cantidades nunca se convierten. - `ad_id` es `null` para eventos coinciden con un `ref` que varias campañas comparten. - Cantidades que envías son tus propios informes. No se facturan y no cambian nada que pagues Orbito Ads . ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## POST `/api/v1/postback` Envía una conversión o hasta 1000 eventos en lote. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Sí | 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 } } ``` ### Esquema del cuerpo 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}` Envía una conversión del rastreador por una URL de solo escritura. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `token` | path | `string` | Sí | | `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` Consulta conversiones e ingresos por moneda original. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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 } } ] } ``` ## Notas de implementación ## Vincular un evento a un anuncio Activa la recepción en la clave del proveedor. Envía ref o invite_link, event y un txid estable. Los eventos canónicos son lead, conversion y purchase. Incluye account_id si la referencia coincide en varias cuentas. Resultados y campos de respuesta | API | Significado | | --- | --- | | account_id / accountId | accountId es un alias de account_id. Identifica la cuenta si el mismo ref aparece en varias cuentas. Una coincidencia ambigua devuelve HTTP 409. | ## Duplicados y moneda Repetir txid actualiza el evento. Un lote puede tener éxitos y fallos. Indica moneda ISO para ingresos, por defecto USD. Un importe negativo representa un contracargo. La URL del rastreador es de escritura y responde OK u OK (deduped) en texto. ## Operaciones y campos 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 ## Ejemplo de solicitud GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Enviar conversiones confirmadas | Campo | Valor documentado | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | Campo | Tipo de campo | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | Campo | Tipo de campo | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Recibir eventos de campaña](/es/docs/api/webhooks/)[Versiones y cambios de la API](/es/docs/api/changelog/) Revisión de la referencia 2026-10-08 [Tema anterior**Recibir eventos de campaña**](/es/docs/api/webhooks/)[Tema siguiente**Versiones y cambios de la API**](/es/docs/api/changelog/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Crear campañas y medios [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/create-campaigns/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Una solicitud admite hasta 100 campañas de una cuenta. Elige canales, bots, búsqueda o audiencia y envía una clave de operación. Carga los medios antes y sigue la tarea devuelta. [Markdown](/es/docs/api/create-campaigns.md) `POST /v1/campaigns` crea campañas en una cuenta. Requiere una clave con permiso de gestión y la cabecera `Idempotency-Key`. La respuesta `202` contiene una [tarea](/es/docs/api/tasks/). Las campañas aparecen cuando esta finaliza. ## Ejemplo de creación de una campaña Ejemplo ``` 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"] }' ``` Ejemplo ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## Creación por lotes Poner las campañas en `campaigns` (hasta 100). `account_id` y los campos del grupo permanecen en el nivel superior y se aplican a todos ellos. Ejemplo ``` { "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"] } ] } ``` Las campañas se crean una tras otra. Si el primero falla, la tarea se detiene — soluciona la entrada en lugar de repetir el mismo error 100 veces. Cada fallo se enumera en el `errors` de la tarea con su `index` en su matriz. ## Campos | Campo | Requisitos | Significa | | --- | --- | --- | | `title` | Sí | Nombre interno, mostrado en el panel. | | `text` | Sí | La gente del texto de anuncio ve. Se aplican reglas de longitud y contenido propias de Telegram ; una negativa vuelve en la tarea de `errors` . | | `promote_url` | Sí | Lo que el anuncio abre: `https://t.me/channel`, `t.me/bot?start=ref` , `@channel` o un sitio web URL . | | `cpm` | Sí | Bid por 1.000 puntos de vista en la moneda del gabinete, mayor que 0. Demasiado bajo para el objetivo → Telegram ’s mínimo vuelve en el error. | | `budget` | Sí | El dinero pasó del balance del gabinete a la campaña: `0` , o por lo menos el `min_budget` del gabinete ( [Cuentas de publicidad](/es/docs/api/accounts/) ). Con `0` el anuncio se crea pero no puede funcionar hasta que usted agrega presupuesto. | | `target_type` | Sí | `channels`, `bots` , `search` o `users` — ver a continuación. | | `active` | No | `false` crea que se apaga. Predeterminado `true` . | | `daily_budget` | No | Gorra de gasto diario. | | `views_per_user` | No | Cuantas veces una persona puede ver el anuncio, 1–4. | | `media` | No | Imagen o video token de [`POST /v1/media`](/es/docs/api/create-campaigns/#doc-note-upload-media) . | | `picture` | No | `true` muestra el avatar del canal ascendido en el anuncio. | | `button` | No | Botón bajo el anuncio: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request`. Solo donde la cuenta de publicidad `features.ad_button` Es `true`. | | `website_name` | No | Nombre de marca mostrado por encima de un anuncio del sitio web. | | `schedule` | No | Mostrar el anuncio sólo en días y horas elegidos, e.g . días de semana 9:00-18:00. Formato: [Calendario](/es/docs/api/manage-campaigns/#doc-note-schedule) . Sin él el anuncio funciona alrededor del reloj. | Nivel superior sólo: `account_id` (necesitado cuando la clave alcanza varios armarios), `group_id` (un existente [Grupo](/es/docs/api/targeting/#doc-note-groups) ) o `new_group_name` (crea el grupo, o reutiliza uno con ese nombre). Los campos desconocidos se niegan con `400 VALIDATION_ERROR` y el nombre de campo en `param` — un tipo nunca deja caer silenciosamente un entorno. ## Segmentación ### `channels` — mostrar el anuncio en canales específicos Ejemplo ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | Campo | Significa | | --- | --- | | `channels` | 1–100 canales públicos: `@name` , `name` o `t.me/name` . Necesario. | | `languages`, `topics`, `exclude_topics` | Límite por lenguaje de canal y tema ( [Códigos](/es/docs/api/targeting/) ). | | `add_similar_channels` | También añadir canales similares a estos. | ### `bots` — mostrar el anuncio en bots Ejemplo ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots` : 1–100 bots públicos. ### `search` — mostrar el anuncio para Telegram consultas de búsqueda Ejemplo ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords` : 1–100 frases, hasta 64 caracteres cada uno. ### `users` — mostrar el anuncio a un público Ejemplo ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | Campo | Significa | | --- | --- | | `countries` | ISO códigos de país. | | `languages` | Códigos de idiomas. | | `topics`, `exclude_topics` | Intereses por tema id. | | `audience_channels` | Gente que leyó estos canales. | Por lo menos uno de estos es requerido. Códigos: [Código de meta](/es/docs/api/targeting/) . Canales, bots y palabras clave se resuelven a Telegram ’ s propios ids cuando la tarea funciona. Unos Telegram no se puede encontrar son saltados; si no se encuentra ninguno, esa campaña falla — `No targets found: …` para canales y bots, `No valid search queries found` para palabras clave — y el `errors` de la tarea lo dice. ## Después de crear la campaña 1. La encuesta [`GET /v1/tasks/{id}`](/es/docs/api/tasks/) hasta `completed` . `ad_ids` mantiene las nuevas campañas. 2. Telegram reseñas cada nuevo anuncio: comienza `In Review` , luego se convierte en `Active` (o `Declined` ). Un [Webhook](/es/docs/api/webhooks/) le dice cuándo. 3. Cambiar, financiar o pausar con [Gestión de campañas](/es/docs/api/manage-campaigns/) . ## Subir archivos multimedia `POST /v1/media` carga una imagen o vídeo en un armario y devuelve un token de `media` para `POST /v1/campaigns` , `PATCH` y copia. El token pertenece a ese gabinete — subir en el gabinete en el que crearás. Ejemplo ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` Ejemplo ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG, PNG , GIF , WEBP o MP4, hasta 10 MB , enviado como `multipart/form-data` en el campo `file` . - Algunos armarios aceptan sólo 16:9 imágenes por lo menos 640 px de ancho; si un archivo no cabe, Telegram ’ la razón vuelve en `error` . ## Errores | Código | cuando | | --- | --- | | `VALIDATION_ERROR` | Falta un campo, desconocido, del tipo equivocado, o no pertenece a este `target_type` — `param` dice cuál. | | `IDEMPOTENCY_KEY_REQUIRED` | No `Idempotency-Key`. | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | Diga qué armario / que gabinete no es accesible. | | `VIEW_ONLY_ACCESS` | Tiene acceso de Viewer a este armario. | | `QUEUE_FULL` | 5 crea ya apagado en este armario. | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | El gabinete no puede tomar cambios manuales ahora mismo. | Las fallas individuales de la campaña (Telegram rechazaron un texto, una oferta, un enlace) no fallan en la solicitud — aparecen en el `errors` de la tarea. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## POST `/api/v1/campaigns` Programa la creación de una campaña o hasta 100 en una cuenta. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Sí | | `X-API-Key` | header | `string` | Sí | 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": [] } } ``` ### Esquema del cuerpo 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" } ] } ``` Resultados y campos de respuesta | API | HTTP | Significado | | --- | --- | --- | | VALIDATION_ERROR | 400 | Revisa los campos y corrige los valores antes de reintentar. | | IDEMPOTENCY_KEY_REQUIRED | 400 | Incluye la cabecera obligatoria Idempotency-Key en la escritura. | | VIEW_ONLY_ACCESS | 403 | El rol Viewer permite consultar la cuenta. Para cambiarla se requiere escritura. | | QUEUE_FULL | 429 | La cuenta ya tiene cinco trabajos de creación en cola. Espera a que haya espacio. | [Interpretar errores de la API](/es/docs/api/errors/) ## POST `/api/v1/media` Sube un archivo creativo y obtiene un token de esa cuenta. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | | `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 } } ``` ### Esquema del cuerpo JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` Ejemplo · 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" ] } ] } ``` ## Notas de implementación ## Una campaña o un lote Para una campaña coloca title, text, promote_url, cpm, budget y target_type en la raíz. Para un lote usa entre 1 y 100 en campaigns, con cuenta y grupo compartidos en la raíz. El presupuesto es cero o al menos min_budget. ## Segmentación y archivos Usa channels, bots, search o users. Canales, bots y búsquedas admiten 1–100 entradas y frases de hasta 64 caracteres. La audiencia requiere algún filtro. JPG, PNG, GIF, WebP y MP4 de hasta 10 MB se vinculan a la cuenta de carga. ## Aceptación y finalización Crear, copiar y operar en lote devuelve HTTP 202 con un id. Consulta GET /api/v1/tasks/{id} respetando Retry-After. Revisa failed y errors incluso si el estado es completed. ## Operaciones y campos POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## Ejemplo de solicitud GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Ajustes de prueba de audiencias El esquema de creación distingue cuatro modos. Los canales van en channels, los bots en bots y los términos en search_keywords. Los filtros de países, idiomas y temas describen la audiencia de usuarios. Consulta las capacidades de la cuenta antes de probar. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Crear campañas y medios | Campo | Valor documentado | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | Fuente · [Fuente de datos](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | Campo | Tipo de campo | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Cuentas publicitarias accesibles](/es/docs/api/accounts/)[Consultar una campaña](/es/docs/api/campaigns/)[Modificar campañas existentes](/es/docs/api/manage-campaigns/)[Estadísticas de campañas y cuentas](/es/docs/api/stats/)[Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Revisión de la referencia 2026-10-08 [Tema anterior**Consultar una campaña**](/es/docs/api/campaigns/)[Tema siguiente**Modificar campañas existentes**](/es/docs/api/manage-campaigns/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Interpretar errores de la API [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/errors/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Lee juntos el estado HTTP y el código de error. Una clave ausente devuelve 401. Corrige los datos antes de repetir una escritura y respeta la espera indicada al alcanzar el límite. [Markdown](/es/docs/api/errors.md) ## Formato de respuesta Cada error tiene la misma forma: Ejemplo ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | Campo | Siente | Significa | | --- | --- | --- | | `error` | Sí | Una frase que una persona puede leer. Enséñala; no la pares — la redacción puede mejorar. | | `code` | sí en todos los errores v1 | Estable, legible por máquina. | | `param` | sobre errores de entrada | El campo que estaba equivocado, como un camino: `cpm`, `campaigns[2].channels[0]` , `account_id` . | | `request_id` | sobre la mayoría de los errores | Lo mismo que el encabezado de respuesta `X-Request-Id`. Cita para apoyar. | Algunos errores añaden contexto: `min_cpm` y `currency` cuando Telegram rechaza una oferta demasiado baja, `missing` con `UNKNOWN_AD_IDS` , `limit` con `QUEUE_FULL` . ## Códigos de estado HTTP | Estatuto | Significa | ¿Retrasar ? | | --- | --- | --- | | 200 | Done | — | | 202 | Aceptado, corriendo en el fondo — encuesta el [Tarea](/es/docs/api/tasks/) | — | | 400 | La solicitud es incorrecta (campo, valor, falta `account_id` ) — o Telegram rechazó el cambio | No, solucione la solicitud | | 401 | No hay llave, llave mala o la llave no llega al armario | No | | 403 | La clave o el plan no se permite hacer esto | No | | 404 | No se encuentra entre los armarios esta llave alcanza | No | | 409 | Conflicto con el estado actual (cabinet bloqueado, Telegram sesión expirada, la misma solicitud en curso) | A veces — vea el código | | 413 | Archivo demasiado grande | No | | 422 | `Idempotency-Key` reutilizado para una solicitud diferente | No — use una nueva clave | | 429 | Tasa límite o cola completa | Sí, después de `Retry-After` segundos | | 500 | Nuestro error - ya conectado | Lea el estado primero, luego reingrese con backoff | | 503 | Temporalmente indisponible | Sí, después de `Retry-After` | ## Códigos de error ### Autenticación y acceso | Código | HTTP | ¿Qué hacer | | --- | --- | --- | | `API_KEY_MISSING` | 401 | Enviar `X-API-Key` . | | `API_KEY_INVALID` | 401 | La llave está equivocada, revocada o caducada. Crear una nueva. | | `NO_ACCOUNTS` | 401 | La clave no alcanza ningún gabinete activo ahora mismo (cabinet desactivado, acceso eliminado). | | `FORBIDDEN` | 403 | Este tipo de llave no está permitido para su propietario. | | `READ_ONLY_KEY` | 403 | Enciende **Gestión de campañas** para la llave del panel. | | `WRITE_NOT_ALLOWED` | 403 | Este tipo de clave (publicado por Orbito Ads para socios) nunca escribe. | | `VIEW_ONLY_ACCESS` | 403 | Su acceso a este gabinete es Viewer. Pregúntele al propietario de la agencia para Manager. | | `FEATURE_NOT_AVAILABLE` | 403 | El plan no incluye esta acción (la respuesta denomina el `feature` ). | | `SUBSCRIPTION_REQUIRED` | 403 | El propietario del gabinete no tiene suscripción activa. | | `ACCOUNT_INACTIVE` | 403 | El gabinete está desactivado. | ### Encontrar cosas | Código | HTTP | ¿Qué hacer | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | La clave alcanza varios armarios (o este `ad_id` existe en varios) — pasar `account_id` . | | `ACCOUNT_NOT_FOUND` | 404 | Que `account_id` no es accesible con esta llave. Chequee `GET /v1/account/info` . | | `CAMPAIGN_NOT_FOUND` | 404 | No hay tal campaña en los gabinetes de la llave (o se elimina). | | `TASK_NOT_FOUND` | 404 | No hay tal tarea para el dueño de esta llave. | | `NOT_FOUND` | 404 | No hay estadísticas para esta campaña y periodo. | | `UNKNOWN_AD_IDS` | 400 | Unos `ad_ids` en una llamada a granel no son campañas de ese gabinete; `missing` los enumera. | ### Entrada | Código | HTTP | ¿Qué hacer | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` nombra el campo; `error` dice lo que está mal. Los campos desconocidos son rechazados también: chequear la ortografía. | | `UNSUPPORTED_MEDIA` | 400 | Cargar JP, PNG, GIF, WP o MP4 en el `file` El campo . | | `FILE_TOO_LARGE` | 413 | Subir un archivo más pequeño (10 MB al máximo). | ### Telegram y estado de gabinete | Código | HTTP | ¿Qué hacer | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram rehusó el cambio; `error` lleva su razón. Con una oferta baja también obtiene `param: "cpm"` , `min_cpm` y `currency` . | | `BUDGET_UNCHANGED` | 400 | Telegram aceptó el top-up, pero el presupuesto de la campaña no se movió. Compruebe el balance del gabinete ( `GET /v1/account/info` ). | | `INSUFFICIENT_AD_BALANCE` | 400 | Usted pidió retirar más de lo que la campaña tiene. Retirar menos, o utilizar `withdraw_all` . | | `CABINET_AUTH_EXPIRED` | 409 | La sesión Telegram del gabinete caducó. El propietario lo reconecta en el panel; luego vuelve a entrar. | | `CABINET_LOCKED` | 409 | El gabinete está bajo gestión automática; se bloquean los cambios manuales. | ### Límites y registros | Código | HTTP | ¿Qué hacer | | --- | --- | --- | | `RATE_LIMITED` | 429 | Espera `Retry-After` segundos. Ver [límites de tasa](/es/docs/api/rate-limits/) . | | `QUEUE_FULL` | 429 | El gabinete ya tiene 5 operaciones coladas. Esperar una tarea a terminar, luego volver a entrar (same `Idempotency-Key` está bien). | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | Agregue un encabezado `Idempotency-Key`. | | `IDEMPOTENCY_KEY_INVALID` | 400 | Use 8–255 caracteres; un UUID es ideal. | | `IDEMPOTENCY_KEY_REUSED` | 422 | Esa clave se utilizó para una petición diferente: nueva operación, nueva clave. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | La primera petición con esta llave sigue funcionando. Retira en unos segundos. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | No se hizo nada. Retira con la misma llave. | | `INGEST_DISABLED` | 403 | Gire en **Recuperación de postbacks** para la llave ( [Conversiones](/es/docs/api/conversions/) ). | | `INTERNAL_ERROR` | 500 | A nuestro lado. Revise el estado con un GET antes de reintentar una escritura; póngase en contacto con [@orbitoads](https://t.me/orbitoads) con el `request_id` si persiste. | ## Cuándo repetir una solicitud - **4x** — no vuelva a entrar sin cambios; solucione la solicitud. (A 4xx nunca consume su `Idempotency-Key` , por lo que puede volver a iniciar la solicitud fija con la misma clave.) - **429 / 503** — retry después de `Retry-After` . - **5x después de escribir** — el cambio puede o no haber llegado a Telegram . Reintentando con el **El mismo** `Idempotency-Key` devuelve el mismo 5xx (por diseño - previene una doble acción). `GET` la campaña para ver lo que pasó, entonces decide; si usted retrata, utilice una nueva clave. - **Temas de red en una escritura** — retratar con el **El mismo** `Idempotency-Key` . Si el primer intento fue a través de usted consigue su resultado; si no lo hizo, la operación se ejecuta ahora. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. Ejemplo · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | Código | 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 | ## Notas de implementación ## Leer la respuesta de error Un fallo contiene success=false y error. Usa code en el cliente y request_id con soporte. param identifica un campo inválido, missing puede enumerar anuncios desconocidos y min_cpm y currency acompañar una puja rechazada. ## Reintento según el estado Corrige datos en 400, credenciales en 401 y permisos en 403. Verifica cuenta y anuncio en 404. Trata 409 según code. Respeta Retry-After ante cuotas y fallos transitorios. Un conflicto 422 exige otro identificador para una operación nueva. ## Operaciones y campos error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## Ejemplo de solicitud GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Interpretar errores de la API | Campo | Valor documentado | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | Fuente · [Fuente de datos](https://adsly.pro/docs/api/errors/) ## Error | Campo | Tipo de campo | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Límites de solicitudes y eventos](/es/docs/api/rate-limits/)[Reintentar una operación](/es/docs/api/idempotency/)[Seguir una operación en cola](/es/docs/api/tasks/)[Recorrer páginas de campañas](/es/docs/api/pagination/) Revisión de la referencia 2026-10-08 [Tema anterior**Documentación para un asistente de IA**](/es/docs/api/ai-assistants/)[Tema siguiente**Límites de solicitudes y eventos**](/es/docs/api/rate-limits/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Reintentar una operación [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/idempotency/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Usa un Idempotency-Key nuevo para crear, copiar, operar por lotes o cambiar el presupuesto. En un reintento conserva la clave y el cuerpo. Reutilizarla para otra operación produce un error. [Markdown](/es/docs/api/idempotency.md) El servidor puede recibir un pago o una solicitud de creación y perderse la respuesta de camino al cliente. Si repites la petición a ciegas, podrías mover dinero o crear la campaña dos veces. Envía `Idempotency-Key` para que el servidor reconozca la operación al reintentarla. ## Cuándo se exige la clave de idempotencia | El punto final | Header | | --- | --- | | `POST /v1/campaigns` | Requisitos | | `POST /v1/campaigns/{ad_id}/copy` | Requisitos | | `POST /v1/campaigns/bulk` | Requisitos | | `POST /v1/campaigns/{ad_id}/budget` | Requisitos | | Otros escritos ( `PATCH` , pausa/resumo, `DELETE` , medios de comunicación) | opcionales: son seguros de repetir por su cuenta | Sin el encabezado estos retornos `400 IDEMPOTENCY_KEY_REQUIRED` . ## Cómo enviar la clave de idempotencia Generar un nuevo valor aleatorio — un UUID — **Para cada operación** , y enviar el valor **El mismo** cada vez que vuelva a iniciar esa operación. Ejemplo ``` 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 ``` Ejemplo ``` 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 ``` ## Qué devuelve una solicitud repetida | La posición | Respuestas | | --- | --- | | Primera solicitud con esta clave | Corre normalmente. | | La misma llave, la misma petición, la primera terminada | La respuesta **almacenado** , sin cambios, con el encabezado `Idempotent-Replayed: true` . Nada funciona de nuevo. | | La misma llave, la misma petición, la primera sigue funcionando | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After` . Entrada en breve. | | Mismo llave, diferente cuerpo o punto final | `422 IDEMPOTENCY_KEY_REUSED` . Una nueva operación necesita una nueva clave. | | La primera solicitud terminó en un 4xx (bad input, plan, cola completa...) | La clave es lanzada: solucione la solicitud y envíela con la clave **El mismo** . | | Primera solicitud terminada en un 5xx | El 5xx es almacenado y reinterpretado — el cambio puede haber alcanzado Telegram , y la clave existe para detener que funcione dos veces. Revise la campaña con `GET` , luego utilice una nueva clave si todavía desea actuar. | “Lo mismo pedido” significa el mismo método, camino y JSON cuerpo (el orden clave no importa). ## Reglas de procesamiento de la clave - Las claves se encuentran en su llave API — dos integraciones no pueden collide. - Las llaves se guardan durante 24 horas. Después de que el mismo valor comience una nueva operación. - Cualquier cadena de 8–255 caracteres funciona; un UUID es el predeterminado correcto. - Si no podemos grabar la llave, la operación no funciona y usted consigue `503 IDEMPOTENCY_UNAVAILABLE` — reingrese con la misma llave. El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## Notas de implementación ## Un identificador por operación Crear, copiar, operar en lote y mover presupuesto requieren Idempotency-Key. Usa un valor aleatorio nuevo de 8–255 caracteres por operación y reutilízalo al reintentar. Durante 24 horas vincula clave API, método, ruta y JSON. ## Reintentos concurrentes o modificados Las llamadas completadas se reproducen con Idempotent-Replayed: true. Un duplicado pendiente devuelve 409 y Retry-After. Cambiar la solicitud con la misma clave da 422. Una validación 4xx libera la clave. Tras un 5xx almacenado consulta el objeto antes de una operación nueva. ## Operaciones y campos Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## Ejemplo de solicitud GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Reintentar una operación | Campo | Valor documentado | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | Fuente · [Fuente de datos](https://adsly.pro/docs/api/idempotency/) ## Lecturas relacionadas [Interpretar errores de la API](/es/docs/api/errors/)[Límites de solicitudes y eventos](/es/docs/api/rate-limits/)[Seguir una operación en cola](/es/docs/api/tasks/)[Recorrer páginas de campañas](/es/docs/api/pagination/) Revisión de la referencia 2026-10-08 [Tema anterior**Límites de solicitudes y eventos**](/es/docs/api/rate-limits/)[Tema siguiente**Seguir una operación en cola**](/es/docs/api/tasks/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Modificar campañas existentes [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/manage-campaigns/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) La gestión abarca texto, enlaces, pujas, límites diarios, horarios, presupuesto y entrega. Un lote admite hasta 1.000 campañas. Comprueba los fallos parciales en la tarea. [Markdown](/es/docs/api/manage-campaigns.md) Todas las llamadas aquí necesitan una llave con **Gestión de campañas** y Manager (o propietario) acceso al gabinete. Actúan en una campaña, `(account_id, ad_id)` : pasar `account_id` en el cuerpo o la consulta cuando la clave alcanza varios gabinetes. Cada cambio aparece en la historia de la campaña en el panel marcado **🔌 API** . | llamadas | ¿Qué hace? | Respuestas | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | cambio de texto, enlace, puja, cap, cronograma, on/off | Immediato | | `POST /v1/campaigns/{ad_id}/pause` | Descargarse | Immediato | | `POST /v1/campaigns/{ad_id}/resume` | Cambiar en | Immediato | | `POST /v1/campaigns/{ad_id}/budget` | añadir o retirar el presupuesto | Immediato | | `DELETE /v1/campaigns/{ad_id}` | Eliminar | Immediato | | `POST /v1/campaigns/{ad_id}/copy` | 1 a 100 copias | 202 + [Tarea](/es/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | una acción de hasta 1.000 campañas | 202 + Tareas | Respuestas directas devuelven la actualización [Objeto de campaña](/es/docs/api/campaigns/#doc-note-the-campaign-object) en `data` . ## Editar `PATCH /v1/campaigns/{ad_id}` — envía sólo los cambios. Ejemplo ``` 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." }' ``` | Campo | Significa | | --- | --- | | `title`, `text`, `promote_url` | Creativo y enlazado. | | `cpm` | Nueva oferta, superior a 0. | | `daily_budget` | El CAP diario. | | `views_per_user` | 1–4. | | `active` | `true` / `false` — igual que el curriculum vitae / pausa. | | `schedule` | Días y horas para mostrar el anuncio; `null` lo elimina — ver [Calendario](/es/docs/api/manage-campaigns/#doc-note-schedule) . | | `media`, `picture`, `button`, `website_name` | Como en [Crear](/es/docs/api/create-campaigns/#doc-note-fields). | **¿Qué pasa con la revisión de Telegram?** Cambio `cpm`, `active` o `schedule` No - se aplican de una vez y la campaña sigue funcionando. En cualquier otro campo (`title`, `text`, `promote_url`, `media`, `picture`, `button`, `website_name`, `views_per_user`, `daily_budget`se salve a través del formulario de anuncio completo de Telegram, y Telegram revisará de nuevo el anuncio: muestra `In Review` Hasta que se aprueba. Enviar las ofertas, en/off y el horario de cambios por sí mismos, no junto con esos campos. El destino ( `channels` , `countries` , ...) no puede cambiar en un anuncio existente — Telegram no lo permite. Crear una nueva campaña con el nuevo objetivo, o [Copia](/es/docs/api/manage-campaigns/#doc-note-copy) y ajustar. `meta` en la respuesta: | Campo | Significa | | --- | --- | | `status_warning` | Los campos guardados, pero Telegram no aplicaron el interruptor on/off (por ejemplo, sin presupuesto). | | `status_intent_only` | Su opción de encendido / apagado se almacena y se aplica cuando Telegram puede (en revisión, sin presupuesto). | | `status_already_set` | La campaña ya estaba en el estado que pidió. | Una oferta inferior a Telegram ’s mínimo para este objetivo devuelve `400 PLATFORM_REJECTED` con `param: "cpm"` , `min_cpm` y `currency` . ## Pausar y reanudar Ejemplo ``` 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` significa que Telegram todavía no puede actuar en él — la campaña está en revisión, declinado o fuera del presupuesto— y su elección es almacenada: funciona tan pronto como sea posible. Cuando el estado realmente cambia, sus incendios [El estado webhook](/es/docs/api/webhooks/). ## Programación de anuncios Mostrar una campaña sólo los días de semana y horas elegidos, por ejemplo los días de la semana 9:00-18:00, o las noches solamente. Fuera de esas horas Telegram no muestra el anuncio. Configurar, cambiar o eliminar un horario no cambia la campaña en o apagado — `status` y `active` permanecen como están. Funciona en cada tipo de gabinete. Ejemplo ``` 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" } }' ``` | Campo | Significa | | --- | --- | | `days` | `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun` - cada uno tiene las horas (0-23) que el anuncio se lleva ese día. `9` Significa 09:00–09:59Y así `[9, …, 17]` Es 9:00–18:00. Un día que te quitas, o que te envíes como `[]`No corre no. Al menos una hora en total. | | `timezone` | cuyo reloj las horas siguen. `"viewer"` - el tiempo local de cada espectador; sólo para la meta del público (`target_type: "users"`). De lo que no se trata a UTC El descuento: `"+03:00"`, `"-05:00"`, `"+05:30"`. Los offset de Telegram ofrecen: horas enteras de `-12:00` para `+14:00`y más `-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"` y `"+3"` También se aceptan. | `"schedule": null` quita el horario — el anuncio corre alrededor del reloj de nuevo. **Una campaña sin presupuesto no puede tener un horario.** Telegram acepta un horario sólo en una campaña que puede ejecutarse, por lo que en una campaña de `Stopped` sin nada te queda `400 PLATFORM_REJECTED` con `param: "schedule"` y nada se cambia — añade el presupuesto primero, luego establece el calendario. Una campaña pausada ( `On Hold` ) lo lleva bien. El objetivo de campaña devolve el horario en la misma forma, con todos los siete días y el descuento escrito como `"+03:00"` - para que pueda leerlo, cambiar un día y enviarlo de vuelta. `GET /v1/campaigns/{ad_id}` dar el horario actual, aunque se ha cambiado directamente en Telegram — ver [Fría](/es/docs/api/campaigns/#doc-heading-freshness). Horas fuera de 0-23, un día desconocido, un horario vacío, `"viewer"` en un canal/bot/reclama de búsqueda o un offset Telegram no ofrece `400 VALIDATION_ERROR` con el campo exacto en `param` (por ejemplo `schedule.days.mon`). [Copias](/es/docs/api/manage-campaigns/#doc-note-copy) y las campañas recreativas mantienen el calendario de la campaña de la que provienen. Para poner un horario en muchas campañas a la vez, utilice la acción a granel `set_schedule` . ## Presupuesto de la campaña `POST /v1/campaigns/{ad_id}/budget` mueve dinero entre el equilibrio del gabinete y la campaña. Requiere un `Idempotency-Key` . Ejemplo ``` 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` | Efecho | | --- | --- | --- | | `add` | Requisitos | Balanza de gabinete → campaña. | | `withdraw` | Requisitos | Campaña → equilibrio de gabinete. Más que la campaña tiene → `400 INSUFFICIENT_AD_BALANCE` . | | `withdraw_all` | — | Todo lo que queda en la campaña → equilibrio de gabinete. | `meta.moved` es lo que realmente se movió; `meta.partial` es `true` cuando menos de lo solicitado podría ser retirado. El dinero nunca deja el gabinete a través del API . ## Copiar una campaña `POST /v1/campaigns/{ad_id}/copy` crea copias con el mismo objetivo; todo lo que envía anula el original. Requiere un `Idempotency-Key` . Devuelve una tarea cuyo `ad_ids` son las copias. Ejemplo ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | Campo | Significa | | --- | --- | | `copies` | 1–100, predeterminado 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | Sobresuelve para cada copia. `budget` : `0` o al menos el gabinete `min_budget` . | | `schedule` | Las copias guardan el original [El calendario](/es/docs/api/manage-campaigns/#doc-note-schedule) ; enviar uno para reemplazarlo, o `null` para ninguno. | | `group_id` / `new_group_name` | Pon las copias en un grupo. | ## Eliminar Ejemplo ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` Una campaña eliminada que tenía vistas se queda en sus estadísticas con `status: "Deleted"` ; una que nunca corrió es eliminada. Eliminando de nuevo devuelve `404 CAMPAIGN_NOT_FOUND` . ## Operaciones por lotes `POST /v1/campaigns/bulk` aplica una acción a hasta 1.000 campañas de un gabinete. Requiere un `Idempotency-Key` . Devuelve una tarea. Ejemplo ``` 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` | Campo Extra | Efecho | | --- | --- | --- | | `pause` | — | Descargarse | | `resume` | — | Cambiar en | | `add_budget` | `amount` | añadir a cada campaña | | `withdraw_budget` | `amount` | retirarse de cada campaña | | `withdraw_all_budget` | — | retirar todo de cada campaña | | `set_cpm` | `cpm` | establecer la misma oferta en cada | | `set_schedule` | `schedule` | establecer el mismo [El calendario](/es/docs/api/manage-campaigns/#doc-note-schedule) en cada uno; `"schedule": null` lo quita | | `delete` | — | Eliminar cada uno | Cada `ad_id` debe ser una campaña en vivo de ese gabinete; de lo contrario nada es apagado y usted consigue `400 UNKNOWN_AD_IDS` con los delincuentes en `missing` . Duplicados son ignorados. La tarea de `errors` listas campañas Telegram rechazado - con `set_schedule` , también campañas sin presupuesto y campañas donde `"timezone": "viewer"` no se puede aplicar porque no apuntan a un público. ## Cómo pausar campañas con coste por acción elevado Ejemplo ``` 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"]) ``` ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## PATCH `/api/v1/campaigns/{ad_id}` Modifica solo los ajustes enviados de la campaña. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | | `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" } } ``` ### Esquema del cuerpo 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" } ``` Resultados y campos de respuesta | API | Significado | | --- | --- | | status_warning | Los campos se guardaron, pero no se pudo cambiar la entrega, por ejemplo por falta de saldo. | | status_intent_only | El estado deseado queda registrado y podrá aplicarse cuando lo permitan la revisión o el saldo. | | status_already_set | La campaña ya tenía el estado solicitado. | [Seguir una operación en cola](/es/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` Solicita detener la entrega de una campaña. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | | `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` Solicita reanudar la campaña cuando pueda publicarse. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | | `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` Mueve presupuesto entre la cuenta y una campaña. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Sí | | `X-API-Key` | header | `string` | Sí | 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 } } ``` ### Esquema del cuerpo 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` Programa hasta 100 copias con la segmentación heredada y ajustes opcionales. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Sí | | `X-API-Key` | header | `string` | Sí | 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": [] } } ``` ### Esquema del cuerpo 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` Programa una operación para hasta 1000 campañas de la misma cuenta. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Sí | | `X-API-Key` | header | `string` | Sí | 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": [] } } ``` ### Esquema del cuerpo 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}` Elimina la campaña conservando su historial de entrega si existe. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sí | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | | `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 } } ``` ## Notas de implementación ## Campos modificables y horarios Cambiar cpm, active o schedule no requiere nueva revisión creativa. Otros cambios pueden requerirla. La segmentación existente se conserva. Usa días, horas 0–23 y un desfase UTC admitido. viewer corresponde a users y null elimina el horario. ## Movimientos dentro de la cuenta add asigna fondos. withdraw devuelve el importe solicitado y withdraw_all devuelve el saldo disponible a la cuenta. Revisa meta.moved y meta.partial. Recargas externas, facturas y reembolsos van por facturación. ## Aceptación y finalización Crear, copiar y operar en lote devuelve HTTP 202 con un id. Consulta GET /api/v1/tasks/{id} respetando Retry-After. Revisa failed y errors incluso si el estado es completed. ## Operaciones y campos 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 ## Ejemplo de solicitud GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Modificar campañas existentes | Campo | Valor documentado | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | Campo | Tipo de campo | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | Campo | Tipo de campo | | --- | --- | | days | object | | timezone | string | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Cuentas publicitarias accesibles](/es/docs/api/accounts/)[Consultar una campaña](/es/docs/api/campaigns/)[Crear campañas y medios](/es/docs/api/create-campaigns/)[Estadísticas de campañas y cuentas](/es/docs/api/stats/)[Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Revisión de la referencia 2026-10-08 [Tema anterior**Crear campañas y medios**](/es/docs/api/create-campaigns/)[Tema siguiente**Estadísticas de campañas y cuentas**](/es/docs/api/stats/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Recorrer páginas de campañas [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/pagination/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Empieza con un cursor vacío y sigue meta.next_cursor hasta null, conservando los filtros. El máximo publicado es de 500 campañas por página. [Markdown](/es/docs/api/pagination.md) `GET /v1/campaigns` es la única lista paginada. Admite dos modos de paginación. ## Paginación por cursor Envía `cursor=` vacío en la primera solicitud y continúa con `meta.next_cursor` hasta que sea `null`. Ejemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` Ejemplo ``` 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 ``` - Trate el cursor como opaco. Sólo es válido con los mismos filtros. - El orden se fija (cabinet, luego el más nuevo `ad_id` primero), por lo que las páginas permanecen estables mientras que las campañas se agregan. - No hay límite superior: así es como lees un gabinete con 100.000 campañas. - Filtros `bot_username` , `promote_domain` y `type` utilizan siempre el modo cursor. - El modo Cursor deja fuera unos pocos campos pesados (resumo, medios de comunicación, última acción). Use [`GET /v1/campaigns/{ad_id}`](/es/docs/api/campaigns/#doc-note-get-one-campaign) para el registro completo de una campaña. ## Paginación por desplazamiento para cuentas pequeñas Sin `cursor` , las páginas de endpoint con `limit` y `offset` y pueden ordenar ( `sortBy` , `sortOrder` ). Lee en la mayoría de **500 campañas por cuenta publicitaria** : pasado que `meta.truncated` es `true` y `meta.next_step` le dice que cambie al modo cursor. Ejemplo ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## Tamaño de página `limit` acepta de 1 a 500 resultados por página. El valor predeterminado es 100. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. Ejemplo · 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' ``` Ejemplo · 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' ``` ## Notas de implementación ## Recorrer listas grandes Inicia GET /api/v1/campaigns con cursor= y filtros. Conserva los filtros y pasa meta.next_cursor sin modificar en la página siguiente. Termina con null. limit admite 1–500 y vale 100 por defecto. ## Orden y límites del desplazamiento El cursor ordena por cuenta y ad_id descendente. bot_username, promote_domain y type activan este modo. Offset admite sortBy y sortOrder con hasta 500 campañas por cuenta. meta.truncated indica que se necesita cursor. ## Operaciones y campos GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## Ejemplo de solicitud GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Recorrer páginas de campañas | Campo | Valor documentado | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | Fuente · [Fuente de datos](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Interpretar errores de la API](/es/docs/api/errors/)[Límites de solicitudes y eventos](/es/docs/api/rate-limits/)[Reintentar una operación](/es/docs/api/idempotency/)[Seguir una operación en cola](/es/docs/api/tasks/) Revisión de la referencia 2026-10-08 [Tema anterior**Seguir una operación en cola**](/es/docs/api/tasks/)[Tema siguiente**Cuentas publicitarias accesibles**](/es/docs/api/accounts/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Límites de solicitudes y eventos [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/rate-limits/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Cada clave tiene cuotas distintas. Los límites publicados son 60 lecturas y 30 escrituras por minuto y 20 conversiones entrantes por segundo. Cada cuenta también limita su cola. [Markdown](/es/docs/api/rate-limits.md) Cada clave tiene cuotas independientes de lectura, escritura y conversiones. Consultar estadísticas con frecuencia no impide pausar campañas. Una ráfaga de conversiones del rastreador tampoco consume las otras dos cuotas. | presupuesto | Se aplica a | límite | | --- | --- | --- | | **Lea** | Cada uno `GET` | 60 solicitudes por minuto | | **Escribe** | cada `POST`, `PATCH` , `DELETE` excepto conversiones | 30 solicitudes por minuto | | **Conversiones en** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 20 eventos por segundo, estallan hasta 1.000 | Las cuotas se reponen de forma continua. En una ráfaga corta puedes usar el cupo disponible de un minuto. Sincronizar campañas, estadísticas y totales suele consumir de 3 a 4 lecturas. ¿Necesita más para una integración específica? Pregunte [@orbitoads](https://t.me/orbitoads) — los límites se pueden elevar por clave. ## Cabeceras HTTP Cada respuesta incluye cabeceras que indican el límite y la cuota restante. Ejemplo ``` 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 ``` ## Reducir el número de solicitudes - **El bulbo en lugar de los lados.** Pausing 300 campaigns is one `POST /v1/campaigns/bulk` , not 300 pause calls. See [Gestión de campañas](/es/docs/api/manage-campaigns/#doc-note-bulk) . - **Creación en batches.** `POST /v1/campaigns` lleva hasta 100 campañas. - **Webhooks en lugar de polling.** Los cambios de estado llegan el momento en que suceden; las estadísticas por hora llegan por sí mismas. Ver [Webhóks](/es/docs/api/webhooks/) . - **Conversiones de batch.** `POST /v1/postback` acepta hasta 1.000 eventos por solicitud (cada evento sigue contando con el presupuesto de eventos – batching ahorra viajes redondos, no cuota). ## Otros límites | ¿Qué | límite | | --- | --- | | Operaciones deseadas o ejecutadas por gabinete | 5 crea + 5 otras operaciones (copia, vracs). El 6to devuelve `429 QUEUE_FULL` . | | Campañas por solicitud de creación | 100 | | Copias por solicitud de copia | 100 | | Campañas por solicitud masiva | 1,000 | | Archivo cargado | 10 MB | | Tamaño de la página para `GET /v1/campaigns` | 500 | ## Espera antes de reintentar Tras un 429 espera los segundos de `Retry-After`. En procesos automáticos añade un pequeño retraso aleatorio para que los trabajadores no reintenten al mismo tiempo. Ejemplo ``` 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); } ``` El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## Notas de implementación ## Cuotas independientes por clave Cada clave tiene 60 lecturas/minuto y 30 escrituras/minuto. Las conversiones admiten 20 eventos/segundo y picos de 1000. Cada elemento del lote cuenta. Consulta X-RateLimit-Limit, X-RateLimit-Remaining y X-RateLimit-Reset. ## Colas y reintentos Una cuenta admite cinco tareas de creación y cinco de otro tipo en cola o activas. Se ejecuta una de cada tipo a la vez. Tras 429 espera los segundos de Retry-After. ## Operaciones y campos 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## Ejemplo de solicitud GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Dimensiones del informe La API admite hasta 100 campañas por creación, 100 copias por solicitud y 1.000 campañas existentes por operación masiva. La respuesta 202 identifica la tarea en cola. Revisa failed y errors al concluir antes de cambiar el grupo siguiente. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Límites de solicitudes y eventos | Campo | Valor documentado | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/rate-limits/) ## Lecturas relacionadas [Interpretar errores de la API](/es/docs/api/errors/)[Reintentar una operación](/es/docs/api/idempotency/)[Seguir una operación en cola](/es/docs/api/tasks/)[Recorrer páginas de campañas](/es/docs/api/pagination/) Revisión de la referencia 2026-10-08 [Tema anterior**Interpretar errores de la API**](/es/docs/api/errors/)[Tema siguiente**Reintentar una operación**](/es/docs/api/idempotency/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Estadísticas de campañas y cuentas [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/stats/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Usa estadísticas por campaña, totales por cuenta o clasificaciones por moneda. Elige una ventana móvil o fechas y horas propias. Guarda el periodo con tus cifras exportadas. [Markdown](/es/docs/api/stats.md) Hay tres métodos de estadísticas, con distintos niveles de detalle. Cada uno devuelve datos por cuenta para todas las cuentas a las que la clave puede acceder. | El punto final | regreso | | --- | --- | | `GET /v1/stats` | los números de cada campaña para el período | | `GET /v1/stats/total` | los totales de cada gabinete más puntos de diagrama | | `GET /v1/stats/analytics` | totals divididos por moneda, gráfico, campañas superiores | Para consultar una campaña durante un periodo, usa `GET /v1/campaigns/{ad_id}/history`. [`GET /v1/campaigns/{ad_id}/history`](/es/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## Periodos del informe | `period` | ventana | | --- | --- | | `1d` | última 24 horas (predeterminado para `/stats` y `/stats/total` ) | | `7d` | Los últimos 7 días | | `30d` | los últimos 30 días (predeterminado para `/stats/analytics` ) | | `all` | todo el tiempo | | `custom` | `startDate` y `endDate` ( `YYYY-MM-DD` ), opcionalmente `startHour` y `endHour` (0–23) | Cualquier `h` o `d` también funciona ( `6h` , `14d` , hasta 365 días). Un valor no reconocido se lee como las últimas 24 horas - que no devuelve un error, así que compruebe su ortografía. Todas las veces son UTC . Ejemplo ``` # 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 Por campaña, anidado por gabinete: `data[account_id][ad_id]` . Ejemplo ``` { "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" } } ``` Las claves son cadenas; los valores aquí son **Números** (a diferencia del objeto de la campaña). `cpa` se gasta por acción; `ctr` es un porcentaje. ## GET /v1/stats/total El punto final del panel de control: totales y un gráfico para cada gabinete. Ejemplo ``` { "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` Los puntos son horarios o diarios dependiendo del período. `cabinetType` La moneda de la moneda (`euro` → EUR, `ton` → TON, `stars` y las estrellas). ## GET /v1/stats/analytics Como `/stats/total` , más gastar división por moneda y las campañas superiores. Ejemplo ``` { "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" } } ``` ## Notas - Las estatas siguen los contadores Telegram , sincronizados con Orbito Ads regularmente; la hora más reciente se llena a medida que llegan los sincronizados. - Nunca añadir `spent` en gabinetes con diferentes monedas. - Para las conversiones te haces un seguimiento (cargos, depósitos, ventas) ver [Conversiones](/es/docs/api/conversions/) — Telegram ’s `actions` se unen y bot comienza, no tus conversiones. - Preferir el [El webhook digesto](/es/docs/api/webhooks/#doc-heading-hourly_digest) sobre estadísticas de votación cada pocos minutos. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## GET `/api/v1/stats` Consulta métricas del periodo por cuenta y campaña. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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` Consulta totales por cuenta y puntos del gráfico en el intervalo. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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` Obtiene desglose por divisa, series y campañas destacadas. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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" } } ``` ## Notas de implementación ## Saldos y monedas Revisa currency, balance_updated_at y min_budget por cuenta. En campañas, importes y tipos pueden ser cadenas decimales o null. Los agregados usan números. Separa EUR, TON y Stars. ## Periodos y horas UTC period acepta 1d, 7d, 30d, all, custom y ventanas Nh o Nd de hasta 365 días. En custom usa startDate y endDate y, opcionalmente, startHour/endHour 0–23 UTC. Stats y total usan 1d por defecto, analytics 30d. ## Interpretar acciones actions cuenta altas en canales e inicios de bots. Para clientes potenciales, compras e ingresos usa conversions. /stats/analytics incluye gráfico, totales y topCampaigns por cuenta. ## Operaciones y campos 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 ## Ejemplo de solicitud GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Estadísticas de campañas y cuentas | Campo | Valor documentado | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | Fuente · [Fuente de datos](https://adsly.pro/docs/api/stats/) ## StatsNumbers | Campo | Tipo de campo | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Cuentas publicitarias accesibles](/es/docs/api/accounts/)[Consultar una campaña](/es/docs/api/campaigns/)[Crear campañas y medios](/es/docs/api/create-campaigns/)[Modificar campañas existentes](/es/docs/api/manage-campaigns/)[Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Revisión de la referencia 2026-10-26 [Tema anterior**Modificar campañas existentes**](/es/docs/api/manage-campaigns/)[Tema siguiente**Diccionarios de segmentación y grupos**](/es/docs/api/targeting/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Diccionarios de segmentación y grupos [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/targeting/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Consulta códigos de países, idiomas y temas antes de crear la solicitud. La lista de grupos identifica carpetas guardadas. Guarda los diccionarios en caché y actualízalos al cambiar las opciones. [Markdown](/es/docs/api/targeting.md) ## GET /v1/targeting Los códigos [`POST /v1/campaigns`](/es/docs/api/create-campaigns/) aceptan. Las listas son las que el Orbito Ads crea usos del formulario, por lo que un código de aquí nunca se niega como desconocido. Ejemplo ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "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" ] } } ``` | Lista | Usado en | Notas | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 códigos de dos letras, más Telegram ’s propio `FT` (números anónimos). | | `languages[].code` | `languages` | Telegram ’s language keys — e.g . `pt-br` y `pt-pt` , no `pt` . | | `topics[].id` | `topics`, `exclude_topics` | Números; los ids no son consecutivos. | | `buttons` | `button` | Sólo en armarios cuyo `features.ad_button` es `true` . | Estos catálogos cambian poco. Descárgalos una vez y guárdalos en caché durante un día. ## Grupos de segmentación Los grupos son carpetas para campañas en el panel. Poner nuevas campañas o copias en una con `group_id` (existiendo) o `new_group_name` (creado, o reutilizado si el nombre existe). ### GET /v1/grupos Ejemplo ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Ejemplo ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` Sin `account_id` se obtienen los grupos de cada gabinete los alcances clave. Un grupo pertenece a un gabinete — `group_id` de otro gabinete es rechazado. ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## GET `/api/v1/targeting` Obtiene los valores de país, idioma, tema y botón admitidos. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Sí | 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` Lista grupos de campañas, opcionalmente de una cuenta. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sí | 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" } ] } ``` ## Notas de implementación ## Valores válidos para el formulario Usa códigos de país e idioma, ids de temas y botones tal como se devuelven. Algunos idiomas distinguen región, como pt-br y pt-pt. button requiere soporte de la cuenta. ## Propiedad del grupo Cada grupo pertenece a una cuenta. Al crear o copiar, usa su group_id o new_group_name. Se puede reutilizar un grupo con el mismo nombre. ## Operaciones y campos GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## Ejemplo de solicitud GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Ajustes de prueba de audiencias El esquema de creación distingue cuatro modos. Los canales van en channels, los bots en bots y los términos en search_keywords. Los filtros de países, idiomas y temas describen la audiencia de usuarios. Consulta las capacidades de la cuenta antes de probar. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Diccionarios de segmentación y grupos | Campo | Valor documentado | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | Fuente · [Fuente de datos](https://adsly.pro/docs/api/targeting/) ## Targeting | Campo | Tipo de campo | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Group | Campo | Tipo de campo | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Cuentas publicitarias accesibles](/es/docs/api/accounts/)[Consultar una campaña](/es/docs/api/campaigns/)[Crear campañas y medios](/es/docs/api/create-campaigns/)[Modificar campañas existentes](/es/docs/api/manage-campaigns/)[Estadísticas de campañas y cuentas](/es/docs/api/stats/) Revisión de la referencia 2026-10-08 [Tema anterior**Estadísticas de campañas y cuentas**](/es/docs/api/stats/)[Tema siguiente**Recibir eventos de campaña**](/es/docs/api/webhooks/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Seguir una operación en cola [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/tasks/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Crear, copiar o modificar un lote puede devolver 202 y un ID de tarea. Consulta su avance, totales y fallos individuales. Conserva los identificadores de campañas afectadas. [Markdown](/es/docs/api/tasks.md) Algunas operaciones hablan con Telegram una vez por campaña, por lo que pueden tomar más tiempo que una solicitud de HTTP debe esperar. Estos retornos `202 Accepted` con un **Tarea** en lugar del resultado final: - `POST /v1/campaigns` — crear - `POST /v1/campaigns/{ad_id}/copy` — copia - `POST /v1/campaigns/bulk` — pausa, reanudación, presupuesto, CPM o eliminación de muchos Cambios monocampaña ( `PATCH` , pausa, reanuda, presupuesto, borra) responden directamente — ninguna tarea. ## Respuesta HTTP 202 Ejemplo ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` Ejemplo ``` { "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} Ejemplo ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` La misma forma que arriba. Votar hasta `status` es final; mientras que una tarea es `pending` o `running` la respuesta lleva `Retry-After: 2` — esperar ese largo entre las encuestas. Cualquier clave del mismo propietario puede leer la tarea. | Campo | Significa | | --- | --- | | `type` | `create`, `copy`, `status` (Paseo de la columna / resumen) `budget`, `cpm`, `delete` | | `status` | Ver Abajo | | `progress` / `total` | campañas procesadas hasta ahora / en total | | `succeeded` / `failed` | cuenta, una vez conocido | | `ad_ids` | campañas la tarea creada (crear, copiar) o cambiada (bulk) | | `errors[]` | hasta 50 fracasos: `{ ad_id, index, error }` — `index` es la posición en su matriz `campaigns` para crear | | `paused_reason` | por qué una tarea se detuvo para esperar, e.g . el gabinete se quedó sin equilibrio | | `error` | por qué toda la tarea falló | ### Estatutos | Estatuto | Significa | ¿El final? | | --- | --- | --- | | `pending` | apagado — el gabinete ejecuta una creación y otra operación a la vez | No | | `running` | En el progreso | No | | `paused` | se detuvo para esperar — generalmente el balance del gabinete se agotó a mitad de camino. Subir el armario; reanudarlo desde el panel | No | | `completed` | terminar. Comprobar `failed` y `errors` — una tarea completa puede contener fallos individuales | Sí | | `failed` | la tarea en su conjunto falló - ver `error` | Sí | | `cancelled` | cancelado del panel | Sí | ## Cómo finaliza la creación de campañas - Los nuevos ids de campaña aparecen en `ad_ids` cuando la tarea se completa (se encuentran sincronizando el gabinete después de que se crea la última campaña). - Si la campaña **Primero** de un lote falla, la tarea se detiene allí en lugar de repetir el mismo error 100 veces. Arreglar la entrada y enviar de nuevo. - Si Telegram no puede resolver ninguno de los canales o bots de una campaña, esa campaña falla con `No targets found: …` enumerarlos. - Telegram reseñas cada nuevo anuncio. Una campaña creada generalmente comienza `In Review` ; un [Webhook](/es/docs/api/webhooks/) te dice cuando eso cambia. ## Ejemplo de consulta periódica del estado Ejemplo ``` 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)); } } ``` Ejemplo ``` 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))) ``` ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. ## GET `/api/v1/tasks/{id}` Consulta progreso, identificadores resultantes y errores por elemento. | Parámetro | Ubicación | Formato | Obligatorio | | --- | --- | --- | --- | | `id` | path | `integer` | Sí | | `X-API-Key` | header | `string` | Sí | 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" } } ``` ## Notas de implementación ## Aceptación y finalización Crear, copiar y operar en lote devuelve HTTP 202 con un id. Consulta GET /api/v1/tasks/{id} respetando Retry-After. Revisa failed y errors incluso si el estado es completed. ## Resultados de la tarea pending, running y paused son intermedios. completed, failed y cancelled son finales. Consulta progress, total, ad_ids y hasta 50 errores individuales. paused_reason puede señalar falta de saldo que se resuelve en el panel. ## Operaciones y campos 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 ## Ejemplo de solicitud GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Dimensiones del informe La API admite hasta 100 campañas por creación, 100 copias por solicitud y 1.000 campañas existentes por operación masiva. La respuesta 202 identifica la tarea en cola. Revisa failed y errors al concluir antes de cambiar el grupo siguiente. ## Referencia del protocolo | Método | Ruta | Parámetros | Contenido de la solicitud | Códigos de respuesta | | --- | --- | --- | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Campos y límites del esquema · Seguir una operación en cola | Campo | Valor documentado | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/tasks/) ## Task | Campo | Tipo de campo | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/openapi.yaml) ## Lecturas relacionadas [Interpretar errores de la API](/es/docs/api/errors/)[Límites de solicitudes y eventos](/es/docs/api/rate-limits/)[Reintentar una operación](/es/docs/api/idempotency/)[Recorrer páginas de campañas](/es/docs/api/pagination/) Revisión de la referencia 2026-10-08 [Tema anterior**Reintentar una operación**](/es/docs/api/idempotency/)[Tema siguiente**Recorrer páginas de campañas**](/es/docs/api/pagination/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Recibir eventos de campaña [Orbito Ads · Español · HTML](https://orbitoads.pro/es/docs/api/webhooks/) Fuentes verificadas · 2026-11-27 ### Explorar la documentación [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Toda la documentación](/es/docs/) Primeros pasos - [Primeros pasos con la API](/es/docs/api/) - [Claves y permisos de cuenta](/es/docs/api/authentication/) - [Documentación para un asistente de IA](/es/docs/api/ai-assistants/) Conceptos - [Interpretar errores de la API](/es/docs/api/errors/) - [Límites de solicitudes y eventos](/es/docs/api/rate-limits/) - [Reintentar una operación](/es/docs/api/idempotency/) - [Seguir una operación en cola](/es/docs/api/tasks/) - [Recorrer páginas de campañas](/es/docs/api/pagination/) Referencia de la API - [Cuentas publicitarias accesibles](/es/docs/api/accounts/) - [Consultar una campaña](/es/docs/api/campaigns/) - [Crear campañas y medios](/es/docs/api/create-campaigns/) - [Modificar campañas existentes](/es/docs/api/manage-campaigns/) - [Estadísticas de campañas y cuentas](/es/docs/api/stats/) - [Diccionarios de segmentación y grupos](/es/docs/api/targeting/) Integraciones - [Recibir eventos de campaña](/es/docs/api/webhooks/) - [Enviar conversiones confirmadas](/es/docs/api/conversions/) - [Versiones y cambios de la API](/es/docs/api/changelog/) Archivos y esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/es/docs/llms.txt) - [llms-full.txt](/es/docs/llms-full.txt) [Orbito Ads](/es/) [Documentación](/es/docs/) [API](/es/docs/api/) Se publican status_change, hourly_digest y ping de prueba. Recibe por HTTPS, valida la firma con el cuerpo original y elimina duplicados antes de procesar. [Markdown](/es/docs/api/webhooks.md) Para recibir cambios sin sondear la API, configura una URL de postback en la tarjeta de la clave en «API y webhooks». Orbito Ads envía por POST los eventos de las cuentas accesibles a esa clave. Cada entrega lleva una firma calculada con el secreto del webhook. ## Eventos | Evento | cuando | | --- | --- | | `status_change` | El estado de una campaña cambió (In Review → Active, Active → Stopped...). Se envió después de cada sincronización del gabinete, e inmediatamente cuando las campañas se activan o apagan en el panel o a través del API . | | `hourly_digest` | A 5 minutos más de cada hora, con los números de la hora que acaba de cerrar — uno POST por gabinete. Horas sin vistas, clics o gastan son saltados. | | `ping` | Cuando presionas **Testes** en la llave. | ### status_change Ejemplo ``` { "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 Ejemplo ``` { "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" } ] } ``` El campo `campaigns` incluye hasta las 200 campañas con mayor gasto. Si hubo cambios en más campañas, `truncated` indica cuántas se omitieron. Los importes de `totals` abarcan todas las campañas y se expresan en la moneda de la cuenta. ## Cabeceras HTTP Ejemplo ``` 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= ``` ## Verificar la firma Concatena `X-Orbito-Timestamp`, un punto y los bytes originales del cuerpo. Calcula HMAC-SHA256 con el secreto del webhook, que se muestra al crear la clave o rotar el secreto. Verifica la firma antes de interpretar el JSON: volver a serializarlo cambia los bytes. Rechaza solicitudes de más de cinco minutos. ### Node.js (Express) Ejemplo ``` 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) Ejemplo ``` 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 ``` ## Entrega de eventos - Su punto final debe ser público **HTTPS** . `http://` , localhost y direcciones privadas se rechazan. - Responder con cualquier `2xx` dentro de **10 minutos** . Hacer un trabajo lento después de responder. - En un error de red o un `5xx` retratamos **Una vez** , 750 ms más tarde, con el mismo `X-Orbito-Delivery` . Un `4xx` no se retrata. - No se siguen las redirecciones. - La tarjeta de la llave en el panel muestra el tiempo, estado y error de la última entrega. ## Cuentas cubiertas por el webhook Una clave recibe eventos únicamente de las cuentas a las que tiene acceso. Un miembro de una agencia recibe los de las cuentas que se le han compartido. La entrega termina en cuanto pierde ese acceso. [Temas y acceso](/es/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## Envío de prueba Pulsa «Probar» en la tarjeta de la clave. Recibirás un evento `ping` con la misma firma que los eventos reales. Ejemplo ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## Referencia de la API El contrato publicitario completo requiere una credencial del proveedor dedicada al espacio de trabajo. El cliente usa su clave API de Orbito. Pedidos, aprovisionamiento y facturación externa siguen procesos separados. Ejemplo · 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" } ] } ``` ## Notas de implementación ## Eventos y configuración Registra un callback HTTPS público en la clave del proveedor. status_change comunica estados, hourly_digest se entrega en el minuto 05 por hora activa de la cuenta y ping prueba la entrega. La configuración está fuera de las 22 operaciones HTTP. ## Firma y reenvío Verifica HMAC-SHA256 con el secreto sobre timestamp, un punto literal y el cuerpo original. Rechaza marcas de más de cinco minutos. Responde 2xx en diez segundos. Un fallo de red o 5xx se reintenta una vez tras 750 ms con el mismo id. ## Operaciones y campos 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} ## Campos y límites del esquema La tabla procede del contrato público v1. Los nombres de campos y parámetros distinguen mayúsculas. Los códigos HTTP separan el resultado correcto, la validación de entrada y el control de acceso. La especificación enlazada define las estructuras completas. ## Intervalo temporal · hourly_digest El webhook hourly_digest cubre la hora que acaba de terminar y se envía cinco minutos después en cada cuenta con tráfico. Guarda la ventana temporal, el ID de cuenta y el de entrega. Distingue la hora del evento de la de recepción. ## Campos y límites del esquema · Recibir eventos de campaña | Campo | Valor documentado | | --- | --- | | 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 | Fuente · [Fuente de datos](https://adsly.pro/docs/api/webhooks/) ## Lecturas relacionadas [Enviar conversiones confirmadas](/es/docs/api/conversions/)[Versiones y cambios de la API](/es/docs/api/changelog/) Revisión de la referencia 2026-10-08 [Tema anterior**Diccionarios de segmentación y grupos**](/es/docs/api/targeting/)[Tema siguiente**Enviar conversiones confirmadas**](/es/docs/api/conversions/) ## Fuentes y datos - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Referência técnica [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) Documentação A referência cobre acesso, campanhas, estatísticas e eventos. Comece listando as contas visíveis com uma chave de leitura. [Ver o índice da documentação](/pt/docs/llms.txt) [Chaves de API](/api-keys?lang=en) Esta documentação explica como usar o Orbito Ads pelo seu aplicativo. A API permite consultar métricas, criar campanhas, alterar lances e textos, pausar e retomar anúncios e movimentar o orçamento. Use os mesmos métodos e uma chave de API para suas contas. ## API - [**Quickstart em** A primeira, a primeira e a primeira campanha através do API - Cerca de cinco minutos.](/pt/docs/api/) - [**Chaves e acesso** Leia-somente e campanhas-managem chaves, que a publicidade conta um alcance chave, equipes agências.](/pt/docs/api/authentication/) - [**Criar campanhas** Canal, bot, busca e alvo de público, uma ou mais de 100 campanhas por chamada.](/pt/docs/api/create-campaigns/) - [**Gestão de Campanhas** Edit, pause e resume, mover o orçamento, copiar, apagar – uma campanha ou mil.](/pt/docs/api/manage-campaigns/) - [**Webhooks** As mudanças de status assinadas em tempo real e uma digestão horária estatística.](/pt/docs/api/webhooks/) - [**Conheça um assistente AI** Mande esses documentos para o CODE ou outro agente de codificação e permita que ele escreva a integração.](/pt/docs/api/ai-assistants/) ## URL base e autenticação Exemplo ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` Crie a chave no painel: [API e Webhooks](/api-keys?lang=en) (Pro e Plano de Agência) Perguntas - [@orbitoads](https://t.me/orbitoads). ## Formatos para leitura por máquina - [OpenAPI 3.1 Específica](/docs/api/openapi.yaml) — todos os parâmetros, parâmetros e código de erro. - [llms.txt](/docs/llms.txt) — o índice AI dos agentes lidos; [llms-full.txt](/docs/llms-full.txt) — todas as páginas em um arquivo. - Cada página tem um Markdown gêmeo: adicionar `.md` ao seu caminho, e.g . [/docs/api.md](/docs/api.md) . O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## Notas de implementação ## Conectar o espaço O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ### Guias de desenvolvimento e acesso à conta **Primeiros passos com a API** Primeiros passos com a API — Liste as contas usando a chave no servidor. Escolha uma, consulte campanhas e crie um rascunho pausado com uma nova chave de idempotência. [**Primeiros passos com a API**](/pt/docs/api/) **Chaves e permissões de conta** Chaves e permissões de conta — Envie a chave pelo servidor em X-API-Key. Selecione uma, várias ou todas as contas permitidas. A escrita exige permissão de gestão na chave e perfil de gestor ou titular. [**Chaves e permissões de conta**](/pt/docs/api/authentication/) **Criar campanhas e enviar mídia** Criar campanhas e enviar mídia — Uma solicitação aceita até 100 campanhas de uma conta. Escolha canais, bots, busca ou público e envie uma chave de operação. [**Criar campanhas e enviar mídia**](/pt/docs/api/create-campaigns/) **Alterar campanhas existentes** Alterar campanhas existentes — Gerencie texto, links, lances, limites diários, horários, orçamento e entrega. Um lote aceita até 1.000 campanhas. [**Alterar campanhas existentes**](/pt/docs/api/manage-campaigns/) **Receber eventos de campanhas** Receber eventos de campanhas — A referência descreve status_change, hourly_digest e ping de teste. Receba via HTTPS, valide a assinatura no corpo original e remova entregas duplicadas. [**Receber eventos de campanhas**](/pt/docs/api/webhooks/) **Documentação para um assistente de IA** Documentação para um assistente de IA — Consulte campos no OpenAPI e comportamento no Markdown. Mantenha as chaves no ambiente do servidor. Teste a leitura antes de habilitar mudanças. [**Documentação para um assistente de IA**](/pt/docs/api/ai-assistants/) [Gerenciar chaves de API e webhooks](/api-keys?lang=en) ## Primeira solicitação Envie GET /api/v1/account/info com X-API-Key. Escolha um id em data e use-o como account_id na próxima solicitação. Os dados e identificadores dos exemplos são fictícios. ## Operações e campos /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## Exemplo de requisição GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ### Referências para leitura por máquinas [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/pt/docs/api.md) ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Documentação para desenvolvedores | Campo | Valor documentado | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | Fonte · [Fonte dos dados](https://adsly.pro/docs/) ## Cabinet | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Primeiros passos com a API](/pt/docs/api/)[Chaves e permissões de conta](/pt/docs/api/authentication/)[Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/)[Alterar campanhas existentes](/pt/docs/api/manage-campaigns/)[Receber eventos de campanhas](/pt/docs/api/webhooks/) [Próximo tópico**Primeiros passos com a API**](/pt/docs/api/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Primeiros passos com a API [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) API Liste as contas usando a chave no servidor. Escolha uma, consulte campanhas e crie um rascunho pausado com uma nova chave de idempotência. Acompanhe a tarefa retornada. [Markdown](/pt/docs/api.md) A API do Orbito Ads oferece no seu aplicativo as mesmas operações de gestão do painel. Uma chave e uma URL base atendem contas de Telegram Ads em Euro, TON e Stars. | Queres... | Usando | | --- | --- | | Puxe campanhas e estatísticas para um painel ou BI | [Campanhas](/pt/docs/api/campaigns/), [Estado](/pt/docs/api/stats/) | | Inicie campanhas a partir de um script, um bot ou seu CRM | [Criar campanhas](/pt/docs/api/create-campaigns/) | | Aumentar lances, pausar perdedores, completar vencedores automaticamente | [Gestão de Campanhas](/pt/docs/api/manage-campaigns/) | | Saiba o momento em que uma campanha é aprovada, declinada ou esgota o orçamento | [Webhooks](/pt/docs/api/webhooks/) | | Contar leads e vendas de seu rastreador contra cada campanha | [Conversões](/pt/docs/api/conversions/) | ## URL base Exemplo ``` https://orbitoads.pro/api/v1 ``` Cada solicitação carrega sua chave no cabeçalho `X-API-Key`. Solicitação e órgãos de resposta são JSON. Todos os tempos são UTC. ## Início rápido ### 1. Criar uma chave No painel abrir **API e Webhooks** → **+ nova chave** ( Pro e Agency planos). Escolha quais armários a chave atinge. Para criar e mudar campanhas, marque **Permitir a gestão de campanhas** — sem ela a chave só lê. Copie a chave: é mostrado uma vez. Exemplo ``` export ORBITO_API_KEY="orb_…" ``` ### 2. Liste os armários que a chave vê Exemplo ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "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 } } ] } ``` Mantenha `id` — é o `account_id` todos os outros usos de chamada. Todo o dinheiro em um armário está em seu `currency` . ### 3. Leia campanhas Exemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. Criar uma campanha (desligada, então nada é gasto) Exemplo ``` 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"] }' ``` Criando palestras para Telegram , então ele é executado em segundo plano. Você começa `202 Accepted` e uma tarefa: Exemplo ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. Espere pela tarefa Exemplo ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` Quando `status` é `completed`, `ad_ids` detém o ID da nova campanha. Agora você pode financiá-lo e ligá-lo: Exemplo ``` 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 avalia cada novo anúncio antes de ser executado; o `status` da campanha mostra onde ele está (ver [Estatutos](/pt/docs/api/campaigns/#doc-note-statuses) ). Um [Webhook](/pt/docs/api/webhooks/) diz-lhe o momento em que ele muda. ## Cinco regras de integração 1. **`ad_id` É único apenas dentro de uma conta de publicidade.** Telegram reutiliza IDs de anúncios entre armários. Armazene e procure campanhas pelo par `(account_id, ad_id)` , e passe `account_id` sempre que uma chave vê mais de um gabinete. 2. **Envie um `Idempotency-Key` Sobre criação, cópia, envelope e chamadas orçamentais** — um novo UUID por operação, o mesmo quando você tentar novamente. Uma repetição então nunca cria uma segunda campanha ou move dinheiro duas vezes. Veja [Impotência](/pt/docs/api/idempotency/) . 3. **Criar, copiar e reembolsar uma tarefa.** Poll `GET /v1/tasks/{id}` até que termine. Veja [Tarefas](/pt/docs/api/tasks/) . 4. **Os campos de dinheiro são as cadeias** ( `"spent": "3.541000"` ) para manter decimais exatos. Analisá-los como decimais antes de fazer aritmética. 5. **Rango em `code`e Show `error`.** Cada erro tem uma máquina estável legível `code` e uma sentença humana em `error` . Veja [Erros](/pt/docs/api/errors/) . ## Estrutura da resposta Exemplo ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## Próximos passos - [Chaves e acesso](/pt/docs/api/authentication/) — chaves de gestão apenas para leitura vs. campanhas, equipas de agências. - [Conheça a Cloed e outros assistentes da AI](/pt/docs/api/ai-assistants/) — deixe um agente de codificação escrever a integração. - [OpenAPI Específica](/docs/api/openapi.yaml) — importação para o Postman, Insônia ou um gerador cliente. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. Exemplo · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` Exemplo · 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 } } ] } ``` ## Notas de implementação ## Primeira solicitação Envie GET /api/v1/account/info com X-API-Key. Escolha um id em data e use-o como account_id na próxima solicitação. Os dados e identificadores dos exemplos são fictícios. ## Identificadores de conta e campanha Guarde account_id e ad_id juntos. O mesmo ad_id pode existir em contas diferentes. Informe account_id ao usar uma chave com acesso a várias contas. ## Aceitação e conclusão Criação, cópia e operações em lote retornam HTTP 202 com id da tarefa. Consulte GET /api/v1/tasks/{id}, respeitando Retry-After. Verifique failed e errors mesmo em completed. ## Operações e campos 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} ## Exemplo de requisição GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Primeiros passos com a API | Campo | Valor documentado | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/) ## CampaignStatus | Campo | Tipo do campo | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Documentação para desenvolvedores](/pt/docs/)[Chaves e permissões de conta](/pt/docs/api/authentication/)[Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Revisão da referência 2026-10-08 [Tópico anterior**Documentação para desenvolvedores**](/pt/docs/)[Próximo tópico**Chaves e permissões de conta**](/pt/docs/api/authentication/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Contas de anúncios acessíveis [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/accounts/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) A lista informa moeda, saldo, nível de acesso e campos aceitos. Guarde o account_id junto com o identificador de campanha. [Markdown](/pt/docs/api/accounts.md) Cada conta no Orbito corresponde a uma conta de anúncios do Telegram Ads. Cada campanha pertence a uma única conta, identificada por `account_id`. ## GET /v1/account/info Retorna as contas às quais esta chave tem acesso no momento. Exemplo ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "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 } } ] } ``` | Campo | significado | | --- | --- | | `id` | O `account_id` para passar para outras chamadas. | | `cabinet_type` | `euro` , `ton` ou `stars` . | | `currency` | `EUR` , `TON` ou `STARS` — a moeda de **Cada um** campo monetário neste gabinete: saldo , orçamento , gasto , CPM . Nunca somar dinheiro entre armários de moedas diferentes. | | `access_level` | Seu acesso: `owner`, `manager` (membro da agência que pode mudar campanhas) ou `viewer` (Membro da Agência, apenas leitura) Escritores precisam `owner` ou `manager`. | | `balance` | Dinheiro no gabinete, ainda não dado a campanhas (cadeia decimal). Refrescado quando o gabinete sincroniza — veja `balance_updated_at` . | | `min_budget` | A menor não-zero `budget` uma nova campanha neste gabinete pode ter. | | `features.ad_button` | O formulário de anúncio do gabinete tem um botão personalizado ( campo `button` na criação/edição). | | `features.crypto_filters` | O formulário de anúncio do gabinete tem filtros de canal criptográfico. | Nas chaves especiais de parceiros que exibem valores ajustados, `balance` retorna `null`. ## Observações - `GET /v1/account/info` custa uma requisição de leitura — chame-a no start-up e quando uma escrita retorna `ACCOUNT_NOT_FOUND` , não antes de cada chamada. - Um armário desaparece da lista quando ele é desativado ou seu acesso a ele é removido. - Os gabinetes são adicionados no painel Orbito Ads; o API gerencia campanhas dentro deles. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## GET `/api/v1/account/info` Lista as contas acessíveis, moedas, limites e permissões. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Sim | 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 } } ] } ``` ## Notas de implementação ## Saldos e moedas Verifique currency, balance_updated_at e min_budget por conta. Valores e taxas em campanhas podem ser strings decimais ou null. Os agregados usam números. Separe EUR, TON e Stars. ## Disponibilidade de recursos features.ad_button indica suporte a botões e features.crypto_filters indica filtros de canais cripto. Confira is_active e access_level antes de exibir ações. ## Operações e campos GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## Exemplo de requisição GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Contas de anúncios acessíveis | Campo | Valor documentado | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/accounts/) ## Cabinet | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Money | Campo | Tipo do campo | | --- | --- | | Money | string \| null | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Consultar uma campanha](/pt/docs/api/campaigns/)[Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/)[Alterar campanhas existentes](/pt/docs/api/manage-campaigns/)[Estatísticas de campanhas e contas](/pt/docs/api/stats/)[Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Revisão da referência 2026-10-08 [Tópico anterior**Percorrer páginas de campanhas**](/pt/docs/api/pagination/)[Próximo tópico**Consultar uma campanha**](/pt/docs/api/campaigns/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Documentação para um assistente de IA [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/ai-assistants/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Consulte campos no OpenAPI e comportamento no Markdown. Mantenha as chaves no ambiente do servidor. Teste a leitura antes de habilitar mudanças. [Markdown](/pt/docs/api/ai-assistants.md) Estas páginas atendem desenvolvedores e assistentes de programação. Cada página está disponível em Markdown, toda a documentação pode ser obtida em um arquivo e o contrato da API está em OpenAPI. Passe ao assistente os links relevantes para a tarefa. ## Arquivos para agentes de IA | Arquivo | O que é | Quando usá-lo | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | Índice de cada página, com resumos de uma linha ( [Formato do Txt](https://llmstxt.org/) ) | Deixe o agente escolher as páginas de que precisa | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | Todas as páginas em um arquivo Markdown (cerca de 80 KB ) | Ferramentas que carregam um arquivo grande inteiro; ferramentas web-fetch pode cortá-lo curto, então prefira `llms.txt` + páginas lá | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec: endpoints, parâmetros, esquemas, códigos de erro | Clientes digitados, validação de pedido, Postman | | `.md` | A página como Markdown, e.g . [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | Um único tópico | Cada página também tem **Copie página como Markdown** no topo — cole-a diretamente em um bate-papo. ## Instrução para integrar a API com o Claude Code Colar isso em Claude Code (ou outro agente de codificação) no projeto que deve falar com Orbito Ads . Editar o último parágrafo para dizer o que você está construindo. Exemplo ``` Integre a API do Orbito Ads a este projeto. Antes de escrever o código, consulte https://orbitoads.pro/pt/docs/llms.txt e as páginas Markdown pertinentes. A documentação completa está em https://orbitoads.pro/pt/docs/llms-full.txt e a especificação OpenAPI em https://orbitoads.pro/docs/api/openapi.yaml. - Use a URL base https://orbitoads.pro/api/v1 e o cabeçalho X-API-Key. Leia ORBITO_API_KEY do ambiente e mantenha a chave fora do código e dos logs. - Identifique a campanha pelo par (account_id, ad_id). O mesmo ad_id pode aparecer em várias contas. - Para cada POST em /campaigns, /campaigns/bulk, /campaigns/{id}/copy ou /campaigns/{id}/budget, envie um novo UUID em Idempotency-Key. Reutilize o mesmo UUID ao repetir aquela operação. - Criação, cópia e operações em lote retornam 202 e uma tarefa. Consulte GET /tasks/{id} respeitando Retry-After até o estado completed ou failed. - Os valores monetários são enviados como strings decimais. Converta-os para um tipo decimal antes da comparação. - Após um 429, aguarde o intervalo de Retry-After. Se uma gravação retornar 5xx, consulte a campanha com GET antes de repetir a operação com outro Idempotency-Key. - Use o campo code nas decisões do programa e o campo error para a mensagem exibida ao usuário. - Escreva um cliente pequeno com métodos tipados e testes que simulem respostas HTTP. Funcionalidade: . ``` ## Instrução para uma tarefa pontual no chat Para uma pergunta em vez de uma mudança de base de código ( Claude.ai , ChatGPT ou qualquer chat com acesso à web): Exemplo ``` Leia https://orbitoads.pro/pt/docs/llms.txt e as páginas de campanhas e estatísticas. Escreva um script Python para a API do Orbito Ads que liste todas as minhas campanhas com status Active, mostre o gasto de cada uma nos últimos 7 dias e ordene a lista por gasto. Leia a chave de ORBITO_API_KEY. ``` ## Regras para o CLAUDE.md do projeto Se o seu projeto tem um `CLAUDE.md` (Claude Code lê-lo no início de cada sessão), adicione este bloco para que cada mudança futura para a integração siga as mesmas regras: Exemplo ``` ## Integração com a API do Orbito Ads - Antes de alterar uma chamada, consulte https://orbitoads.pro/pt/docs/llms.txt, a página .md pertinente e https://orbitoads.pro/docs/api/openapi.yaml. Use os nomes de rotas e campos da especificação. - Leia ORBITO_API_KEY do ambiente e mantenha a chave fora de commits, da saída do terminal e dos logs. - Identifique campanhas por (account_id, ad_id). Envie Idempotency-Key em cada POST que crie campanhas ou movimente saldo. Use um UUID por operação e repita-o nas novas tentativas. - Na criação, na cópia e em operações em lote, consulte GET /v1/tasks/{id}. Concentre mudanças de orçamento, pausas e exclusões de campanhas ativas em um módulo testado. Peça autorização antes de executar scripts avulsos em produção. ``` ## Permissões e segurança do agente - **Criar com uma chave de leitura.** O agente pode explorar dados reais e nada pode mudar. Mude para uma chave com **Gestão de Campanhas** apenas quando o código de escrita é revisto. - **Criar campanhas com `"active": false` e `"budget": 0` enquanto a prova.** Nada corre e nada é gasto; delete-os depois. - **Reduzir o alcance da chave** para um gabinete de testes, enquanto a integração é nova. - **Deixe o agente ler os erros.** Cada erro diz o que corrigir ( `error` ) e carrega um estável `code` e o `param` que estava errado — agentes corrigir seus próprios pedidos a partir destes sem adivinhar. - Tudo o que as alterações API mostram no histórico de campanha do painel marcou **🔌 API** , para que você possa rever o que o agente fez. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. Exemplo · 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' ``` ## Notas de implementação ## Chaves e permissões das contas Guarde X-API-Key no servidor. Leitura basta para relatórios. Alterações exigem gestão de campanhas, acesso de proprietário ou gerente e plano ativo com o recurso habilitado. ## Requisitos reproduzíveis Forneça o contrato OpenAPI, id fictício, operação, resposta esperada e teste de repetição. O servidor lê a chave real no cofre de segredos. Para relatórios comece por contas e campanhas. ## Operações e campos /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 ## Exemplo de requisição GET /docs/api/openapi.yaml ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Documentação para um assistente de IA | Campo | Valor documentado | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/ai-assistants/) ## Leituras relacionadas [Documentação para desenvolvedores](/pt/docs/)[Primeiros passos com a API](/pt/docs/api/)[Chaves e permissões de conta](/pt/docs/api/authentication/) Revisão da referência 2026-10-08 [Tópico anterior**Chaves e permissões de conta**](/pt/docs/api/authentication/)[Próximo tópico**Interpretar erros da API**](/pt/docs/api/errors/) ## Fontes e dados - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Chaves e permissões de conta [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/authentication/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Envie a chave pelo servidor em X-API-Key. Selecione uma, várias ou todas as contas permitidas. A escrita exige permissão de gestão na chave e perfil de gestor ou titular. [Markdown](/pt/docs/api/authentication.md) ## Enviar a chave Envie a chave em um cabeçalho HTTP em todas as requisições. Exemplo ``` X-API-Key: orb_0f3c… (68 caracteres: orb_ seguido de 64 dígitos hexadecimais) ``` A própria chave autentica a requisição. Não há fluxo OAuth nem troca de tokens. Armazene-a no servidor e mantenha-a fora de aplicativos web ou móveis. ## Obter uma chave No painel, abra «API e webhooks» e selecione «Nova chave». Os planos Pro e Agency permitem até 5 chaves ativas por pessoa. Copie a chave ao criá-la: ela só aparece uma vez e o serviço armazena apenas o hash SHA-256. Se a perder, revogue-a e crie outra. ## Permissões da chave | Permissão | Como é que o consegues? | O que permite | | --- | --- | --- | | **Leia** | Cada chave | campanhas, estatísticas, conversões, tarefas, códigos de segmentação, webhooks, enviando conversões para nós | | **Gestão de Campanhas** | tique **Permitir a gestão de campanhas** quando você criar a chave, ou ligue-a mais tarde no cartão da chave | tudo em Leia, além de criar, editar, pausa/resume, orçamento, copiar, ações em massa, excluir, upload de mídia | Uma chave de leitura recebe `403 READ_ONLY_KEY` ao tentar gravar. Use-a em relatórios e painéis. Reserve a permissão de gerenciamento para aplicações autorizadas a alterar campanhas. Nos dois tipos de chave o orçamento circula apenas entre o saldo da conta e suas campanhas, sem possibilidade de saque. Ao gravar, são verificados o plano Pro ou Agency ativo naquele momento e as permissões da função no painel. Se o plano não permitir a operação, a API retorna `403 FEATURE_NOT_AVAILABLE`. ## Contas acessíveis pela chave Ao criar a chave, escolha quais contas ela poderá acessar. | Escopo | A chave alcança | | --- | --- | | Todos os meus armários (por omissão) | cada armário que você pode abrir no painel, incluindo os adicionados mais tarde | | Vários | os armários que você marcou | | Uma conta de publicidade | apenas aquele armário | O escopo somente **Cancelação** o que você pode abrir no painel — ele nunca o amplia. Ele é verificado novamente em cada pedido: quando você perde o acesso a um gabinete, suas chaves perdem-no no mesmo momento. `GET /v1/account/info` sempre lista exatamente o que a chave atinge agora. Se a operação afetar uma conta e a chave acessar várias, informe `account_id`. Quando esse campo estiver ausente, a API retornará `400 ACCOUNT_ID_REQUIRED`. ## Acesso da agência e da equipe API acesso segue o acesso que você tem no painel, armário por gabinete: | Quem você é | Armários onde a sua chave alcança | Pode gerenciar campanhas em | | --- | --- | --- | | Titular da conta (usuário regular) | seus próprios armários | Todos os | | Agency proprietário | seus armários pessoais e de agência | Todos os | | Agency membro da equipa | os armários que a agência compartilhou consigo | armários compartilhados com **Gestor** acesso; **Vêvel** gabinetes permanecer somente leitura | - Os membros da equipe criam suas próprias chaves em sua própria página **API e Webhooks** . O plano da agência os cobre. - O proprietário da agência vê cada chave que a equipe criou sob **API Webhooks e chaves de equipe** — de quem é, se pode gerenciar campanhas, quantos armários alcança, quando foi usado pela última vez — e pode revogar qualquer uma delas. - `GET /v1/account/info` retorna `access_level` para cada gabinete: `owner` , `manager` ou `viewer`. Uma escrita para um gabinete `viewer` retorna `403 VIEW_ONLY_ACCESS`. - Se o proprietário remover um membro, abaixa-lo para Viewer, ou o plano da agência termina, as chaves do membro seguem imediatamente — nada a revogar à mão. O que os papéis significam no painel: **Gestor** — gestão de campanha completa nesse gabinete; **Vêvel** — campanhas e estatísticas apenas. O proprietário também pode deixar um membro adicionar gabinetes, convidar companheiros de equipe ou compartilhar seus próprios gabinetes (nunca acima de seu próprio nível). ## Revogação e rotação de chaves - **Revogação** uma chave em seu cartão no painel. Ele pára de funcionar imediatamente. - **rotação** = criar uma nova chave, implantá-la, em seguida, revogar a antiga. Duas chaves podem ser ativadas ao mesmo tempo, por isso não há tempo de inatividade. - O **Webhook Segredos** (para verificar [Webhooks](/pt/docs/api/webhooks/) ) é separado da chave e pode ser girado por conta própria. ## Armazenamento seguro de chaves - Uma chave por integração, para que você possa revogar uma sem quebrar as outras. - Armazenar chaves em variáveis de ambiente ou um gerenciador secreto. Nunca as commit, nunca colá- las em bate- papos ou tickets. - Prefere chaves somente de leitura; adicione **Gestão de Campanhas** apenas onde o código muda campanhas. - Limitar o âmbito aos gabinetes de uma necessidade de integração. - Se uma chave pode ter vazado, revogá-lo primeiro e investigar em segundo lugar. Cada mudança feita através do API aparece na história da campanha no painel marcado **🔌 API** . ## Erros de autenticação | HTTP | `code` | significado | | --- | --- | --- | | 401 | `API_KEY_MISSING` | sem cabeçalho `X-API-Key` | | 401 | `API_KEY_INVALID` | Chave errada, revogada ou expirada | | 401 | `NO_ACCOUNTS` | a chave não atinge nenhum gabinete ativo agora | | 403 | `READ_ONLY_KEY` | uma escrita com uma chave que não tem campanhas Gerenciar | | 403 | `VIEW_ONLY_ACCESS` | uma escrita para um gabinete partilhado com você como Visualizador | | 403 | `FEATURE_NOT_AVAILABLE` | o plano não inclui esta ação | | 403 | `WRITE_NOT_ALLOWED` | este tipo de chave (emitido por Orbito Ads para parceiros) não pode escrever | Consulte a lista completa de códigos em «[Erros](/pt/docs/api/errors/) da API». O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## Notas de implementação ## Conectar o espaço O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## Chaves e permissões das contas Guarde X-API-Key no servidor. Leitura basta para relatórios. Alterações exigem gestão de campanhas, acesso de proprietário ou gerente e plano ativo com o recurso habilitado. Resultados da solicitação e campos de resposta | API | HTTP | Significado | | --- | --- | --- | | API_KEY_MISSING | 401 | Envie a chave no cabeçalho X-API-Key. | | API_KEY_INVALID | 401 | A chave é inválida, expirou ou foi revogada. | | NO_ACCOUNTS | 401 | A chave não tem acesso a nenhuma conta de anúncios ativa. | | READ_ONLY_KEY | 403 | A chave permite leitura. Alterar campanhas exige permissão de gestão. | | VIEW_ONLY_ACCESS | 403 | O perfil Viewer permite consulta. Para alterar a conta é necessária permissão de escrita. | | FEATURE_NOT_AVAILABLE | 403 | O plano atual não inclui essa operação. | | WRITE_NOT_ALLOWED | 403 | O tipo de chave que o fornecedor emite para parceiros não permite escrita. | [Interpretar erros da API](/pt/docs/api/errors/) ## Escopo e revogação A chave do provedor pode abranger uma, algumas ou todas as contas autorizadas. O escopo é verificado em cada chamada. Planos elegíveis permitem cinco chaves ativas por pessoa. Revogue chaves perdidas e gire o segredo do webhook à parte. ## Operações e campos X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## Exemplo de requisição GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Chaves e permissões de conta | Campo | Valor documentado | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/authentication/) ## Cabinet | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Documentação para desenvolvedores](/pt/docs/)[Primeiros passos com a API](/pt/docs/api/)[Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Revisão da referência 2026-10-08 [Tópico anterior**Primeiros passos com a API**](/pt/docs/api/)[Próximo tópico**Documentação para um assistente de IA**](/pt/docs/api/ai-assistants/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Consultar uma campanha [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/campaigns/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Filtre por status e destino ou consulte a campanha e seu histórico. Use account_id e ad_id juntos, pois IDs de anúncio podem se repetir em contas distintas. [Markdown](/pt/docs/api/campaigns.md) Na API, cada campanha representa um anúncio do Telegram. Identifique-a pelo par `(account_id, ad_id)`. Contas diferentes podem reutilizar o mesmo `ad_id`. ## Campos do objeto de campanha `GET /v1/campaigns/{ad_id}` retorna: Exemplo ``` { "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" } ``` | Campo | significado | | --- | --- | | `title` | O teu nome interno para o anúncio. | | `text` | O anúncio que as pessoas vêem. | | `status` | O que Telegram está fazendo com o anúncio — veja [Estatutos](/pt/docs/api/campaigns/#doc-note-statuses) . | | `active` | O que você pediu: `true` = deve executar. Uma campanha com `active: true` e status `Stopped` retoma assim que tem orçamento novamente. | | `promote_url` / `tme_path` | O que o anúncio leva a: um site URL , ou um link `t.me/` (canal, bot, mini-app, post). | | `target_type` | `channels` , `bots` , `search` ou `users` — ver [Criar campanhas](/pt/docs/api/create-campaigns/) . | | `targets` | Usernames os alvos de anúncios (canais ou bots), quando conhecido. | | `cpm` | Licitação por 1.000 visualizações, na moeda do gabinete. | | `budget` | O dinheiro **Leia** na campanha. `budget + spent` é tudo o que foi dado. | | `spent` | Dinheiro gasto até agora. | | `daily_budget` | Limite de gastos diários, se estiver definido. | | `views`, `clicks`, `actions`, `opens` | Contadores vitalícios. `actions` são ações de plataforma (juntas, bot starts) — não suas conversões; para aqueles que vêem [Conversões](/pt/docs/api/conversions/) . | | `ctr`, `cvr` | Percentagens: `"1.15"` significa 1,15 %. | | `cpc`, `cpa` | Custo por clique e por ação. | | `views_per_user` | Quantas vezes uma pessoa pode ver o anúncio (1–4). | | `schedule` | Dias de semana e horas o anúncio é exibido, ou `null` — ele funciona 24 horas por dia. Veja [calendário](/pt/docs/api/manage-campaigns/#doc-note-schedule) . | | `group_id` | O grupo da campanha no painel, se houver. | | `auto_cpm_enabled` | A Auto CPM da Orbito Ads gere a oferta. | | `date` | Quando o anúncio foi criado: unix segundos, como uma string. | | `status_changed_at` | Última mudança de status. Não tocada pelas atualizações de estatísticas — bom para “o que mudou desde”. | | `synced_at` | Quando o ad’s próprios ajustes — `schedule`, `text`, `views_per_user`, targeting — foram a última leitura do Telegram. Veja [Fresquência](/pt/docs/api/campaigns/#doc-heading-freshness). | **Os campos de dinheiro são cadeias decimal** (`cpm`, `budget`, `spent`, `ctr`, `cvr`, `cpc`, `cpa`Os decimados permanecem exatos. Apresentação (`views`, `clicks`, `actions`, `opens`São números. Todos os recursos estão na moeda da conta de publicidade (ver [Conta de publicidade](/pt/docs/api/accounts/)). ## Estados | Status | significado | O que você pode fazer | | --- | --- | --- | | `Active` | correndo . | Pausa, mudança de oferta, adicionar orçamento. | | `In Review` | Aguardando a revisão de Telegram; ainda não apresentada. | Espere — um webhook lhe diz quando ele muda. | | `Declined` | Telegram rejeitou o anúncio. | Edite o texto ou link (reenvia), ou crie um novo. | | `On Hold` | Desligado — por você ou por uma regra de automação. | Resumo → | | `Stopped` | O orçamento acabou. | Adicionar orçamento; ele funciona novamente se `active` é `true` . | | `Paused` | Pausado por Telegram para todo o gabinete (raro). | Contacte [@orbitoads](https://t.me/orbitoads) . | | `Deleted` | Removido. Mantido na história, escondido das listas. | — | ## GET /v1/campaigns Campanhas de cada gabinete que a chave alcança. Exemplo ``` 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" ``` | Parâmetros | Definição | significado | | --- | --- | --- | | `account_id` | — | Apenas este gabinete. ( `accountId` também funciona.) | | `status` | todos, mas excluídos | Um ou vários estados, separados por vírgulas. | | `title` | — | O título contém este texto. | | `bot_username` | — | Anúncios de um bot ou canal: corresponde ao nome de usuário em `tme_path`, caso-insensível, no `@`. `foo` não corresponde a `foobar`. | | `promote_domain` | — | Anúncios do site cujo link está neste host. Aceita `example.com` ou um URL completo; `www.`, esquema, caminho e porta são ignorados. | | `promote_domain_mode` | `exact` | `suffix` também corresponde a subdomínios ( `x.example.com` ). | | `type` | — | `bot` (bots e mini-apps), `channel` (canais, grupos, posts) ou `site` (sites externos). | | `limit` | 100 | 1–500. | | `cursor` | — | Paginação — ver [Paginação](/pt/docs/api/pagination/) . Recomendado. | | `offset`, `sortBy`, `sortOrder` | — | Paginação por deslocamento (≤ 500 por armário). | Os filtros combinam com AND . Um bot ou domínio desconhecido retorna uma lista vazia, não um erro. Exemplo ``` { "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 } } ``` ## Consultar uma campanha `GET /v1/campaigns/{ad_id}` — o objeto completo acima, incluindo segmentação, campos criativos e `schedule` (o endpoint da lista deixa aqueles para fora para ficar rápido). Campanhas apagadas são devolvidas também, com `status: "Deleted"` . Exemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id` é necessário apenas quando o mesmo `ad_id` existe em vários de seus gabinetes ( `400 ACCOUNT_ID_REQUIRED` lhe diz). ### Fresquência Contadores e status são atualizados para cada campanha a cada hora. As próprias configurações do anúncio — `schedule`, `text`, `views_per_user`, visando — vêm da leitura do anúncio em si, então: - `GET /v1/campaigns/{ad_id}` re-ler o anúncio de Telegram quando nossa cópia é mais velha do que **5 minutos** , antes de responder. Uma mudança que alguém fez diretamente na interface de anúncio do Telegram aparece aqui dentro dessa janela. - Campanhas em execução ( `Active` , `In Review` , `On Hold` ) também são re-ler em segundo plano a cada 3 horas. - As alterações feitas através de Orbito Ads — o painel ou este API — estão na cópia imediatamente. Se Telegram não responder a tempo, você obtém a cópia armazenada; `synced_at` diz-lhe que idade tem. ## GET /v1/campaigns/{ad_id}/history Os totais de uma campanha ao longo de um período — um único agregado, não pontos horários. Exemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "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` (padrão), `7d` , `30d` ou `custom` com `startDate` / `endDate` ( `YYYY-MM-DD` , UTC) e facultativo `startHour` / `endHour` ( 0–23 ) Não existem dados para o período → `404 NOT_FOUND` . ## Sincronizar uma cópia local 1. Página `GET /v1/campaigns?cursor=` e upsert por `(account_id, ad_id)` . 2. Subscreva [Webhooks](/pt/docs/api/webhooks/) para alterações de status e estatísticas horárias em vez de votação a cada minuto. 3. Re-sincronizar totalmente uma vez por dia para pegar qualquer coisa que um webhook perdeu. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## GET `/api/v1/campaigns` Consulta campanhas filtradas com paginação. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `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` | Sim | 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}` Obtém uma campanha com segmentação, criativo e programação. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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` Lê os totais de uma campanha no período de datas ou horas. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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" } } ``` ## Notas de implementação ## Identificadores de conta e campanha Guarde account_id e ad_id juntos. O mesmo ad_id pode existir em contas diferentes. Informe account_id ao usar uma chave com acesso a várias contas. ## Filtros e status Filtros usam AND e status aceita valores separados por vírgula. A lista omite Deleted por padrão, o detalhe pode retorná-lo. active guarda a intenção de entrega e status a decisão da plataforma. ## Operações e campos 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 ## Exemplo de requisição GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Consultar uma campanha | Campo | Valor documentado | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | Campo | Tipo do campo | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Contas de anúncios acessíveis](/pt/docs/api/accounts/)[Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/)[Alterar campanhas existentes](/pt/docs/api/manage-campaigns/)[Estatísticas de campanhas e contas](/pt/docs/api/stats/)[Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Revisão da referência 2026-10-08 [Tópico anterior**Contas de anúncios acessíveis**](/pt/docs/api/accounts/)[Próximo tópico**Criar campanhas e enviar mídia**](/pt/docs/api/create-campaigns/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Versões e mudanças da API [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/changelog/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) A versão aparece no caminho. O cliente deve aceitar campos adicionais e novos valores de enumeração. Outubro de 2026 inclui horários, operações e totais por período. [Markdown](/pt/docs/api/changelog.md) ## Versões da API A versão está no caminho: `/api/v1` . Dentro de `v1` só fazemos **Aditiva** alterações: | Aditivo (pode acontecer a qualquer momento) | Quebrar (somente numa nova versão) | | --- | --- | | novos parâmetros | remover ou renomear um ponto final ou campo | | novos campos de pedidos opcionais | um novo campo obrigatório | | novos campos de resposta | alterar o tipo ou significado de um campo | | novos valores em enums ( `status` , erro `code` ) | removendo um valor de enum | | novos códigos de erro | tornando um pedido válido inválido | Então escreva clientes que **Desconheça os campos que não conhece** e **- Manusear valores enum desconhecidos e códigos de erro** graciosamente. Uma mudança de ruptura iria enviar como `/api/v2` , anunciado aqui primeiro, com `v1` continuou correndo ao lado dele. ## Histórico de alterações ### 2026-10-26 — totais do período - **Nova em:** cada `topCampaigns` fila de [`GET /v1/stats/analytics`](/pt/docs/api/stats/#doc-note-get-v1statsanalytics) carrega `cpm` — gastar por 1.000 visualizações ao longo do período — próximo a `cpc` e `cpa` . - **Ficou em:** uma janela de um ou dois dias agora soma exatamente aos mesmos dias solicitados como um intervalo. Os primeiros minutos após a meia-noite ( UTC ) usado para cair de tais janelas, então um único dia voltou cerca de 1-2% baixo; intervalos de três dias e mais já estavam certos e não mudar. - **Ficou em:** uma janela de até dois dias que começa mais de 29 dias para trás retornou zeros; agora retorna os números desse dia. ### 2026-10-08 — calendário de anúncios - **Nova em: `schedule`** — mostrar uma campanha apenas em dias de semana e horas escolhidos. Defina-o em criar, `PATCH /v1/campaigns/{ad_id}` , cópia, ou muitas campanhas ao mesmo tempo com a ação em massa **set_schedule** ; `null` remove-lo. `GET /v1/campaigns/{ad_id}` devolve-lo. Formato: [calendário](/pt/docs/api/manage-campaigns/#doc-note-schedule) . Ele não liga ou desliga a campanha. - Pausar, retomar e editar uma campanha mantém sua agenda; cópias e campanhas recriadas herdam-na. - **Ficou em:** `PATCH /v1/campaigns/{ad_id}` com apenas `cpm` , `active` e/ou `schedule` enviou a campanha de volta à revisão Telegram. Estes agora passam por Telegram próprios formulários de licitação e status e nunca desencadear uma revisão; outros campos ainda fazem ( regra Telegram) — ver [Edit](/pt/docs/api/manage-campaigns/#doc-note-edit) . - **Ficou em:** definir um cronograma em uma campanha sem orçamento poderia enviá-lo de volta para revisão. Essa campanha agora responde `400` com `param: "schedule"` e é deixada intocada — adicionar orçamento primeiro, em seguida, definir o calendário. - **`GET /v1/campaigns/{ad_id}` É atualizado hoje:** re-ler o anúncio de Telegram quando nossa cópia é mais velha do que 5 minutos, assim `schedule`, `text` e `views_per_user` refletem mudanças feitas diretamente em Telegram. Novo campo **synced_at** diz quando o anúncio foi lido pela última vez. Veja [Fresquência](/pt/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08 — gestão de campanhas - **Nova: escrever acesso.** Chaves podem agora transportar **Gestão de Campanhas** : `POST /v1/campaigns` (criar, até 100 por chamada), `PATCH /v1/campaigns/{ad_id}`, `POST …/pause`, `…/resume`, `…/budget`, `…/copy`, `POST /v1/campaigns/bulk`, `DELETE /v1/campaigns/{ad_id}`, `POST /v1/media`. As chaves existentes permanecem somente leitura até que você a ligue. - **Novos leitores:** `GET /v1/campaigns/{ad_id}` (uma campanha com alvo), `GET /v1/tasks/{id}` , `GET /v1/groups` , `GET /v1/targeting` . - **Membros da equipe da Agência** pode criar chaves; uma chave atinge os gabinetes compartilhados com o membro, em seu nível de acesso. O proprietário da agência vê todas as chaves de equipe ( API & Webhooks → Chaves de equipe) e pode revogá-los. - **Idempotency-Key** necessário para criar, copiar, a granel e orçamento. - **Limite de taxa de escrita separada:** 30 pedidos por minuto, para além das 60 leituras. - **`GET /v1/account/info`** Adição `access_level`, `currency`, `balance`, `balance_updated_at`, `min_budget`, `features`. - **Erros** adicionar `code` e `request_id` próximo ao texto `error` inalterado. A `500` não mais inclui texto de erro interno. - `account_id` é aceito em todos os lugares `accountId` foi (ambos trabalho). - **Ficou em:** `GET /v1/stats?period=all` retornou custo por clique como `cpa` ; agora é custo por ação, como em todos os outros períodos. ### 2026-10-04 - URL filtros aplicam-se a ambos os webhooks; `status_change` só atinge chaves cujo proprietário pode ver o gabinete. ### 2026-09-18 - Conversões têm seu próprio orçamento (20 eventos/s) além do limite de leitura; lotes de até 1.000 eventos. ### 2026-06-30 - Conversões de entrada: `POST /v1/postback`, `GET /v1/ingest/{token}` , `GET /v1/conversions` . ### Antes - `GET /v1/campaigns` com paginação do cursor e os filtros `bot_username` , `promote_domain` e `type`; endpoints de estatísticas; `status_change` e `hourly_digest` webhooks. O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## Notas de implementação ## Rotas versionadas O contrato atual usa /api/v1. Mudanças aditivas podem incluir campos opcionais, operações, valores e erros. Preserve estados desconhecidos e ignore campos que não usa. ## Mudanças a acompanhar O esquema inclui programações semanais, escrita por conta e CPM em topCampaigns. Alterar tipo, remover campo ou exigir novo dado de entrada requer nova versão. ## Operações e campos /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 ## Exemplo de requisição GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Versões e mudanças da API | Campo | Valor documentado | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/changelog/) ## Leituras relacionadas [Receber eventos de campanhas](/pt/docs/api/webhooks/)[Enviar conversões confirmadas](/pt/docs/api/conversions/) Revisão da referência 2026-10-26 [Tópico anterior**Enviar conversões confirmadas**](/pt/docs/api/conversions/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Enviar conversões confirmadas [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/conversions/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Envie do servidor ou tracker a referência da campanha ou convite, o evento e o ID único da transação. Valor e moeda permitem relacionar receita e gasto. [Markdown](/pt/docs/api/conversions.md) O Telegram contabiliza impressões, cliques e entradas. Seu servidor ou rastreador identifica o que ocorre depois, como um cadastro, um depósito ou uma venda. Envie esses eventos ao Orbito Ads para consultar conversões e receita por campanha no painel, nos relatórios e nas regras de automação. ## Ativar o acompanhamento de conversões No cartão da chave no painel, ligue **Recebendo Postback** . Sem ele, o envio retorna `403 INGEST_DISABLED` . Para um rastreador, também pressione **Apresentação de URL Tracker** — você recebe um somente gravação URL (mostrado uma vez) que pode postar conversões, mas não pode ler nada. ## Como a conversão é atribuída à campanha Cada anúncio se conecta em algum lugar com um identificador que você controla: - um bot ou mini-app: `t.me/yourbot?start=REF` ou `?startapp=REF` - um site: o ID do seu rastreador ou sub ID no link, e.g . `https://site.com/?subid=REF` Quando você envia uma conversão, inclua que `REF` como `ref` . Orbito Ads encontra a campanha cujo link o carrega, nos gabinetes a chave atinge. Se várias campanhas de um gabinete compartilhar o mesmo `ref` , a conversão conta para cada um deles. ## Pelo servidor · POST /v1/postback Exemplo ``` 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" }' ``` Exemplo ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` Até 1.000 eventos ao mesmo tempo: `{ "events": [ {…}, {…} ] }` (ou um conjunto nu). A resposta relata cada um — `{ "accepted": 998, "failed": 2, "results": [ … ] }` — de modo que um evento ruim nunca afunda o lote. ## Pelo rastreador · GET /v1/ingest/{token} Cole o rastreador URL nas configurações de postback do seu rastreador, com suas macros: Exemplo ``` # 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} ``` Verifique os nomes macro com a própria documentação do seu rastreador. A resposta é texto simples: `OK` , `OK (deduped)` , ou uma mensagem de erro com seu status HTTP (4xx — não tente novamente, 5xx — tente novamente). ## Campos | Campo | Também aceite como | necessária | significado | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | 1o | O identificador do link do anúncio. Até 512 caracteres. | | `invite_link` | `invitelink`, `link` | 1o | Para anúncios de canais: o link exclusivo para convites Orbito Ads criado. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | Sim | Torna-se `lead`, `conversion` ou `purchase` (palavras como `signup`, `ftd`, `deposit`, `sale` são entendidas). | | `txid` | `tid`, `transaction_id` , `order_id` , `rdtk_event_id` , cabeçalho `X-Idempotency-Key` | Sim | Seu id para este evento. Enviando o mesmo `txid` novamente atualiza o evento em vez de contá- lo duas vezes. Até 128 caracteres. | | `amount` | `payout`, `sum`, `revenue`, `value` | Não | Número; negativo para recargas. | | `currency` | `cur`, `cnv_currency` | Não | ISO 4217 código. Sem um, um montante é registrado como USD . | | `status` | — | Não | A palavra de status da sua rede (aprovada, pendente...), armazenada como está. | | `event_time` | `timestamp`, `date` | Não | ISO ou unix tempo; mantido nos últimos 90 dias. | | `account_id` | `accountId` | Às vezes | Necessário quando o mesmo `ref` existe em vários de seus gabinetes (`409` caso contrário). | | `meta` | — | Não | Seu próprio objeto JSON, até 4 KB. | 1 `ref` ou `invite_link`. ## Limites e novas tentativas 20 eventos por segundo por chave, com explosões de até 1.000 — separados dos orçamentos de leitura e escrita. Em `429` esperar `Retry-After` ; retentar é sempre seguro porque `txid` deduplicados. ## GET /v1/conversions Totais por campanha, contados uma vez por evento: Exemplo ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | Parâmetros | significado | | --- | --- | | `adId` | Uma campanha. | | `days` | Apenas os eventos recebidos nos últimos 1-365 dias. | - `revenue` é por moeda — os montantes nunca são convertidos. - `ad_id` é `null` para eventos combinados por um `ref` que várias campanhas compartilham. - Os montantes que você envia são o seu próprio relatório. Eles não são cobrados e não mudam nada que você paga Orbito Ads . ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## POST `/api/v1/postback` Envia uma conversão ou um lote de até 1.000 eventos. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Sim | 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 } } ``` ### Esquema do corpo 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}` Envia conversão do rastreador por uma URL exclusiva para gravação. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `token` | path | `string` | Sim | | `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` Consulta conversões e receita por moeda original. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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 } } ] } ``` ## Notas de implementação ## Associar evento ao anúncio Ative o recebimento na chave do provedor. Envie ref ou invite_link, event e um txid estável. Eventos canônicos são lead, conversion e purchase. Inclua account_id se a referência corresponder a várias contas. Resultados da solicitação e campos de resposta | API | Significado | | --- | --- | | account_id / accountId | accountId é um alias de account_id. Informe a conta quando o mesmo ref aparecer em várias contas. Correspondência ambígua retorna HTTP 409. | ## Duplicatas e moeda Repetir txid atualiza o evento. Um lote pode ter sucessos e falhas. Informe moeda ISO para receita, o padrão é USD. Valor negativo representa estorno. A URL do rastreador apenas grava e retorna OK ou OK (deduped) em texto. ## Operações e campos 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 ## Exemplo de requisição GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Enviar conversões confirmadas | Campo | Valor documentado | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | Campo | Tipo do campo | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | Campo | Tipo do campo | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Receber eventos de campanhas](/pt/docs/api/webhooks/)[Versões e mudanças da API](/pt/docs/api/changelog/) Revisão da referência 2026-10-08 [Tópico anterior**Receber eventos de campanhas**](/pt/docs/api/webhooks/)[Próximo tópico**Versões e mudanças da API**](/pt/docs/api/changelog/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Criar campanhas e enviar mídia [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/create-campaigns/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Uma solicitação aceita até 100 campanhas de uma conta. Escolha canais, bots, busca ou público e envie uma chave de operação. Carregue a mídia antes e acompanhe a tarefa. [Markdown](/pt/docs/api/create-campaigns.md) `POST /v1/campaigns` cria campanhas em uma conta. Exige uma chave com permissão de gerenciamento e o cabeçalho `Idempotency-Key`. A resposta `202` contém uma [tarefa](/pt/docs/api/tasks/). As campanhas aparecem quando ela termina. ## Exemplo de criação de campanha Exemplo ``` 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"] }' ``` Exemplo ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## Criação em lote Coloque as campanhas em `campaigns` (até 100). `account_id` e os campos do grupo permanecem no nível superior e se aplicam a todos eles. Exemplo ``` { "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"] } ] } ``` As campanhas são criadas uma após a outra. Se a primeira falhar, a tarefa pára — corrija a entrada em vez de repetir o mesmo erro 100 vezes. Cada falha está listada no `errors` da tarefa com o seu `index` no seu array. ## Campos | Campo | necessária | significado | | --- | --- | --- | | `title` | Sim | Nome interno, mostrado no painel. | | `text` | Sim | As pessoas do texto do anúncio ver. Telegram próprio comprimento e regras de conteúdo se aplicam — uma recusa volta no `errors` da tarefa. | | `promote_url` | Sim | O que o anúncio abre: `https://t.me/channel`, `t.me/bot?start=ref` , `@channel` ou um site URL . | | `cpm` | Sim | Licitação por 1.000 visualizações na moeda do gabinete, maior que 0. Muito baixo para o alvo → Telegram 's mínimo volta no erro. | | `budget` | Sim | Dinheiro movido do saldo do gabinete para a campanha: `0`, ou pelo menos `min_budget` do gabinete ( [Conta de publicidade](/pt/docs/api/accounts/) ). Com `0` o anúncio é criado, mas não pode ser executado até que você adicionar orçamento. | | `target_type` | Sim | `channels` , `bots` , `search` ou `users` — ver abaixo. | | `active` | Não | `false` cria-o desligado. padrão `true` . | | `daily_budget` | Não | Boné de gastos diários. | | `views_per_user` | Não | Quantas vezes uma pessoa pode ver o anúncio, 1-4. | | `media` | Não | Imagem ou vídeo token de [`POST /v1/media`](/pt/docs/api/create-campaigns/#doc-note-upload-media) . | | `picture` | Não | `true` mostra o avatar do canal promovido no anúncio. | | `button` | Não | Botão sob o anúncio: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request` . Apenas onde `features.ad_button` do armário é `true`. | | `website_name` | Não | Marca mostrada acima de um anúncio do Web site. | | `schedule` | Não | Mostrar o anúncio apenas nos dias e horas escolhidos, por exemplo, dias da semana 9:00–18:00. Formato de forma: [calendário](/pt/docs/api/manage-campaigns/#doc-note-schedule). Sem ele, o anúncio corre em torno do relógio. | Apenas nível superior: `account_id` (necessário quando a chave atinge vários gabinetes), `group_id` (um existente [Grupo](/pt/docs/api/targeting/#doc-note-groups) ) ou `new_group_name` (cria o grupo, ou reutiliza um com esse nome). Campos desconhecidos são recusados com `400 VALIDATION_ERROR` e o nome do campo em `param` — um erro de digitação nunca deixa cair silenciosamente uma configuração. ## Segmentação ### `channels` — mostrar o anúncio em canais específicos Exemplo ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | Campo | significado | | --- | --- | | `channels` | 1–100 canais públicos: `@name` , `name` ou `t.me/name` . | | `languages`, `topics`, `exclude_topics` | Estreita por canal linguagem e tópico ( [Códigos](/pt/docs/api/targeting/) ). | | `add_similar_channels` | Adicione também canais semelhantes a estes. | ### `bots` — mostrar o anúncio em bots Exemplo ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots` : 1–100 bots públicos. Necessário. ### `search` — mostrar o anúncio para Telegram consultas de pesquisa Exemplo ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords` : 1–100 frases, até 64 caracteres cada. Requerido. ### `users` — mostrar o anúncio a uma audiência Exemplo ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | Campo | significado | | --- | --- | | `countries` | ISO códigos de países. | | `languages` | Códigos de linguagem. | | `topics`, `exclude_topics` | Interesses por id tópico. | | `audience_channels` | Pessoas que lêem estes canais. | Pelo menos um destes é necessário. Códigos: [Código de Targeting](/pt/docs/api/targeting/) . Canais, bots e palavras-chave são resolvidos para os próprios IDs de Telegram quando a tarefa é executada. Os Telegram não conseguem encontrar são ignorados; se nenhum for encontrado, essa campanha falha — `No targets found: …` para canais e bots, `No valid search queries found` para palavras-chave — e a tarefa `errors` diz isso. ## Após criar a campanha 1. Poll [`GET /v1/tasks/{id}`](/pt/docs/api/tasks/) até `completed` . `ad_ids` realiza as novas campanhas. 2. Telegram avaliações cada novo anúncio: ele começa `In Review` , em seguida, torna-se `Active` (ou `Declined`). Um [Webhook](/pt/docs/api/webhooks/) diz-lhe quando. 3. Mude, financie ou pause com [Gestão de Campanhas](/pt/docs/api/manage-campaigns/) . ## Enviar arquivos de mídia `POST /v1/media` carrega uma imagem ou vídeo em um gabinete e retorna um `media` token para `POST /v1/campaigns`, `PATCH` e copiar. O token pertence a esse gabinete — upload para o gabinete que você vai criar. Exemplo ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` Exemplo ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG, PNG, GIF, WEBP ou MP4, até 10 MB, enviados como `multipart/form-data` no campo `file`. - Alguns gabinetes aceitam apenas 16:9 imagens de pelo menos 640 px de largura; se um arquivo não cabe, Telegram 's razão volta em `error` . ## Erros | Código | Quando | | --- | --- | | `VALIDATION_ERROR` | Falta um campo, desconhecido, do tipo errado, ou não pertence a este `target_type` — `param` diz qual. | | `IDEMPOTENCY_KEY_REQUIRED` | No `Idempotency-Key` . | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | Diga qual armário / esse gabinete não é acessível. | | `VIEW_ONLY_ACCESS` | Você tem acesso ao Viewer neste gabinete. | | `QUEUE_FULL` | 5 cria já em fila neste gabinete. | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | O gabinete não pode tomar mudanças manuais agora. | Falhas de campanha individuais (Telegram recusaram um texto, um lance, um link) não falham no pedido — aparecem no `errors` da tarefa. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## POST `/api/v1/campaigns` Enfileira uma campanha ou um lote de até 100 em uma conta. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Sim | | `X-API-Key` | header | `string` | Sim | 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": [] } } ``` ### Esquema do corpo 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" } ] } ``` Resultados da solicitação e campos de resposta | API | HTTP | Significado | | --- | --- | --- | | VALIDATION_ERROR | 400 | Revise os campos e corrija os valores antes de tentar novamente. | | IDEMPOTENCY_KEY_REQUIRED | 400 | Inclua o cabeçalho obrigatório Idempotency-Key na escrita. | | VIEW_ONLY_ACCESS | 403 | O perfil Viewer permite consulta. Para alterar a conta é necessária permissão de escrita. | | QUEUE_FULL | 429 | A conta já tem cinco tarefas de criação na fila. Aguarde uma vaga. | [Interpretar erros da API](/pt/docs/api/errors/) ## POST `/api/v1/media` Envia mídia e recebe um token da conta selecionada. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | | `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 } } ``` ### Esquema do corpo JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` Exemplo · 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" ] } ] } ``` ## Notas de implementação ## Uma campanha ou um lote Para uma campanha use title, text, promote_url, cpm, budget e target_type na raiz. Para lote use entre 1 e 100 em campaigns e compartilhe conta e grupo na raiz. O orçamento é zero ou no mínimo min_budget. ## Segmentação e arquivos Use channels, bots, search ou users. Listas de canais, bots e buscas aceitam 1–100 itens e frases de até 64 caracteres. Público exige um filtro. JPG, PNG, GIF, WebP e MP4 até 10 MB ficam vinculados à conta de envio. ## Aceitação e conclusão Criação, cópia e operações em lote retornam HTTP 202 com id da tarefa. Consulte GET /api/v1/tasks/{id}, respeitando Retry-After. Verifique failed e errors mesmo em completed. ## Operações e campos POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## Exemplo de requisição GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Configuração do teste de público O esquema de criação distingue quatro modos. Os canais vão em channels, os bots em bots e os termos em search_keywords. Países, idiomas e temas descrevem o público de usuários. Consulte os recursos da conta antes do teste. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Criar campanhas e enviar mídia | Campo | Valor documentado | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | Campo | Tipo do campo | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Contas de anúncios acessíveis](/pt/docs/api/accounts/)[Consultar uma campanha](/pt/docs/api/campaigns/)[Alterar campanhas existentes](/pt/docs/api/manage-campaigns/)[Estatísticas de campanhas e contas](/pt/docs/api/stats/)[Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Revisão da referência 2026-10-08 [Tópico anterior**Consultar uma campanha**](/pt/docs/api/campaigns/)[Próximo tópico**Alterar campanhas existentes**](/pt/docs/api/manage-campaigns/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Interpretar erros da API [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/errors/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Leia o status HTTP e o código de erro em conjunto. A ausência de chave retorna 401. Corrija a entrada antes de repetir a escrita e respeite a espera ao atingir o limite. [Markdown](/pt/docs/api/errors.md) ## Formato de resposta Cada erro tem a mesma forma: Exemplo ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | Campo | sempre | significado | | --- | --- | --- | | `error` | Sim | Uma frase que uma pessoa pode ler. Mostre - a; não a analise — a redação pode melhorar. | | `code` | sim em todos os erros v1 | Estável, legível por máquina. | | `param` | sobre os erros de entrada | O campo que estava errado, como um caminho: `cpm`, `campaigns[2].channels[0]`, `account_id`. | | `request_id` | na maioria dos erros | O mesmo que o cabeçalho de resposta `X-Request-Id`. | Alguns erros adicionam contexto: `min_cpm` e `currency` quando Telegram recusa uma licitação como muito baixa, `missing` com `UNKNOWN_AD_IDS` , `limit` com `QUEUE_FULL` . ## Códigos de status HTTP | Status | significado | E retorno? | | --- | --- | --- | | 200 | Dona | — | | 202 | Aceitado, em segundo plano — sondagem [Tarefa](/pt/docs/api/tasks/) | — | | 400 | O pedido está errado (campo, valor, falta `account_id` ) — ou Telegram recusou a alteração | Não — corrigir o pedido | | 401 | Nenhuma chave, chave ruim, ou a chave não atinge nenhum armário | Não | | 403 | A chave ou plano não é permitido para fazer isso | Não | | 404 | Não encontrado entre os armários esta chave atinge | Não | | 409 | Conflito com o estado atual (cabina bloqueada, sessão Telegram expirada, mesmo pedido em andamento) | Às vezes — veja o código | | 413 | Arquivo muito grande | Não | | 422 | `Idempotency-Key` reutilizado para um pedido diferente | Não — utilizar uma nova chave | | 429 | Limite de taxa ou fila completa | Sim, depois de `Retry-After` segundos | | 500 | O nosso erro — já está registado | Leia o estado primeiro, depois tente novamente com backoff | | 503 | Indisponível temporariamente | Sim, depois de `Retry-After` | ## Códigos de erro ### Autenticação e acesso | Código | HTTP | O que fazer | | --- | --- | --- | | `API_KEY_MISSING` | 401 | Envie `X-API-Key` . | | `API_KEY_INVALID` | 401 | A chave está errada, revogada ou expirada. Crie uma nova. | | `NO_ACCOUNTS` | 401 | A chave não atinge nenhum gabinete ativo agora (cabinet desativado, acesso removido). | | `FORBIDDEN` | 403 | Este tipo de chave não é permitido para o seu proprietário. | | `READ_ONLY_KEY` | 403 | Ligue **Gestão de Campanhas** para a chave no painel. | | `WRITE_NOT_ALLOWED` | 403 | Este tipo de chave (emitido por Orbito Ads para parceiros) nunca escreve. | | `VIEW_ONLY_ACCESS` | 403 | O seu acesso a este gabinete é o Viewer. Pergunte ao proprietário da agência para o Manager. | | `FEATURE_NOT_AVAILABLE` | 403 | O plano não inclui esta ação (a resposta nomeia o `feature` ). | | `SUBSCRIPTION_REQUIRED` | 403 | O proprietário do gabinete não tem assinatura ativa. | | `ACCOUNT_INACTIVE` | 403 | O gabinete está desativado. | ### Encontrar coisas | Código | HTTP | O que fazer | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | A chave atinge vários gabinetes (ou este `ad_id` existe em vários) — passe `account_id` . | | `ACCOUNT_NOT_FOUND` | 404 | Que `account_id` não é acessível com esta chave. Verifique `GET /v1/account/info` . | | `CAMPAIGN_NOT_FOUND` | 404 | Nenhuma campanha nos gabinetes da chave (ou é apagada). | | `TASK_NOT_FOUND` | 404 | Não existe tal tarefa para o proprietário desta chave. | | `NOT_FOUND` | 404 | Nenhuma estatística para esta campanha e período. | | `UNKNOWN_AD_IDS` | 400 | Cerca de `ad_ids` em uma chamada a granel não são campanhas desse gabinete; `missing` lista-los. | ### INTRODUÇÕES | Código | HTTP | O que fazer | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` nomeia o campo; `error` diz o que está errado. Campos desconhecidos também são rejeitados — verifique ortografia. | | `UNSUPPORTED_MEDIA` | 400 | Carregar JPG, PNG, GIF, WEBP ou MP4 no campo `file`. | | `FILE_TOO_LARGE` | 413 | Envie um arquivo menor (10 MB no máximo). | ### Telegram e estado de gabinete | Código | HTTP | O que fazer | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram recusou a mudança; `error` carrega sua razão. Com uma oferta baixa você também obter `param: "cpm"`, `min_cpm` e `currency`. | | `BUDGET_UNCHANGED` | 400 | Telegram aceitou o top-up, mas o orçamento da campanha não se moveu. Verifique o equilíbrio do gabinete ( `GET /v1/account/info` ). | | `INSUFFICIENT_AD_BALANCE` | 400 | Você pediu para retirar mais do que a campanha tem. Retirar menos, ou usar `withdraw_all`. | | `CABINET_AUTH_EXPIRED` | 409 | A sessão Telegram do gabinete expirou. O proprietário reconecta-o no painel; em seguida, tente novamente. | | `CABINET_LOCKED` | 409 | O gabinete está sob gestão automática; as mudanças manuais estão bloqueadas. | ### Limites e repetições | Código | HTTP | O que fazer | | --- | --- | --- | | `RATE_LIMITED` | 429 | Espere `Retry-After` segundo em segundo. Veja [Limite de taxa](/pt/docs/api/rate-limits/). | | `QUEUE_FULL` | 429 | O gabinete já tem 5 operações em espera. Espere que uma tarefa termine, então tente novamente (o mesmo `Idempotency-Key` está bem). | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | Adicionar um cabeçalho `Idempotency-Key`. | | `IDEMPOTENCY_KEY_INVALID` | 400 | Use 8–255 caracteres; um UUID é ideal. | | `IDEMPOTENCY_KEY_REUSED` | 422 | Essa chave foi usada para um pedido diferente — nova operação, nova chave. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | O primeiro pedido com esta chave ainda está em execução. Tente novamente em poucos segundos. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | Nada foi feito, tentem com a mesma chave. | | `INGEST_DISABLED` | 403 | Ligue **Recebendo Postback** para a chave ( [Conversões](/pt/docs/api/conversions/) ). | | `INTERNAL_ERROR` | 500 | Nosso lado. Verifique o estado com um GET antes de tentar novamente uma escrita; contate [@orbitoads](https://t.me/orbitoads) com o `request_id` se persistir. | ## Quando repetir a requisição - **4Xx** — não tente de novo sem alterações; corrija o pedido. (Um 4xx nunca consome o seu `Idempotency-Key` , assim você pode tentar novamente o pedido fixo com a mesma chave.) - **429 / 503** — tentar novamente após `Retry-After` . - **5x depois de um texto** — a mudança pode ou não ter atingido Telegram . Tentando novamente com o **O mesmo** `Idempotency-Key` retorna o mesmo 5xx (por design — impede uma ação dupla). `GET` a campanha para ver o que aconteceu, em seguida, decidir; se você tentar novamente, use uma nova chave. - **Timeout em uma redação** — tente novamente com o **O mesmo** `Idempotency-Key` . Se a primeira tentativa passou por você obter o seu resultado; se não, a operação funciona agora. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. Exemplo · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | Código | 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 | ## Notas de implementação ## Ler a resposta de erro Uma falha inclui success=false e error. Use code no cliente e request_id com o suporte. param pode indicar um campo inválido, missing os anúncios desconhecidos e min_cpm e currency uma rejeição de lance. ## Repetição por status Corrija dados em 400, credenciais em 401 e permissões em 403. Verifique conta e anúncio em 404. Trate 409 por code. Respeite Retry-After em cotas e falhas transitórias. Um conflito 422 exige outro identificador para uma operação nova. ## Operações e campos error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## Exemplo de requisição GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Interpretar erros da API | Campo | Valor documentado | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/errors/) ## Error | Campo | Tipo do campo | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Limites de solicitações e eventos](/pt/docs/api/rate-limits/)[Repetir uma operação](/pt/docs/api/idempotency/)[Acompanhar uma operação em fila](/pt/docs/api/tasks/)[Percorrer páginas de campanhas](/pt/docs/api/pagination/) Revisão da referência 2026-10-08 [Tópico anterior**Documentação para um assistente de IA**](/pt/docs/api/ai-assistants/)[Próximo tópico**Limites de solicitações e eventos**](/pt/docs/api/rate-limits/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Repetir uma operação [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/idempotency/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Use um Idempotency-Key novo para criação, cópia, lote ou orçamento. Mantenha chave e corpo nas tentativas da mesma operação. Reutilizar o identificador em outra operação gera erro. [Markdown](/pt/docs/api/idempotency.md) O servidor pode receber uma recarga ou a criação de uma campanha e a resposta se perder no caminho. Repetir a requisição sem proteção pode movimentar o saldo ou criar a campanha duas vezes. Com `Idempotency-Key`, o servidor reconhece que se trata da mesma operação. ## Quando a chave de idempotência é obrigatória | Endalização | Cabeça | | --- | --- | | `POST /v1/campaigns` | necessária | | `POST /v1/campaigns/{ad_id}/copy` | necessária | | `POST /v1/campaigns/bulk` | necessária | | `POST /v1/campaigns/{ad_id}/budget` | necessária | | Outros escreve ( `PATCH` , pausa/resumo, `DELETE` , mídia) | Opcionais — são seguros para repetirem por conta própria | Sem o cabeçalho estes retornam `400 IDEMPOTENCY_KEY_REQUIRED`. ## Como enviar a chave de idempotência Gerar um novo valor aleatório — um UUID — **Para cada operação** , e enviar o valor **O mesmo** cada vez que você tentar novamente essa operação. Exemplo ``` 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 ``` Exemplo ``` 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 ``` ## O que retorna uma requisição repetida | A SITÓRIA | Resposta | | --- | --- | | Primeiro pedido com esta chave | Corre normalmente. | | A mesma chave, o mesmo pedido, o primeiro terminou | A resposta **armazenado** , inalterada, com o cabeçalho `Idempotent-Replayed: true` . Nada corre novamente. | | A mesma chave, o mesmo pedido, o primeiro ainda em execução | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After` . Tente novamente em breve. | | A mesma chave, corpo ou endpoint diferentes | `422 IDEMPOTENCY_KEY_REUSED` . Uma nova operação precisa de uma nova chave. | | O primeiro pedido terminou em 4xx (input ruim, plano, fila cheia...) | A chave é liberada: corrija o pedido e envie-o com a chave **O mesmo** . | | O primeiro pedido terminou em 5xx | O 5xx é armazenado e reproduzido – a mudança pode ter atingido Telegram , e a chave existe para pará-lo executando duas vezes. Verifique a campanha com `GET` , em seguida, use uma nova chave se você ainda quiser agir. | “Mesma solicitação” significa o mesmo método, caminho e corpo JSON (a ordem chave não importa). ## Regras de processamento da chave - As chaves são dimensionadas para a sua chave API — duas integrações não podem colidir. - As chaves são mantidas durante 24 horas. Depois disso, o mesmo valor inicia uma nova operação. - Qualquer string de 8–255 caracteres funciona; um UUID é o padrão certo. - Se não conseguirmos gravar a chave, a operação não será executada e você terá `503 IDEMPOTENCY_UNAVAILABLE` — tente novamente com a mesma chave. O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## Notas de implementação ## Um identificador por operação Criar, copiar, operar em lote e mover orçamento exigem Idempotency-Key. Use um novo valor aleatório de 8–255 caracteres por operação e repita-o nas tentativas. Por 24 horas vincula chave de API, método, caminho e JSON. ## Repetições concorrentes ou alteradas Chamadas concluídas são repetidas com Idempotent-Replayed: true. Duplicata em andamento retorna 409 e Retry-After. Alteração com a mesma chave dá 422. Validação 4xx libera a chave. Após 5xx armazenado, leia o objeto antes de nova operação. ## Operações e campos Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## Exemplo de requisição GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Repetir uma operação | Campo | Valor documentado | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/idempotency/) ## Leituras relacionadas [Interpretar erros da API](/pt/docs/api/errors/)[Limites de solicitações e eventos](/pt/docs/api/rate-limits/)[Acompanhar uma operação em fila](/pt/docs/api/tasks/)[Percorrer páginas de campanhas](/pt/docs/api/pagination/) Revisão da referência 2026-10-08 [Tópico anterior**Limites de solicitações e eventos**](/pt/docs/api/rate-limits/)[Próximo tópico**Acompanhar uma operação em fila**](/pt/docs/api/tasks/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Alterar campanhas existentes [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/manage-campaigns/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Gerencie texto, links, lances, limites diários, horários, orçamento e entrega. Um lote aceita até 1.000 campanhas. Confira falhas parciais na tarefa. [Markdown](/pt/docs/api/manage-campaigns.md) Todas as chamadas aqui precisam de uma chave com **Gestão de Campanhas** e Manager (ou proprietário) acesso ao gabinete. Eles atuam em uma campanha, `(account_id, ad_id)` : passar `account_id` no corpo ou consulta quando a chave atinge vários gabinetes. Cada mudança aparece no histórico da campanha no painel marcado **🔌 API** . | Chamado | O que ele faz | Resposta | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | alterar texto, link, licitação, limite, programação, ligar/desligar | Imediata | | `POST /v1/campaigns/{ad_id}/pause` | Desligar | Imediata | | `POST /v1/campaigns/{ad_id}/resume` | switch em | Imediata | | `POST /v1/campaigns/{ad_id}/budget` | adicionar ou retirar o orçamento | Imediata | | `DELETE /v1/campaigns/{ad_id}` | Remover | Imediata | | `POST /v1/campaigns/{ad_id}/copy` | 1–100 cópias | 202 + [Tarefa](/pt/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | uma ação em até 1.000 campanhas | 202 + tarefa | Respostas diretas retornam o [Objeto de campanha](/pt/docs/api/campaigns/#doc-note-the-campaign-object) atualizado em `data` . ## Editar `PATCH /v1/campaigns/{ad_id}` — envie apenas o que muda. Exemplo ``` 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." }' ``` | Campo | significado | | --- | --- | | `title`, `text`, `promote_url` | Criativa e ligação. | | `cpm` | Nova licitação, maior que 0. | | `daily_budget` | Capa Diária | | `views_per_user` | 1–4. | | `active` | `true` / `false` — o mesmo que retomar / pausa. | | `schedule` | Dias e horas para mostrar o anúncio; `null` remove - ver [calendário](/pt/docs/api/manage-campaigns/#doc-note-schedule) . | | `media`, `picture`, `button`, `website_name` | Tal como em [Criando](/pt/docs/api/create-campaigns/#doc-note-fields) . | **O que é a revisão do Telegram?** Mudando `cpm`, `active` ou `schedule` não – eles são aplicados de uma só vez e a campanha continua em execução. Qualquer outro campo ( `title`, `text`, `promote_url`, `media`, `picture`, `button`, `website_name`, `views_per_user` , `daily_budget` ) é salvo através Telegram 's formulário de anúncio completo, e Telegram revê o anúncio novamente: ele mostra `In Review` até aprovado. Enviar lance, on / off e mudanças de agenda por conta própria, não em conjunto com esses campos. Alvo ( `channels`, `countries`, ...) não pode mudar em um anúncio existente — Telegram não permite. Crie uma nova campanha com o novo alvo, ou [Copia](/pt/docs/api/manage-campaigns/#doc-note-copy) e ajuste. `meta` na resposta: | Campo | significado | | --- | --- | | `status_warning` | Os campos salvos, mas Telegram não aplicaram o interruptor de ligar/desligar (por exemplo, sem orçamento). | | `status_intent_only` | Sua escolha on/off é armazenada e se aplica quando Telegram pode (em revisão, sem orçamento). | | `status_already_set` | A campanha já estava no estado que pediu. | Uma licitação abaixo do mínimo de Telegram para este alvo retorna `400 PLATFORM_REJECTED` com `param: "cpm"` , `min_cpm` e `currency` . ## Pausar e retomar Exemplo ``` 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` significa que Telegram ainda não pode agir sobre ele — a campanha está em revisão, declinou ou fora do orçamento — e sua escolha é armazenada: ele funciona o mais rápido possível. Quando o status realmente muda, seus [Avaliação Webhook](/pt/docs/api/webhooks/) incêndios. ## Programação de anúncios Mostrar uma campanha apenas em dias e horas da semana escolhidos — por exemplo dias da semana 9:00-18:00, ou à noite apenas. Fora dessas horas Telegram não mostra o anúncio. Definir, mudar ou remover uma programação não liga ou desliga a campanha — `status` e `active` permanecem como estão. Funciona em cada tipo de gabinete. Exemplo ``` 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" } }' ``` | Campo | significado | | --- | --- | | `days` | `mon`, `tue` , `wed`, `thu` , `fri`, `sat` , `sun` — cada um detém as horas (0–23) do anúncio corre naquele dia. `9` significa 09:00–09:59, então `[9, …, 17]` é 9:00–18:00. Um dia você sai, ou enviar como `[]` , não funciona. Pelo menos uma hora no total. | | `timezone` | cujo relógio as horas seguem. `"viewer"` - tempo local de cada espectador; apenas para o público alvo (`target_type: "users"`). Caso contrário, a UTC Acompanhe o: `"+03:00"`, `"-05:00"`, `"+05:30"`. O offset Telegram oferece: horas inteiras de `-12:00` Para `+14:00`Mais `-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"` e `"+3"` Também são aceitos. | `"schedule": null` remove o cronograma — o anúncio é executado 24 horas por dia novamente. **Uma campanha sem orçamento não pode levar um cronograma.** Telegram aceita uma programação apenas em uma campanha que pode executar, então em uma campanha `Stopped` sem nada sobrar você começa `400 PLATFORM_REJECTED` com `param: "schedule"` e nada é mudado — adicionar orçamento primeiro, em seguida, definir a programação. Uma campanha pausada ( `On Hold` ) leva tudo bem. O objeto de campanha retorna o cronograma na mesma forma, sempre com todos os sete dias e o offset escrito como `"+03:00"` — assim você pode lê-lo, mudar um dia e enviá-lo de volta. `GET /v1/campaigns/{ad_id}` dá o cronograma atual mesmo se ele foi alterado diretamente em Telegram — ver [Fresquência](/pt/docs/api/campaigns/#doc-heading-freshness) . Horas fora 0–23, um dia desconhecido, um horário vazio, `"viewer"` em um canal/bot/search anúncio ou um offset Telegram não oferece → `400 VALIDATION_ERROR` com o campo exato em `param` (por exemplo `schedule.days.mon` ). [Copias](/pt/docs/api/manage-campaigns/#doc-note-copy) e campanhas recriadas manter o cronograma da campanha que eles vêm. Para colocar um cronograma em muitas campanhas de uma só vez, use a ação em massa `set_schedule` . ## Orçamento da campanha `POST /v1/campaigns/{ad_id}/budget` move o dinheiro entre o saldo do gabinete e a campanha. Requer um `Idempotency-Key` . Exemplo ``` 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` | Efeitos | | --- | --- | --- | | `add` | necessária | Equilíbrio de gabinete → campanha. | | `withdraw` | necessária | Campanha → equilíbrio de gabinete. Mais do que a campanha tem → `400 INSUFFICIENT_AD_BALANCE` . | | `withdraw_all` | — | Tudo o que resta na campanha → equilíbrio de gabinete. | `meta.moved` é o que realmente se moveu; `meta.partial` é `true` quando menos do que solicitado pode ser retirado. O dinheiro nunca deixa o gabinete através do API . ## Copiar uma campanha `POST /v1/campaigns/{ad_id}/copy` cria cópias com o mesmo alvo; qualquer coisa que você enviar sobrepõe o original. Requer um `Idempotency-Key` . Retorna uma tarefa cuja `ad_ids` são as cópias. Exemplo ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | Campo | significado | | --- | --- | | `copies` | 1–100, padrão 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | Substitui por cada cópia. `budget` : `0` ou pelo menos `min_budget` do gabinete. | | `schedule` | Cópias mantêm o [Horário](/pt/docs/api/manage-campaigns/#doc-note-schedule) original; envie um para substituí - lo, ou `null` para nenhum. | | `group_id` / `new_group_name` | Ponha as cópias num grupo. | ## Excluir Exemplo ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` Uma campanha deletada que tinha visualizações permanece em suas estatísticas com `status: "Deleted"`; uma que nunca correu é removida. Excluindo novamente retorna `404 CAMPAIGN_NOT_FOUND` . ## Operações em lote `POST /v1/campaigns/bulk` aplica uma ação para até 1.000 campanhas de um gabinete. Requer um `Idempotency-Key` . Retorna uma tarefa. Exemplo ``` 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` | Campo Extra | Efeitos | | --- | --- | --- | | `pause` | — | Desligar | | `resume` | — | switch em | | `add_budget` | `amount` | adicionar a cada campanha | | `withdraw_budget` | `amount` | retirar de cada campanha | | `withdraw_all_budget` | — | retirar tudo de cada campanha | | `set_cpm` | `cpm` | definir a mesma oferta em cada | | `set_schedule` | `schedule` | definir o mesmo [Horário](/pt/docs/api/manage-campaigns/#doc-note-schedule) em cada; `"schedule": null` remove-o | | `delete` | — | Remova cada | Cada `ad_id` deve ser uma campanha ao vivo desse gabinete; caso contrário, nada está em fila e você começa `400 UNKNOWN_AD_IDS` com os infratores em `missing` . Duplicados são ignorados. A tarefa `errors` lista campanhas Telegram recusados — com `set_schedule` , também campanhas sem orçamento e campanhas onde `"timezone": "viewer"` não pode se aplicar porque eles não visam um público. ## Como pausar campanhas com custo por ação alto Exemplo ``` 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"]) ``` ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## PATCH `/api/v1/campaigns/{ad_id}` Altera os ajustes enviados e preserva os campos omitidos. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | | `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" } } ``` ### Esquema do corpo 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" } ``` Resultados da solicitação e campos de resposta | API | Significado | | --- | --- | | status_warning | Os campos foram salvos, mas não foi possível alterar a veiculação, por exemplo por falta de saldo. | | status_intent_only | O estado solicitado fica registrado e pode ser aplicado após a revisão ou quando houver saldo. | | status_already_set | A campanha já estava no estado solicitado. | [Acompanhar uma operação em fila](/pt/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` Solicita a pausa da veiculação de uma campanha. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | | `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` Solicita reativação quando a veiculação for possível. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | | `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` Transfere orçamento entre a conta e uma campanha. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Sim | | `X-API-Key` | header | `string` | Sim | 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 } } ``` ### Esquema do corpo 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` Enfileira até 100 cópias com segmentação herdada e ajustes opcionais. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Sim | | `X-API-Key` | header | `string` | Sim | 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": [] } } ``` ### Esquema do corpo 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` Enfileira uma operação para até 1.000 campanhas da mesma conta. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Sim | | `X-API-Key` | header | `string` | Sim | 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": [] } } ``` ### Esquema do corpo 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 campanha e preserva as estatísticas de veiculação existentes. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Sim | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | | `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 } } ``` ## Notas de implementação ## Campos editáveis e horários Alterar cpm, active ou schedule dispensa nova análise criativa. Alterações de criativo podem acioná-la. A segmentação permanece fixa. Use dias, horas 0–23 e fuso UTC aceito. viewer vale para users e null remove a programação. ## Movimentações dentro da conta add aloca fundos. withdraw devolve o valor solicitado e withdraw_all devolve o saldo disponível à conta. Confira meta.moved e meta.partial. Recargas externas, faturas e reembolsos usam cobrança. ## Aceitação e conclusão Criação, cópia e operações em lote retornam HTTP 202 com id da tarefa. Consulte GET /api/v1/tasks/{id}, respeitando Retry-After. Verifique failed e errors mesmo em completed. ## Operações e campos 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 ## Exemplo de requisição GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Alterar campanhas existentes | Campo | Valor documentado | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | Campo | Tipo do campo | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | Campo | Tipo do campo | | --- | --- | | days | object | | timezone | string | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Contas de anúncios acessíveis](/pt/docs/api/accounts/)[Consultar uma campanha](/pt/docs/api/campaigns/)[Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/)[Estatísticas de campanhas e contas](/pt/docs/api/stats/)[Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Revisão da referência 2026-10-08 [Tópico anterior**Criar campanhas e enviar mídia**](/pt/docs/api/create-campaigns/)[Próximo tópico**Estatísticas de campanhas e contas**](/pt/docs/api/stats/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Percorrer páginas de campanhas [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/pagination/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Comece com cursor vazio e siga meta.next_cursor até null sem mudar filtros. O limite publicado é de 500 campanhas por página. [Markdown](/pt/docs/api/pagination.md) `GET /v1/campaigns` é a única listagem paginada. Há dois modos de paginação. ## Paginação por cursor Na primeira requisição envie `cursor=` vazio. Nas seguintes use `meta.next_cursor` até ele retornar `null`. Exemplo ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` Exemplo ``` 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 ``` - Trate o cursor como opaco. Só é válido com os mesmos filtros. - A ordem é fixa (cabinet, então o mais novo `ad_id` primeiro), assim as páginas permanecem estáveis enquanto as campanhas são adicionadas. - Sem limite superior — é assim que se lê um gabinete com 100.000 campanhas. - Os filtros `bot_username` , `promote_domain` e `type` sempre usam o modo de cursor. - O modo de cursor deixa de fora alguns campos pesados (resumo direcionado, mídia, última ação). Use [`GET /v1/campaigns/{ad_id}`](/pt/docs/api/campaigns/#doc-note-get-one-campaign) para o registro completo de uma campanha. ## Paginação por deslocamento para contas pequenas Sem `cursor` , as páginas de ponto final com `limit` e `offset` e pode ordenar ( `sortBy` , `sortOrder` ). Lê no máximo **500 campanhas por conta de publicidade** : passado que `meta.truncated` é `true` e `meta.next_step` diz-lhe para mudar para o modo de cursor. Exemplo ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## Tamanho da página `limit` aceita de 1 a 500 resultados por página. O padrão é 100. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. Exemplo · 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' ``` Exemplo · 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' ``` ## Notas de implementação ## Percorrer listas grandes Inicie GET /api/v1/campaigns com cursor= e filtros. Preserve os filtros e passe meta.next_cursor sem alterar na próxima página. Pare em null. limit aceita 1–500 e o padrão é 100. ## Ordenação e limites do deslocamento O cursor ordena por conta e ad_id decrescente. bot_username, promote_domain e type ativam esse modo. Offset aceita sortBy e sortOrder com até 500 campanhas por conta. meta.truncated indica necessidade de cursor. ## Operações e campos GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## Exemplo de requisição GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Percorrer páginas de campanhas | Campo | Valor documentado | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Interpretar erros da API](/pt/docs/api/errors/)[Limites de solicitações e eventos](/pt/docs/api/rate-limits/)[Repetir uma operação](/pt/docs/api/idempotency/)[Acompanhar uma operação em fila](/pt/docs/api/tasks/) Revisão da referência 2026-10-08 [Tópico anterior**Acompanhar uma operação em fila**](/pt/docs/api/tasks/)[Próximo tópico**Contas de anúncios acessíveis**](/pt/docs/api/accounts/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Limites de solicitações e eventos [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/rate-limits/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Cada chave tem cotas separadas. São 60 leituras e 30 escritas por minuto e 20 conversões recebidas por segundo. Há também limite de fila por conta. [Markdown](/pt/docs/api/rate-limits.md) Cada chave tem cotas independentes para leitura, gravação e conversões. Consultas frequentes de estatísticas não impedem pausar campanhas. Um pico de conversões do rastreador também preserva as outras duas cotas. | Orçamento | Aplicar para | Limite | | --- | --- | --- | | **Leia** | Cada um `GET` | 60 pedidos por minuto | | **Escrever** | a cada `POST`, `PATCH`, `DELETE`, exceto conversões | 30 pedidos por minuto | | **Conversões em** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 20 eventos por segundo, estoura até 1.000 | As cotas são repostas continuamente. Em um pico curto você pode usar a capacidade disponível de um minuto. Uma sincronização de campanhas, métricas e totais costuma consumir de 3 a 4 leituras. Precisa de mais para uma integração específica? Pergunte [@orbitoads](https://t.me/orbitoads) — os limites podem ser aumentados por chave. ## Cabeçalhos HTTP Cada resposta inclui cabeçalhos com o limite e a cota restante. Exemplo ``` 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 ``` ## Reduzir o número de requisições - **O que é o bulk em vez de loop.** A partir de 300 dias, a campanha é uma `POST /v1/campaigns/bulk`Não há 300 chamadas de pausa. Veja [Gestão de Campanhas](/pt/docs/api/manage-campaigns/#doc-note-bulk). - **Criando em batches.** `POST /v1/campaigns` leva até 100 campanhas. - **Webhooks em vez de polling.** Mudanças de status chegam no momento em que acontecem; as estatísticas horárias chegam sozinhas. Veja [Webhooks](/pt/docs/api/webhooks/) . - **Conversões de batch.** `POST /v1/postback` aceita até 1.000 eventos por pedido (cada evento ainda conta contra o orçamento de eventos — loteamento economiza viagens de ida e volta, não quota). ## Outros limites | O que | Limite | | --- | --- | | Operações em fila ou execução por gabinete | 5 cria + 5 outras operações (cópia, volume). O 6o devolve `429 QUEUE_FULL` . | | Campanhas por pedido de criação | 100 | | Cópias por pedido de cópia | 100 | | Campanhas por pedido em massa | 1,000 | | Ficheiro enviado | 10 MB | | Tamanho da página para `GET /v1/campaigns` | 500 | ## Intervalo antes de tentar novamente Após um 429, aguarde os segundos indicados por `Retry-After`. Em processos automáticos, adicione uma pequena espera aleatória para evitar novas tentativas simultâneas. Exemplo ``` 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); } ``` O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## Notas de implementação ## Cotas independentes por chave Cada chave tem 60 leituras/minuto e 30 escritas/minuto. Conversões admitem 20 eventos/segundo e picos de 1.000. Cada item do lote conta. Consulte X-RateLimit-Limit, X-RateLimit-Remaining e X-RateLimit-Reset. ## Filas e novas tentativas Uma conta admite cinco criações e cinco outras tarefas na fila ou em andamento. Executa uma de cada tipo por vez. Após 429 aguarde os segundos de Retry-After. ## Operações e campos 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## Exemplo de requisição GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Dimensões do relatório A API aceita até 100 campanhas por criação, 100 cópias por solicitação e 1.000 campanhas existentes por operação em lote. A resposta 202 identifica a tarefa em fila. Examine failed e errors ao concluir antes de alterar o próximo grupo. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Limites de solicitações e eventos | Campo | Valor documentado | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/rate-limits/) ## Leituras relacionadas [Interpretar erros da API](/pt/docs/api/errors/)[Repetir uma operação](/pt/docs/api/idempotency/)[Acompanhar uma operação em fila](/pt/docs/api/tasks/)[Percorrer páginas de campanhas](/pt/docs/api/pagination/) Revisão da referência 2026-10-08 [Tópico anterior**Interpretar erros da API**](/pt/docs/api/errors/)[Próximo tópico**Repetir uma operação**](/pt/docs/api/idempotency/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Estatísticas de campanhas e contas [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/stats/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Use estatísticas por campanha, totais por conta ou rankings por moeda. Escolha janela móvel ou datas e horas específicas. Guarde o período junto dos números exportados. [Markdown](/pt/docs/api/stats.md) Há três métodos de estatísticas com níveis diferentes de detalhe. Cada um retorna dados por conta para todas as contas acessíveis à chave. | Endalização | Retorno | | --- | --- | | `GET /v1/stats` | Números de cada campanha para o período | | `GET /v1/stats/total` | Os totais de cada gabinete mais os pontos gráficos | | `GET /v1/stats/analytics` | totais divididos por moeda, gráfico, campanhas de topo | Para consultar uma campanha em um período, use `GET /v1/campaigns/{ad_id}/history`. [`GET /v1/campaigns/{ad_id}/history`](/pt/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## Períodos do relatório | `period` | janela | | --- | --- | | `1d` | últimas 24 horas (por omissão para `/stats` e `/stats/total` ) | | `7d` | 7 dias anteriores | | `30d` | últimos 30 dias (por omissão para `/stats/analytics` ) | | `all` | todo o tempo | | `custom` | `startDate` e `endDate` ( `YYYY-MM-DD` ), facultativamente `startHour` e `endHour` (0–23) | Qualquer `h` ou `d` também funciona ( `6h` , `14d` , até 365 dias). Um valor não reconhecido é lido como as últimas 24 horas - ele não retorna um erro, então verifique a sua ortografia. Todos os tempos são UTC . Exemplo ``` # 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 Por campanha, aninhada pelo gabinete: `data[account_id][ad_id]`. Exemplo ``` { "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" } } ``` Chaves são strings; os valores aqui são **Números** (ao contrário do objeto da campanha). `cpa` é gasto por ação; `ctr` é uma porcentagem. ## GET /v1/stats/total O endpoint do painel de instrumentos: totais e um gráfico para cada gabinete. Exemplo ``` { "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` pontos são por hora ou diariamente, dependendo do período. `cabinetType` dá a moeda ( `euro` → EUR , `ton` → TON , `stars` → Estrelas). ## GET /v1/stats/analytics Como `/stats/total` , mais gastar dividido por moeda e as campanhas de topo. Exemplo ``` { "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" } } ``` ## Observações - As estatísticas seguem os próprios contadores de Telegram, sincronizados com Orbito Ads regularmente; a hora mais nova preenche conforme as sincronizações chegam. - Nunca adicione `spent` em armários com moedas diferentes. - Para conversões você segue a si mesmo (líderes, depósitos, vendas) ver [Conversões](/pt/docs/api/conversions/) — Telegram `actions` são junções e bot starts, não suas conversões. - Preferir o [Avaliação do Webhook](/pt/docs/api/webhooks/#doc-heading-hourly_digest) sobre as estatísticas das sondagens a cada poucos minutos. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## GET `/api/v1/stats` Consulta métricas do período por conta e campanha. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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` Consulta totais por conta e pontos do gráfico no período. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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` Obtém divisão por moeda, séries e classificação de campanhas. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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" } } ``` ## Notas de implementação ## Saldos e moedas Verifique currency, balance_updated_at e min_budget por conta. Valores e taxas em campanhas podem ser strings decimais ou null. Os agregados usam números. Separe EUR, TON e Stars. ## Períodos e horas UTC period aceita 1d, 7d, 30d, all, custom e janelas Nh ou Nd de até 365 dias. Em custom use startDate e endDate e, opcionalmente, startHour/endHour 0–23 UTC. Stats e total usam 1d por padrão, analytics 30d. ## Interpretar ações actions conta entradas em canais e inícios de bots. Para leads, compras e receita use conversions. /stats/analytics contém gráfico, totais e topCampaigns por conta. ## Operações e campos 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 ## Exemplo de requisição GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Estatísticas de campanhas e contas | Campo | Valor documentado | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/stats/) ## StatsNumbers | Campo | Tipo do campo | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Contas de anúncios acessíveis](/pt/docs/api/accounts/)[Consultar uma campanha](/pt/docs/api/campaigns/)[Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/)[Alterar campanhas existentes](/pt/docs/api/manage-campaigns/)[Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Revisão da referência 2026-10-26 [Tópico anterior**Alterar campanhas existentes**](/pt/docs/api/manage-campaigns/)[Próximo tópico**Dicionários de segmentação e grupos**](/pt/docs/api/targeting/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Dicionários de segmentação e grupos [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/targeting/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Consulte códigos de países, idiomas e temas antes de montar a solicitação. Os grupos identificam as pastas salvas. Mantenha os dicionários em cache e atualize quando as opções mudarem. [Markdown](/pt/docs/api/targeting.md) ## GET /v1/targeting Os códigos [`POST /v1/campaigns`](/pt/docs/api/create-campaigns/) aceitam. As listas são as que os Orbito Ads criam o formulário usa, então um código daqui nunca é recusado como desconhecido. Exemplo ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "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" ] } } ``` | Lista de | Usados em | Notas | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 códigos de duas letras, mais Telegram próprios `FT` (números anônimos). | | `languages[].code` | `languages` | Telegram chaves linguísticas — e.g . `pt-br` e `pt-pt` , não `pt` . | | `topics[].id` | `topics`, `exclude_topics` | Números; os IDs não são consecutivos. | | `buttons` | `button` | Apenas em armários cujo `features.ad_button` é `true`. | Essas listas mudam pouco. Consulte-as uma vez e mantenha-as em cache por um dia. ## Grupos de segmentação Grupos são pastas para campanhas no painel. Coloque novas campanhas ou cópias em uma com `group_id` (existente) ou `new_group_name` (criado ou reutilizado se o nome existir). ### GET /v1/grupos Exemplo ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Exemplo ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` Sem `account_id` você obtém os grupos de cada gabinete que a chave alcança. Um grupo pertence a um gabinete — `group_id` de outro gabinete é recusado. ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## GET `/api/v1/targeting` Consulta países, idiomas, temas e botões disponíveis. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Sim | 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` Lista grupos de campanhas, opcionalmente de uma conta. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Sim | 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" } ] } ``` ## Notas de implementação ## Valores aceitos no formulário Use códigos de países e idiomas, ids numéricos de temas e CTAs como retornados. Idiomas podem distinguir regiões, como pt-br e pt-pt. A conta precisa aceitar button. ## Vínculo do grupo Cada grupo pertence a uma conta. Ao criar ou copiar, use o group_id dela ou new_group_name. Um grupo com o mesmo nome pode ser reutilizado. ## Operações e campos GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## Exemplo de requisição GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Configuração do teste de público O esquema de criação distingue quatro modos. Os canais vão em channels, os bots em bots e os termos em search_keywords. Países, idiomas e temas descrevem o público de usuários. Consulte os recursos da conta antes do teste. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Dicionários de segmentação e grupos | Campo | Valor documentado | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/targeting/) ## Targeting | Campo | Tipo do campo | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Group | Campo | Tipo do campo | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Contas de anúncios acessíveis](/pt/docs/api/accounts/)[Consultar uma campanha](/pt/docs/api/campaigns/)[Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/)[Alterar campanhas existentes](/pt/docs/api/manage-campaigns/)[Estatísticas de campanhas e contas](/pt/docs/api/stats/) Revisão da referência 2026-10-08 [Tópico anterior**Estatísticas de campanhas e contas**](/pt/docs/api/stats/)[Próximo tópico**Receber eventos de campanhas**](/pt/docs/api/webhooks/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Acompanhar uma operação em fila [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/tasks/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) Criação, cópia ou lote podem retornar 202 e o ID de tarefa. Consulte progresso, totais e falhas individuais. Guarde os IDs das campanhas afetadas. [Markdown](/pt/docs/api/tasks.md) Algumas operações falam com Telegram uma vez por campanha, então eles podem demorar mais do que um pedido HTTP deve esperar. Estes retornam `202 Accepted` com um **Tarefa** em vez do resultado final: - `POST /v1/campaigns` — criar - `POST /v1/campaigns/{ad_id}/copy` — cópia - `POST /v1/campaigns/bulk` — pausa, retoma, orçamento, CPM ou eliminar muitos Mudanças de campanha única ( `PATCH`, pausa, currículo, orçamento, exclusão) responder diretamente — nenhuma tarefa. ## Resposta HTTP 202 Exemplo ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` Exemplo ``` { "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} Exemplo ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` A mesma forma que acima. Pesquise até `status` é final; enquanto uma tarefa é `pending` ou `running` a resposta carrega `Retry-After: 2` — espere tanto tempo entre as pesquisas. Qualquer chave do mesmo proprietário pode ler a tarefa. | Campo | significado | | --- | --- | | `type` | `create`, `copy`, `status` (Páusco de bolso / resumo) `budget`, `cpm`, `delete` | | `status` | Veja abaixo | | `progress` / `total` | campanhas processadas até agora / no total | | `succeeded` / `failed` | contagens, uma vez conhecidas | | `ad_ids` | campanhas a tarefa criada (criar, copiar) ou alterada (embalagem) | | `errors[]` | até 50 falhas: `{ ad_id, index, error }` — `index` é a posição em seu array `campaigns` para cria | | `paused_reason` | por que uma tarefa parou para esperar, e.g. o gabinete ficou fora de equilíbrio | | `error` | porque é que toda a tarefa falhou | ### Estatutos | Status | significado | O final? | | --- | --- | --- | | `pending` | em fila de espera — o gabinete executa uma criação e uma outra operação de cada vez | Não | | `running` | em progresso | Não | | `paused` | parou de esperar — normalmente o equilíbrio do gabinete acabou no meio do caminho. Recupere o armário; retome-o do painel | Não | | `completed` | Terminado. Verifique `failed` e `errors` — uma tarefa completa pode conter falhas individuais | Sim | | `failed` | a tarefa como um todo falhou — ver `error` | Sim | | `cancelled` | cancelado do painel | Sim | ## Como termina a criação de campanhas - Novos IDs de campanha aparecem em `ad_ids` quando a tarefa termina (eles são encontrados sincronizando o gabinete após a última campanha ser criada). - Se a campanha **Primeiro** de um lote falhar, a tarefa pára lá em vez de repetir o mesmo erro 100 vezes. Corrigir a entrada e enviar novamente. - Se Telegram não consegue resolver nenhum dos canais ou bots de uma campanha, essa campanha falha com `No targets found: …` listando-os. - Telegram revê cada novo anúncio. Uma campanha criada geralmente começa `In Review` ; um [Webhook](/pt/docs/api/webhooks/) diz-lhe quando isso muda. ## Exemplo de consulta periódica do status Exemplo ``` 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)); } } ``` Exemplo ``` 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))) ``` ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. ## GET `/api/v1/tasks/{id}` Consulta andamento, IDs resultantes e falhas por item. | Parâmetro | Local | Formato | Obrigatório | | --- | --- | --- | --- | | `id` | path | `integer` | Sim | | `X-API-Key` | header | `string` | Sim | 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" } } ``` ## Notas de implementação ## Aceitação e conclusão Criação, cópia e operações em lote retornam HTTP 202 com id da tarefa. Consulte GET /api/v1/tasks/{id}, respeitando Retry-After. Verifique failed e errors mesmo em completed. ## Resultados da tarefa pending, running e paused são intermediários. completed, failed e cancelled são finais. Consulte progress, total, ad_ids e até 50 erros individuais. paused_reason pode indicar falta de saldo resolvida no painel. ## Operações e campos 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 ## Exemplo de requisição GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Dimensões do relatório A API aceita até 100 campanhas por criação, 100 cópias por solicitação e 1.000 campanhas existentes por operação em lote. A resposta 202 identifica a tarefa em fila. Examine failed e errors ao concluir antes de alterar o próximo grupo. ## Referência do protocolo | Método | Rota | Parâmetros | Conteúdo da solicitação | Códigos de resposta | | --- | --- | --- | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Campos e limites do esquema · Acompanhar uma operação em fila | Campo | Valor documentado | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/tasks/) ## Task | Campo | Tipo do campo | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/openapi.yaml) ## Leituras relacionadas [Interpretar erros da API](/pt/docs/api/errors/)[Limites de solicitações e eventos](/pt/docs/api/rate-limits/)[Repetir uma operação](/pt/docs/api/idempotency/)[Percorrer páginas de campanhas](/pt/docs/api/pagination/) Revisão da referência 2026-10-08 [Tópico anterior**Repetir uma operação**](/pt/docs/api/idempotency/)[Próximo tópico**Percorrer páginas de campanhas**](/pt/docs/api/pagination/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Receber eventos de campanhas [Orbito Ads · Português · HTML](https://orbitoads.pro/pt/docs/api/webhooks/) Fontes verificadas · 2026-11-27 ### Navegar na documentação [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Toda a documentação](/pt/docs/) Primeiros passos - [Primeiros passos com a API](/pt/docs/api/) - [Chaves e permissões de conta](/pt/docs/api/authentication/) - [Documentação para um assistente de IA](/pt/docs/api/ai-assistants/) Conceitos - [Interpretar erros da API](/pt/docs/api/errors/) - [Limites de solicitações e eventos](/pt/docs/api/rate-limits/) - [Repetir uma operação](/pt/docs/api/idempotency/) - [Acompanhar uma operação em fila](/pt/docs/api/tasks/) - [Percorrer páginas de campanhas](/pt/docs/api/pagination/) Referência da API - [Contas de anúncios acessíveis](/pt/docs/api/accounts/) - [Consultar uma campanha](/pt/docs/api/campaigns/) - [Criar campanhas e enviar mídia](/pt/docs/api/create-campaigns/) - [Alterar campanhas existentes](/pt/docs/api/manage-campaigns/) - [Estatísticas de campanhas e contas](/pt/docs/api/stats/) - [Dicionários de segmentação e grupos](/pt/docs/api/targeting/) Integrações - [Receber eventos de campanhas](/pt/docs/api/webhooks/) - [Enviar conversões confirmadas](/pt/docs/api/conversions/) - [Versões e mudanças da API](/pt/docs/api/changelog/) Arquivos e esquemas - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/pt/docs/llms.txt) - [llms-full.txt](/pt/docs/llms-full.txt) [Orbito Ads](/pt/) [Documentação](/pt/docs/) [API](/pt/docs/api/) A referência descreve status_change, hourly_digest e ping de teste. Receba via HTTPS, valide a assinatura no corpo original e remova entregas duplicadas. [Markdown](/pt/docs/api/webhooks.md) Para receber eventos sem consultar a API repetidamente, configure a URL de postback no cartão da chave em «API e webhooks». O Orbito Ads envia por POST os eventos das contas acessíveis à chave. Cada entrega é assinada com o segredo do webhook. ## Eventos | Evento | Quando | | --- | --- | | `status_change` | O status de uma campanha mudou (In Review → Active, Active → Stopped...). Enviado após cada sincronização do gabinete, e imediatamente quando as campanhas são ligadas ou desligadas no painel ou através do API . | | `hourly_digest` | Aos 5 minutos passados cada hora, com os números da hora que acabou de fechar - um POST por gabinete. Horas sem vista, cliques ou gastar são ignoradas. | | `ping` | Quando pressionar **Testes** na chave. | ### status_change Exemplo ``` { "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 Exemplo ``` { "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" } ] } ``` O campo `campaigns` inclui até as 200 campanhas com maior gasto. Se mais campanhas tiverem alterações, `truncated` informa quantas ficaram de fora. Os valores de `totals` abrangem todas as campanhas e usam a moeda da conta. ## Cabeçalhos HTTP Exemplo ``` 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= ``` ## Verificar a assinatura Concatene `X-Orbito-Timestamp`, um ponto e os bytes originais do corpo. Calcule o HMAC-SHA256 com o segredo do webhook, exibido ao criar a chave ou renovar o segredo. Verifique a assinatura antes de interpretar o JSON, pois serializá-lo novamente altera os bytes. Rejeite requisições com mais de cinco minutos. ### Node.js (Expresso) Exemplo ``` 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) Exemplo ``` 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 ``` ## Entrega de eventos - Seu endpoint deve ser público **HTTPS** . `http://`, endereços locais e privados são recusados. - Responder com qualquer `2xx` dentro **10 segundo** . Fazer trabalho lento depois de responder. - Em um erro de rede ou um `5xx` nós tentamos **Uma vez** , 750 ms mais tarde, com o mesmo `X-Orbito-Delivery` . Um `4xx` não é tentado novamente. - As redirecções não são seguidas. - O cartão da chave no painel mostra o tempo, o estado e o erro da última entrega. ## Contas cobertas pelo webhook A chave recebe eventos apenas das contas a que tem acesso. Para um membro de agência, são as contas compartilhadas com ele. Ao perder o acesso, a entrega desses eventos cessa imediatamente. [Chaves e acesso](/pt/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## Envio de teste Clique em «Testar» no cartão da chave. Você receberá um evento `ping` assinado da mesma forma que os eventos reais. Exemplo ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## Referência da API O contrato completo de anúncios exige uma credencial do provedor dedicada a este espaço. O cliente usa a chave de API Orbito. Pedidos, provisionamento e cobrança externa têm fluxos separados. Exemplo · 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" } ] } ``` ## Notas de implementação ## Eventos e configuração Cadastre um callback HTTPS público na chave do provedor. status_change informa mudanças, hourly_digest chega no minuto 05 por hora ativa da conta e ping testa a entrega. A configuração fica fora das 22 operações HTTP. ## Assinatura e reenvio Valide HMAC-SHA256 com o segredo sobre timestamp, um ponto e os bytes originais. Rejeite timestamps com mais de cinco minutos. Responda 2xx em dez segundos. Falha de rede ou 5xx gera uma repetição após 750 ms com o mesmo id. ## Operações e campos 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} ## Campos e limites do esquema A tabela segue o contrato público v1. Campos e parâmetros diferenciam maiúsculas. Os códigos HTTP distinguem sucesso, validação da entrada e controle de acesso de cada operação. A especificação vinculada define as estruturas completas. ## Janela de tempo · hourly_digest O webhook hourly_digest cobre a hora encerrada e sai cinco minutos depois em cada conta com tráfego. Armazene os limites do período, o ID da conta e o da entrega. Diferencie a hora do evento da hora de recebimento no servidor. ## Campos e limites do esquema · Receber eventos de campanhas | Campo | Valor documentado | | --- | --- | | 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 | Fonte · [Fonte dos dados](https://adsly.pro/docs/api/webhooks/) ## Leituras relacionadas [Enviar conversões confirmadas](/pt/docs/api/conversions/)[Versões e mudanças da API](/pt/docs/api/changelog/) Revisão da referência 2026-10-08 [Tópico anterior**Dicionários de segmentação e grupos**](/pt/docs/api/targeting/)[Próximo tópico**Enviar conversões confirmadas**](/pt/docs/api/conversions/) ## Fontes e dados - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Geliştirici kılavuzu [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) Dokümantasyon Belgeler erişimi, kampanyaları, istatistikleri ve olayları kapsar. Önce salt okunur anahtarın erişebildiği hesapları listeleyin. [Belge dizinini görüntüle](/tr/docs/llms.txt) [API anahtarları](/api-keys?lang=en) Bu belgeler Orbito Ads’i uygulamanızdan nasıl kullanacağınızı açıklar. API ile istatistikleri okuyabilir, kampanya oluşturabilir, teklif ve metinleri değiştirebilir, gösterimleri duraklatıp sürdürebilir ve bütçe aktarabilirsiniz. Tüm hesaplar için aynı yöntemler ve API anahtarı geçerlidir. ## API - [**Quickstart için** Anahtar, ilk talep ve ilk kampanyanız API Yakın beş dakikadır.](/tr/docs/api/) - [**Anahtarlar ve erişim** Sadece okunan ve kampanya yönetimi anahtarları, hangi reklam hesap anahtar ulaşım, ajans ekipleri.](/tr/docs/api/authentication/) - [**Kampanyaları oluşturmak** Kanal, bot, arama ve kitle hedeflenmesi, bir veya bir yüzyıl kampanyalar arama başına.](/tr/docs/api/create-campaigns/) - [**Kampanyaları Yönetmek** Edit, pause and resume, move budget, copy, delete — bir kampanya ya da bin.](/tr/docs/api/manage-campaigns/) - [**Webhoks** Gerçek zamanlı durum değişiklikleri ve saatlik bir istatistiksel bozulma.](/tr/docs/api/webhooks/) - [**Bir AI asistanı ile yapılır** Bu dokuları, K.Kode veya başka bir kodlama aracına gönderin ve bütünleşmeyi yazmasına izin verin.](/tr/docs/api/ai-assistants/) ## Temel URL ve kimlik doğrulama Örnek ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` Panelde anahtarı oluşturun: [API Webhooks için](/api-keys?lang=en) (Pro ve Ajans planları için) Sorular - [@orbitoads](https://t.me/orbitoads). ## Makine tarafından okunabilen biçimler - [OpenAPI 3.1 SGK](/docs/api/openapi.yaml) - her son nokta, parametreler ve hata kodu. - [llms.txt](/docs/llms.txt) — indeksleri AI okuyan ajanlar; [llms-full.txt](/docs/llms-full.txt) — tüm sayfalar tek bir dosyada. - Her sayfada bir Markdown ikiz vardır: yoluna `.md` ekleyin, e.g . [/docs/api.md](/docs/api.md) . Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## Uygulama notları ## Çalışma alanını bağlama Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ### Geliştirici kılavuzları ve hesap erişimi **API başlangıç rehberi** API başlangıç rehberi — Sunucudaki anahtarla hesapları listeleyin. Bir hesabın kampanyalarını okuyun. İlk yazmada yeni idempotency anahtarıyla duraklatılmış taslak oluşturun ve dönen görevi izleyin. [**API başlangıç rehberi**](/tr/docs/api/) **Anahtarlar ve hesap yetkileri** Anahtarlar ve hesap yetkileri — Anahtarı sunucudan X-API-Key başlığında gönderin. Bir, birkaç veya tüm yetkili hesapları seçin. Yazma için yönetim anahtarı ve hesapta yönetici ya da sahip rolü gerekir. [**Anahtarlar ve hesap yetkileri**](/tr/docs/api/authentication/) **Kampanya oluşturma ve medya** Kampanya oluşturma ve medya — Bir istekte bir hesap için 100 kampanya oluşturulur. Kanal, bot, arama veya kitleyi seçin, benzersiz işlem anahtarı gönderip görevi izleyin. [**Kampanya oluşturma ve medya**](/tr/docs/api/create-campaigns/) **Mevcut kampanyaları değiştirme** Mevcut kampanyaları değiştirme — Metin, bağlantı, teklif, günlük sınır, zamanlama, bütçe ve yayını yönetin. Toplu istek 1.000 kampanyaya kadar destekler. [**Mevcut kampanyaları değiştirme**](/tr/docs/api/manage-campaigns/) **Kampanya olaylarını alma** Kampanya olaylarını alma — Belgelerde status_change, hourly_digest ve test ping'i vardır. HTTPS üzerinden alın, ham gövdeyle imzayı doğrulayın ve yinelenen teslimleri ayıklayın. [**Kampanya olaylarını alma**](/tr/docs/api/webhooks/) **Yapay zekâ asistanıyla API belgeleri** Yapay zekâ asistanıyla API belgeleri — Alanlar için OpenAPI'yi, davranış için Markdown belgelerini okuyun. Anahtarları sunucuda tutup kampanya değişikliklerinden önce okumayı sınayın. [**Yapay zekâ asistanıyla API belgeleri**](/tr/docs/api/ai-assistants/) [API anahtarlarını ve webhook’ları yönet](/api-keys?lang=en) ## İlk istek X-API-Key ile GET /api/v1/account/info gönderin. data içinden bir id seçip sonraki istekte account_id olarak kullanın. Örnek değerler ve kimlikler kurgusaldır. ## İşlemler ve alanlar /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## İstek örneği GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ### Makine tarafından okunabilen başvurular [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/tr/docs/api.md) ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Geliştirici belgeleri | Alan | Belgelenen değer | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | Kaynak · [Veri kaynağı](https://adsly.pro/docs/) ## Cabinet | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [API başlangıç rehberi](/tr/docs/api/)[Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/)[Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/)[Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/)[Kampanya olaylarını alma](/tr/docs/api/webhooks/) [Sonraki konu**API başlangıç rehberi**](/tr/docs/api/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API başlangıç rehberi [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) API Sunucudaki anahtarla hesapları listeleyin. Bir hesabın kampanyalarını okuyun. İlk yazmada yeni idempotency anahtarıyla duraklatılmış taslak oluşturun ve dönen görevi izleyin. [Markdown](/tr/docs/api.md) Orbito Ads API’si, Telegram Ads hesaplarınızı kendi uygulamanızdan paneldeki yöntemlerle yönetmenizi sağlar. Euro, TON ve Stars hesapları için aynı anahtar ve temel adres kullanılır. | Sen istiyorsun... | Kullanım | | --- | --- | | Kampanyaları ve istatistikleri bir çerçeveye veya BI'e dökün | [Kampanyalar](/tr/docs/api/campaigns/), [Devletler](/tr/docs/api/stats/) | | Bir senaryo, bir bot veya CRM kampanyalarını başlatın | [Kampanyaları oluşturmak](/tr/docs/api/create-campaigns/) | | Yükseltme teklifleri, durak kaybedenleri, top up kazananları otomatik olarak | [Kampanyaları Yönetmek](/tr/docs/api/manage-campaigns/) | | Bir kampanyanın ne zaman onaylandığını, reddedildiğini veya bütçeden çıktığını bilmek | [Webhoks](/tr/docs/api/webhooks/) | | Her kampanyaya karşı takipçinizden kaynakları ve satışları hesaplayın | [dönüşümler](/tr/docs/api/conversions/) | ## Temel URL Örnek ``` https://orbitoads.pro/api/v1 ``` Her başvuru anahtarınızı `X-API-Key` başlıkta taşıyor. başvuru ve cevap organları JSON . tüm zamanlar UTC . ## Hızlı başlangıç ### 1. Bir anahtar oluşturun Panelde **API Webhooks için** → **+ Yeni anahtar** (Pro ve Agency planları) açılır. anahtarın hangi kabinelerine ulaştığını seçin. kampanyaları oluşturmak ve değiştirmek için **Kampanyaları yönetmek için izin verin** tuşuna basın - anahtar olmadan sadece okunur. anaht kopyalayın: bir kez gösterilir. Örnek ``` export ORBITO_API_KEY="orb_…" ``` ### 2. Anahtarı gören kabinlerin listesi Örnek ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "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 } } ] } ``` tutun `id` - Bu da o `account_id` Diğer tüm telefonlar kullanılır. Reklam hesabındaki tüm para biriminde `currency`. ### 3. Kampanyaları okuyun Örnek ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. Bir kampanya oluşturun (dönüştürülür, böylece hiçbir şey harcanmaz) Örnek ``` 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"] }' ``` Telegram'e konuşmalar oluşturun, bu yüzden arka planda çalışır. `202 Accepted`'yi ve bir görevi alırsınız: Örnek ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. Görev için bekleyin Örnek ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` `status` `completed` olduğunda, `ad_ids` yeni kampanyanın kimliğini tutar. Örnek ``` 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, her yeni reklamı çalışmadan önce inceliyor; kampanyanın `status` Nereye gidiyor (bunu görmek için [statüs](/tr/docs/api/campaigns/#doc-note-statuses)). A [Webhok](/tr/docs/api/webhooks/) Değişen anı anlatır. ## Beş entegrasyon kuralı 1. **`ad_id` Tek bir reklam hesabı içinde yalnızca benzersizdir.** Telegram reklam kimliklerini ofisler üzerinden yeniden kullanır. çift `(account_id, ad_id)` tarafından kampanyaları kaydetmek ve incelemek ve anahtar bir ofisden daha fazlasını gördüğünde `account_id`'ü geçmek. 2. **Gönder Bir `Idempotency-Key` oluşturma, kopyalama, kitle ve bütçe çağrısı** - Her işlem için tıraş UUID, geri çekildiğinizde aynı. Bir geri çekilme ikinci bir kampanya oluşturmaz ya da para iki kez hareket eder. Görmek [İdepotansiyel](/tr/docs/api/idempotency/). 3. **Bir görev oluşturun, kopyalayın ve toptan geri dönün.** Pol `GET /v1/tasks/{id}` bitene kadar. Görmek [Görevler](/tr/docs/api/tasks/). 4. **Para alanları çitler** ( `"spent": "3.541000"` ) tam ondalı tutmak için. onları aritmetik yapmadan önce ondalı olarak ayırın. 5. **Şubesi üzerinde `code`gösterim `error`.** Her hata sabit makine okunabilir bir hataya sahiptir. `code` İnsanların bir yargısı `error`. Görmek [hatalar](/tr/docs/api/errors/). ## Yanıt yapısı Örnek ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## Sonraki adımlar - [Anahtarlar ve erişim](/tr/docs/api/authentication/) - sadece okuma vs kampanya yönetimi anahtarları, ajans ekipleri. - [-Kloud ve diğer AI asistanları ile birlikte yapın](/tr/docs/api/ai-assistants/) - bir kodlama aracının bütünleşmeyi yazmasına izin verin. - [OpenAPI SPEC](/docs/api/openapi.yaml) - Postman, Insomnia veya bir müşteri jeneratörüne ithal. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. Örnek · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` Örnek · 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 } } ] } ``` ## Uygulama notları ## İlk istek X-API-Key ile GET /api/v1/account/info gönderin. data içinden bir id seçip sonraki istekte account_id olarak kullanın. Örnek değerler ve kimlikler kurgusaldır. ## Hesap ve kampanya kimlikleri account_id ile ad_id değerlerini birlikte saklayın. Ayrı hesaplarda aynı ad_id olabilir. Birden çok hesaba erişen anahtarda ilgili account_id değerini gönderin. ## Kabul ve tamamlanma Oluşturma, kopyalama ve toplu istekler HTTP 202 ve iş kimliği döndürür. Retry-After'a uyarak GET /api/v1/tasks/{id} sorgulayın. completed durumunda da failed ve errors alanlarını kontrol edin. ## İşlemler ve alanlar 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} ## İstek örneği GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · API başlangıç rehberi | Alan | Belgelenen değer | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/) ## CampaignStatus | Alan | Alan türü | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Geliştirici belgeleri](/tr/docs/)[Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/)[Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Geliştirici belgeleri**](/tr/docs/)[Sonraki konu**Anahtarlar ve hesap yetkileri**](/tr/docs/api/authentication/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Erişilebilir reklam hesapları [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/accounts/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Liste her hesap için para birimi, bakiye, yetki ve desteklenen alanları gösterir. Kampanya kimliğiyle birlikte account_id değerini saklayın. [Markdown](/tr/docs/api/accounts.md) Orbito’daki her hesap bir Telegram Ads reklam hesabıdır. Her kampanya `account_id` ile tanımlanan tek bir hesaba bağlıdır. ## GET /v1/account/info Bu anahtarın şu anda erişebildiği hesapları döndürür. Örnek ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "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 } } ] } ``` | alanı | anlamı | | --- | --- | | `id` | `account_id` diğer çağrılara geçmek için. | | `cabinet_type` | `euro` , `ton` veya `stars` | | `currency` | `EUR`, `TON` veya `STARS` - bu bünyede **Her** para alanının para birimi: bilanço, bütçe, harcama, CPM . Farklı para birimlerinin bünyelerinde para eklemeyin. | | `access_level` | erişiminiz için : `owner`, `manager` (Kampanyaları değiştirebilen bir kuruluş üyesi) veya `viewer` (Sadece bir üye olarak okuma yapılır) Yazılar Gerekli `owner` veya `manager`. | | `balance` | Kabin üzerinde para, kampanyalar için henüz verilmemiş (çeyrek çizgi). Kabin senkronizasyonunda yenilenmiş — bakınız `balance_updated_at` . | | `min_budget` | En küçük sıfır olmayan `budget` bu kabinede yeni bir kampanya olabilir. | | `features.ad_button` | Ofis reklam formunda özelleştirilmiş bir düğme (Yaratma / Düzenleme alanı `button`) vardır. | | `features.crypto_filters` | Ofis reklam formunda kripto kanal filtreleri vardır. | Düzeltilmiş rakamları gösteren özel iş ortağı anahtarlarında `balance` değeri `null` olur. ## Notlar - `GET /v1/account/info` bir okuma isteği maliyeti - başlangıçta ve bir yazı geri döndüğünde `ACCOUNT_NOT_FOUND` , her çağrıdan önce değil. - Bir kabin, listeden devre dışı bırakıldığında veya erişiminiz kaldırıldığında kaybolur. - Kabineler Orbito Ads paneline eklenir; API kampanyaları içlerinde yönetir. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## GET `/api/v1/account/info` Anahtarın eriştiği hesap, para birimi, sınır ve rolleri listeler. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Evet | 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 } } ] } ``` ## Uygulama notları ## Bakiye ve para birimleri Her hesapta currency, balance_updated_at ve min_budget değerlerini okuyun. Kampanyada para ve oranlar ondalık metin veya null, rapor özetlerinde sayıdır. EUR, TON ve Stars toplamlarını ayırın. ## Özellik kullanılabilirliği features.ad_button özel düğmeyi, features.crypto_filters kripto kanal filtrelerini belirtir. İşlemleri sunarken is_active ve access_level değerlerini okuyun. ## İşlemler ve alanlar GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## İstek örneği GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Erişilebilir reklam hesapları | Alan | Belgelenen değer | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/accounts/) ## Cabinet | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Money | Alan | Alan türü | | --- | --- | | Money | string \| null | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Kampanya sorgulama](/tr/docs/api/campaigns/)[Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/)[Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/)[Kampanya ve hesap istatistikleri](/tr/docs/api/stats/)[Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Kampanya sayfalarını gezme**](/tr/docs/api/pagination/)[Sonraki konu**Kampanya sorgulama**](/tr/docs/api/campaigns/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Yapay zekâ asistanıyla API belgeleri [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/ai-assistants/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Alanlar için OpenAPI'yi, davranış için Markdown belgelerini okuyun. Anahtarları sunucuda tutup kampanya değişikliklerinden önce okumayı sınayın. [Markdown](/tr/docs/api/ai-assistants.md) Belgeler hem geliştiriciler hem de kodlama asistanları içindir. Her sayfa Markdown olarak sunulur. Tüm belgeler tek dosyada, API sözleşmesi ise OpenAPI biçiminde bulunur. Göreve uygun bağlantıları asistanınıza verin. ## Yapay zekâ aracıları için dosyalar | Dosya | Ne olduğunu | Ne zaman kullanılır | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | Her sayfanın indeksi, tek çizgi özetleri ile ( [xtxt formatı](https://llmstxt.org/) ) | İhtiyacınız olan sayfaları seçin. | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | Tüm sayfalar tek bir Markdown dosyasında (yaklaşık 80 KB ) | Büyük bir dosya tamamını yüklemek için araçlar; web-fetch araçları kısa kesebilir, bu yüzden orada `llms.txt` + sayfa tercih | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec: son noktalar, parametreler, şemalar, hata kodları | Tipli müşteriler, talep doğrulama, Postman | | `.md` | Markdown olarak sayfa, e.g . [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | tek bir konu | Her sayfa da üstte **Markdown olarak sayfayı kopyalayın** 'e sahiptir - doğrudan bir sohbet içine yapıştırın. ## Claude Code ile API entegrasyonu için istem Bunu Claude Code'e (veya başka bir kodlama aracı) ekleyin ve Orbito Ads'ye konuşun. Örnek ``` Orbito Ads API’sini bu projeye entegre et. Kod yazmadan önce https://orbitoads.pro/tr/docs/llms.txt dizinini ve görevle ilgili Markdown sayfalarını oku. Tüm belgeler https://orbitoads.pro/tr/docs/llms-full.txt, OpenAPI tanımı https://orbitoads.pro/docs/api/openapi.yaml adresindedir. - Temel adres https://orbitoads.pro/api/v1, kimlik doğrulama başlığı X-API-Key. Anahtarı ORBITO_API_KEY ortam değişkeninden oku. Kaynak koda veya günlüklere yazma. - Kampanyaları (account_id, ad_id) çiftiyle sakla. Aynı ad_id farklı hesaplarda kullanılabilir. - /campaigns, /campaigns/bulk, /campaigns/{id}/copy ve /campaigns/{id}/budget için her yeni POST işleminde Idempotency-Key başlığına yeni bir UUID koy. Aynı işlemi yeniden denerken aynı UUID’yi kullan. - Oluşturma, kopyalama ve toplu işlemler 202 ve bir görev döndürür. completed veya failed durumuna kadar Retry-After süresini gözeterek GET /tasks/{id} ile görevi sorgula. - Parasal değerler ondalık sayı içeren dizelerdir. Karşılaştırmadan önce ondalık türüne dönüştür. - 429 yanıtında Retry-After kadar bekle. Yazma sırasında 5xx alırsan yeni bir Idempotency-Key ile yeniden denemeden önce GET ile kampanyayı kontrol et. - Program kararlarında code, kullanıcıya gösterilen hata iletisinde error alanını kullan. - Türleri tanımlanmış yöntemlere sahip küçük bir istemci ve HTTP yanıtlarını taklit eden testler yaz. İstenen özellik: <örneğin, hesap 53 içinde son 24 saatteki CPA değeri 4 EUR’yu aşan kampanyaları her saat duraklat>. ``` ## Sohbette tek seferlik görev istemi Bir kod taban değişikliği yerine bir soru için ( Claude.ai, ChatGPT veya web erişimi ile herhangi bir sohbet): Örnek ``` https://orbitoads.pro/tr/docs/llms.txt dizinini ve kampanya ile istatistik sayfalarını oku. Orbito Ads API’siyle hesaplarımdaki tüm Active kampanyaları, her birinin son 7 gündeki harcamasıyla listeleyen ve harcamaya göre sıralayan bir Python betiği yaz. Anahtarı ORBITO_API_KEY değişkeninden oku. ``` ## Projenin CLAUDE.md dosyası için kurallar Projenizde `CLAUDE.md` (her seansın başlangıcında Claude Code okur) varsa, bu blok eklemek için her gelecekteki değişiklik bütünleşme aynı kurallara uymak için: Örnek ``` ## Orbito Ads API entegrasyonu - Bir API çağrısını değiştirmeden önce https://orbitoads.pro/tr/docs/llms.txt, ilgili .md sayfası ve https://orbitoads.pro/docs/api/openapi.yaml tanımını incele. Uç nokta ve alan adlarını belgelerden al. - ORBITO_API_KEY değerini ortamdan oku. Anahtarı commit’e, terminal çıktısına veya günlük dosyalarına yazma. - Kampanyayı (account_id, ad_id) ile tanımla. Kampanya oluşturan veya bakiye aktaran her POST için Idempotency-Key gönder. Her işlem için ayrı UUID üret ve tekrarlarında aynı UUID’yi kullan. - Oluşturma, kopyalama ve toplu işlemlerde GET /v1/tasks/{id} sonucunu izle. Canlı kampanyalardaki bütçe değişikliği, duraklatma ve silmeyi test edilmiş tek bir modülden geçir. Üretimde tek seferlik bir betik çalıştırmadan önce onay al. ``` ## Aracı izinleri ve güvenliği - **Tek anahtarı okuyun.** Agent gerçek verileri keşfedebilir ve hiçbir şey değişmez. **Kampanyaları Yönetmek** ile bir anahtarı değiştirin sadece yazılı kod incelenirken. - **Kampanyalarla birlikte yapılır `"active": false` ve `"budget": 0` Test sırasında** Hiçbir şey çalışmıyor ve hiçbir şey harcanmıyor; sonra bunları silin. - **Anahtarın kapsamını daraltın** bir test kabinine kadar, entegrasyon yeni. - **Yetkililer hataları okuyor.** Her hata neyi düzeltmeleri gerektiğini söyler ( `error` ) ve istikrarlı `code` ve yanlış olan `param`'ü taşıyor - ajanlar bunlardan kendi taleplerini tahmin etmeden düzeltiyor. - Panelin kampanya geçmişinde API'in tüm değişiklikleri **🔌 API** 'yi işaret ediyor, bu yüzden ajanın ne yaptığını gözden geçirebilirsiniz. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. Örnek · 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' ``` ## Uygulama notları ## Anahtar ve hesap izinleri X-API-Key'i sunucuda saklayın. Rapor için okuma yeterlidir. Değişiklik için kampanya yönetimi, ilgili hesapta sahip veya yönetici rolü ve etkin özellik hakkı gerekir. ## Tekrarlanabilir entegrasyon tarifi OpenAPI sözleşmesini, kurgusal hesap kimliğini, işlemi, beklenen yanıtı ve yeniden deneme testini verin. Gerçek anahtarı sunucu gizli depodan okur. Raporlamaya hesap ve kampanya listeleriyle başlayın. ## İşlemler ve alanlar /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 ## İstek örneği GET /docs/api/openapi.yaml ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Yapay zekâ asistanıyla API belgeleri | Alan | Belgelenen değer | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/ai-assistants/) ## İlgili yazılar [Geliştirici belgeleri](/tr/docs/)[API başlangıç rehberi](/tr/docs/api/)[Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Anahtarlar ve hesap yetkileri**](/tr/docs/api/authentication/)[Sonraki konu**API hatalarını yorumlama**](/tr/docs/api/errors/) ## Kaynaklar ve veriler - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Anahtarlar ve hesap yetkileri [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/authentication/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Anahtarı sunucudan X-API-Key başlığında gönderin. Bir, birkaç veya tüm yetkili hesapları seçin. Yazma için yönetim anahtarı ve hesapta yönetici ya da sahip rolü gerekir. [Markdown](/tr/docs/api/authentication.md) ## Anahtarı gönderme Her istekte anahtarı HTTP başlığında gönderin. Örnek ``` X-API-Key: orb_0f3c… (68 karakter: orb_ öneki ve ardından 64 onaltılık basamak) ``` İsteğin kimlik bilgisi anahtarın kendisidir. OAuth akışı veya belirteç değişimi gerekmez. Anahtarı sunucuda saklayın; tarayıcıya veya mobil uygulamaya göndermeyin. ## Anahtar edinme Panelde API ve Webhook’lar bölümünde Yeni anahtar’ı seçin. Pro ve Agency planlarında kişi başına en fazla 5 etkin anahtar bulunabilir. Anahtarı oluşturduğunuzda kopyalayın. Değer yalnızca bir kez gösterilir ve sadece SHA-256 özeti saklanır. Kaybederseniz iptal edip yenisini oluşturun. ## Anahtar izinleri | izin | Nasıl elde edersin | Ne izin veriyor | | --- | --- | --- | | **Okumaya devam et** | Her anahtar | kampanyalar, istatistikleri, dönüşümler, görevler, hedef kodları, webhooks, bize dönüşümler göndermek | | **Kampanyaları Yönetmek** | Anahtarı oluşturduğunuzda **Kampanyaları yönetmek için izin verin** tuşuna tıklayın veya anahtarın kartında daha sonra değiştirin. | her şey Read, plus create, edit, pause/resume, budget, copy, bulk actions, delete, media upload | Salt okunur anahtarla yazma isteği `403 READ_ONLY_KEY` döndürür. Panolar ve raporlar için bu anahtarı kullanın. Yönetim yetkisini yalnızca kampanyaları değiştirebilecek uygulamalara verin. İki anahtar türü de bütçeyi sadece hesap bakiyesi ile kampanyalar arasında aktarabilir. Hesaptan para çekemez. Yazma sırasında etkin bir Pro veya Agency planı ve paneldeki ilgili özellik izni gerekir. Plan izin vermiyorsa `403 FEATURE_NOT_AVAILABLE` döner. ## Anahtarın erişebildiği hesaplar Anahtarı oluştururken erişebileceği hesapları seçin. | Kapsam | Anahtar ulaşım | | --- | --- | | Tüm Ofislerim (Default) | Panelde açabileceğiniz her kabin, daha sonra eklenenler de dahil olmak üzere | | Çeşitli | Sizin yapmış olduğunuz kabineler | | 1 Reklam Hesabı | Sadece bu büro | Panelde açabileceğiniz alanı her zaman **Sırt** 'dir - asla uzatmaz. her isteğe göre yeniden kontrol edilir: bir kabinete erişimi kaybettiğinizde anahtarlarınız aynı anda kaybeder. `GET /v1/account/info` her zaman anahtarın şu anda neye ulaştığını tam olarak listeler. Bir hesap üzerinde işlem yaparken anahtar birden fazla hesaba erişiyorsa `account_id` belirtin. Eksik olduğunda `400 ACCOUNT_ID_REQUIRED` döner. ## Ajans ve ekip erişimi API erişim panelde, kabinede sahip olduğunuz erişimi takip eder: | Sen kimsin | Kabineler anahtar ulaşımları | Kampanyaları yönetebiliriz | | --- | --- | --- | | Hesap Sahibi (Sıradan Kullanıcı) | Kendi bünyeleriniz | Tüm bunların | | Agency Mülkiyet | Kişisel ve Ajans Kabineleri | Tüm bunların | | Agency Takım Üyesi | sizinle paylaştığınız büro | **Yönetici** erişimi ile paylaşılan ofisler; **Görüntüleme** ofisler yalnızca okuma | - Ekibin üyeleri kendi anahtarlarını **API Webhooks için** sayfasında oluştururlar. - Ajans sahibi, **API Webhooks → Ekip Anahtarları** 'in altında oluşturulan takımın her anahtarını görür ve bunlardan herhangi birini iptal edebilir, kampanyaları yönetebilir mi, kaç kabinete ulaşabilir mi? - `GET /v1/account/info` her kabin için `access_level` iade eder: `owner`, `manager` veya `viewer` . bir `viewer` kabin için bir yazı `403 VIEW_ONLY_ACCESS` iade eder. - Eğer sahibi bir üyeyi kaldırırsa, onları Görüntülemeye indirir veya ajans planı sona ererse, üyenin anahtarları hemen takip edilir - el ile iptal edilecek bir şey yoktur. Panelde rollerin anlamı nedir: **Yönetici** - bu kabinede kampanya yönetimi; **Görüntüleme** - kampanyalar ve istatistikleri sadece. sahibi ayrıca bir üyenin kabineleri eklemesine, takım arkadaşlarını davet etmesine veya kendi kabinelerini paylaşmasına izin verebilir (her zaman kendi seviyelerinin üstünde değil). ## Anahtarı iptal etme ve yenileme - **İtiraf** panelde kartın anahtarı. hemen çalışmayı durdurur. - **Rotaç** = Yeni bir anahtar oluşturun, yerleştirin, sonra eski anahtarı iptal edin. - **Webhook Sırrı** ([Webhoks](/tr/docs/api/webhooks/) doğrulama için) anahtarından ayrıdır ve kendi başına döndürülebilir. ## Anahtarları güvenle saklama - Bir anahtar bütünleşme başına, böylece diğerleri kırmadan birini iptal edebilirsiniz. - Anahtarları çevre değişkenlerinde veya gizli bir yöneticide saklayın. asla bunları taahhüt etmeyin, asla sohbet veya biletlere yapıştırmayın. - Sadece okuma anahtarları tercih edin; sadece kod kampanyaları değiştiğinde **Kampanyaları Yönetmek** ekleyin. - Birleşmiş Milletler’in bir bütünleşme ihtiyacı olan büroların kapsamını kısaltın. - Bir anahtar kaçmış olsaydı, önce iptal et ve ikinci soruşturma. API aracılığıyla yapılan her değişiklik kampanyanın geçmişinde **🔌 API** işaretlenmiş panelde görünür. ## Kimlik doğrulama hataları | HTTP | `code` | anlamı | | --- | --- | --- | | 401 | `API_KEY_MISSING` | `X-API-Key` başlık | | 401 | `API_KEY_INVALID` | Yanlış, iptal veya tükenmiş anahtar | | 401 | `NO_ACCOUNTS` | Anahtar şu anda aktif bir kabinete ulaşmıyor | | 403 | `READ_ONLY_KEY` | Bir anahtarı olan bir yazı, kampanyaları yönetmiyor | | 403 | `VIEW_ONLY_ACCESS` | Görüntüleme olarak sizinle paylaştığınız bir kabineye yazın | | 403 | `FEATURE_NOT_AVAILABLE` | Plan bu eylemi içermez. | | 403 | `WRITE_NOT_ALLOWED` | bu tür anahtar (bir ortak için Orbito Ads tarafından yayınlanan) yazamaz | Kodların tam listesi için API [hatalar](/tr/docs/api/errors/)ı bölümüne bakın. Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## Uygulama notları ## Çalışma alanını bağlama Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## Anahtar ve hesap izinleri X-API-Key'i sunucuda saklayın. Rapor için okuma yeterlidir. Değişiklik için kampanya yönetimi, ilgili hesapta sahip veya yönetici rolü ve etkin özellik hakkı gerekir. İstek sonuçları ve yanıt alanları | API | HTTP | Anlamı | | --- | --- | --- | | API_KEY_MISSING | 401 | Anahtarı X-API-Key başlığıyla gönderin. | | API_KEY_INVALID | 401 | Anahtar geçersiz, süresi dolmuş veya iptal edilmiş. | | NO_ACCOUNTS | 401 | Anahtarın erişebildiği etkin reklam hesabı yok. | | READ_ONLY_KEY | 403 | Anahtar okuma iznine sahip. Yazma için kampanya yönetimi yetkisi gerekir. | | VIEW_ONLY_ACCESS | 403 | Viewer hesabı görüntüleyebilir. Değişiklik için hesap yazma izni gerekir. | | FEATURE_NOT_AVAILABLE | 403 | Bu işlem mevcut plana dahil değil. | | WRITE_NOT_ALLOWED | 403 | Sağlayıcının ortaklara verdiği anahtar türü yazmaya izin vermez. | [API hatalarını yorumlama](/tr/docs/api/errors/) ## Kapsam ve iptal Sağlayıcı anahtarı bir, seçili veya tüm yetkili hesapları kapsar. Kapsam her çağrıda denetlenir. Uygun planda kişi başına beş etkin anahtar desteklenir. Kayıp anahtarı iptal edin, webhook sırrını ayrı yenileyin. ## İşlemler ve alanlar X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## İstek örneği GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Anahtarlar ve hesap yetkileri | Alan | Belgelenen değer | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/authentication/) ## Cabinet | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Geliştirici belgeleri](/tr/docs/)[API başlangıç rehberi](/tr/docs/api/)[Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**API başlangıç rehberi**](/tr/docs/api/)[Sonraki konu**Yapay zekâ asistanıyla API belgeleri**](/tr/docs/api/ai-assistants/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Kampanya sorgulama [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/campaigns/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Listeyi durum ve hedefe göre süzün veya bir kampanyayı geçmişiyle sorgulayın. Reklam kimliği farklı hesaplarda yinelenebildiğinden account_id ve ad_id birlikte kullanılmalıdır. [Markdown](/tr/docs/api/campaigns.md) API’de her kampanya bir Telegram reklamını temsil eder. `(account_id, ad_id)` çiftini kullanın. Farklı hesaplarda aynı `ad_id` bulunabilir. ## Kampanya nesnesinin alanları `GET /v1/campaigns/{ad_id}` geri bildirim: Örnek ``` { "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" } ``` | alanı | anlamı | | --- | --- | | `title` | Ad için iç adınız. | | `text` | İnsanlar reklamı görüyor. | | `status` | Telegram reklamla ne yapıyor - bakınız [statüs](/tr/docs/api/campaigns/#doc-note-statuses) . | | `active` | Ne için istediniz: `true` = koşmak için Bir kampanya ile `active: true` ve statüsü `Stopped` Bütçesi yeniden yapıldıktan sonra yeniden yapılır. | | `promote_url` / `tme_path` | Reklamın neye yol açtığı: bir web sitesi URL , ya da bir `t.me/` bağlantısı (kanal, bot, mini-app, post). | | `target_type` | `channels`, `bots`, `search` veya `users` — bakınız [Kampanyaları oluşturmak](/tr/docs/api/create-campaigns/) . | | `targets` | Kullanıcılar, bilinen reklam hedeflerini (kanallar veya botlar) adlandırırlar. | | `cpm` | 1000 izlenme başına ödeme, kabinetin para biriminde. | | `budget` | Kampanyada **sol** para. `budget + spent` verilen her şey. | | `spent` | Şimdiye kadar harcanan para. | | `daily_budget` | Günlük harcama kapısı, eğer bir ayarlanırsa. | | `views`, `clicks`, `actions`, `opens` | `actions` platform eylemleri (giriş, bot başlar) - dönüşümleriniz değil; onlar için [dönüşümler](/tr/docs/api/conversions/) bakın. | | `ctr`, `cvr` | % % için : `"1.15"` Yüzde 1.15 oranında. | | `cpc`, `cpa` | Bir tıklama ve eylem başına maliyeti. | | `views_per_user` | Bir kişi reklamı kaç kez görebilir (1-4). | | `schedule` | Haftalık günler ve saatler reklam gösterilir veya `null` Saat etrafında yürüyor. Görmek [Programı](/tr/docs/api/manage-campaigns/#doc-note-schedule). | | `group_id` | Kampanya grubunun panelinde, eğer varsa. | | `auto_cpm_enabled` | Orbito Ads 's Auto CPM teklifi yönetir. | | `date` | Reklam oluşturulduğunda: unix saniye, bir çubuk olarak. | | `status_changed_at` | Son durum değişikliği. istatistiksel güncellemeler tarafından etkilenmiyor — “sonundan beri ne değişti” için iyi. | | `synced_at` | Ad’ın kendi ayarları ise, `schedule`, `text`, `views_per_user`, hedeflenmek - Telegram'dan son okuma oldu. Görmek [Tebrik](/tr/docs/api/campaigns/#doc-heading-freshness). | **Para alanları ondalık çerçevelerdir** (`cpm`, `budget`, `spent`, `ctr`, `cvr`, `cpc`, `cpa`Bu yüzden dezenfektanlar doğru kalır. Yorumlar (`views`, `clicks`, `actions`, `opens`Bunlar sayılarıdır. Tüm para reklam hesabının para biriminde (bazı [Reklam Hesabı](/tr/docs/api/accounts/)). ## Durumlar | statüs | anlamı | Ne yapabilirsin | | --- | --- | --- | | `Active` | koşmak için. | Bütçe değiştirmek, bütçe değiştirmek. | | `In Review` | Telegram’in incelemesini bekliyorum; henüz gösterilmemiştir. | Bekle - bir webhook size ne zaman değiştiğini söyler. | | `Declined` | Telegram Ad'i reddetti. | Yazıyı veya bağlantıyı düzenle (resubmits) veya yeni birini oluşturun. | | `On Hold` | Değiştirilmiş - sizin veya bir otomatik kural tarafından. | Resim için. | | `Stopped` | Bütçe kullanılmıştır. | Bütçe ekleyin; `active` `true` ise tekrar çalışır. | | `Paused` | Tüm kabin için Telegram'e kadar durdurulmuştur (daha nadir). | İletişim [@orbitoads](https://t.me/orbitoads) | | `Deleted` | Tarihte gizlenmiş, listeden gizlenmiş. | — | ## GET /v1/campaigns Her kabinetin kampanyaları anahtar ulaşır. Örnek ``` 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" ``` | Parametreler | Default İlanı | anlamı | | --- | --- | --- | | `account_id` | — | Sadece bu büro. ( `accountId` de çalışır.) | | `status` | Her Şey Ama Kaldırıldı | Bir veya birden fazla statü, komma ayrı. | | `title` | — | Başlık bu yazıyı içerir. | | `bot_username` | — | Tek bot veya kanal reklamları: `tme_path` , durum hassas, `@` numaralı kullanıcı adı ile eşleşir. `foo` `foobar` ile eşleşmez. | | `promote_domain` | — | `example.com` veya tam URL; `www.` , şeması, yolu ve limanı görmezden gelir. | | `promote_domain_mode` | `exact` | `suffix` ayrıca alt alanlarla aynıdır ( `x.example.com` ). | | `type` | — | `bot` (botlar ve mini uygulamalar), `channel` (kanallar, gruplar, gönderiler) veya `site` (dış web siteleri). | | `limit` | 100 | 1–500. | | `cursor` | — | Görüntüleme sayfası - [sayfa](/tr/docs/api/pagination/) . tavsiye edilir. | | `offset`, `sortBy`, `sortOrder` | — | Offset sayfası (kabin başına ≤ 500) | Filtreler AND ile birleştirilir. bilinmeyen bir bot veya etki alanı boş bir listeyi, bir hata değil iade eder. Örnek ``` { "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 } } ``` ## Tek bir kampanyayı getirme `GET /v1/campaigns/{ad_id}` - Yukarıdaki tüm nesne, hedefleme, yaratıcı alanlar ve `schedule` (Kısa sürede bu listede olanlar hızlı kalmak için dışarı çıkıyor.) Kaldırılan kampanyalar da geri dönüyor, `status: "Deleted"`. Örnek ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id` yalnızca aynı `ad_id`'nin birkaç ofisinizde olduğu durumlarda gereklidir ( `400 ACCOUNT_ID_REQUIRED` size anlatır). ### Tebrik Reklamın kendi ayarları - `schedule`, `text`, `views_per_user`, hedef - reklamın kendisini okumaktan gelir, böylece: - `GET /v1/campaigns/{ad_id}` Telegram'dan reklamı yeniden okuyarken kopyalarım daha eski olduğunda **5 dakikalar** Cevap vermeden önce. Telegram'ın reklam arayüzünde doğrudan yapılan bir değişiklik, bu pencerede ortaya çıkıyor. - Yürüyen kampanyalar ( `Active`, `In Review`, `On Hold`) de arka planda yaklaşık 3 saatte bir yeniden okunur. - Orbito Ads ile yapılan değişiklikler - panel veya bu API - kopyada bir anda bulunur. Telegram zamanında cevap vermezse, kaydedilen kopyasını alırsınız; `synced_at` size ne kadar yaşlı olduğunu söyler. ## GET /v1/campaigns/{ad_id}/history Bir kampanyanın toplamları bir süre boyunca - tek bir toplu, saatlik değil puan. Örnek ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "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` (İçeriye göre `7d`, `30d` veya `custom` ile `startDate` / `endDate` (`YYYY-MM-DD`, UTC* ve seçmeli `startHour` / `endHour` (0–23). Tarih için veri yok `404 NOT_FOUND`. ## Yerel kopyayı eşitleme 1. `GET /v1/campaigns?cursor=` sayfasında ve `(account_id, ad_id)` sayfasında yükseltilmiştir. 2. Durum değişiklikleri ve saat istatistikleri için [Webhoks](/tr/docs/api/webhooks/)'e abone olun, her dakika sorgulama yerine. 3. Webhook eksik olan her şeyi yakalamak için günde bir kez tamamen yeniden senkronize edin. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## GET `/api/v1/campaigns` Filtrelenmiş kampanyaları sayfalar halinde listeler. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `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` | Evet | 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}` Bir kampanyanın hedefleme, kreatif ve programını getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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` Bir kampanyanın tarih veya saat aralığındaki toplamlarını getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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" } } ``` ## Uygulama notları ## Hesap ve kampanya kimlikleri account_id ile ad_id değerlerini birlikte saklayın. Ayrı hesaplarda aynı ad_id olabilir. Birden çok hesaba erişen anahtarda ilgili account_id değerini gönderin. ## Filtreler ve durum Filtreler AND ile birleşir. status virgülle ayrılan değerler alır. Liste varsayılan olarak Deleted içermez, ayrıntı döndürebilir. active istenen yayını, status platform kararını gösterir. ## İşlemler ve alanlar 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 ## İstek örneği GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Kampanya sorgulama | Alan | Belgelenen değer | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | Alan | Alan türü | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Erişilebilir reklam hesapları](/tr/docs/api/accounts/)[Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/)[Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/)[Kampanya ve hesap istatistikleri](/tr/docs/api/stats/)[Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Erişilebilir reklam hesapları**](/tr/docs/api/accounts/)[Sonraki konu**Kampanya oluşturma ve medya**](/tr/docs/api/create-campaigns/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API sürüm ve değişiklikleri [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/changelog/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Sürüm yolda bulunur. İstemci yeni alanları ve enum değerlerini tolere etmelidir. Ekim 2026 kayıtları zamanlama, kampanya işlemleri ve dönem toplamlarını kapsar. [Markdown](/tr/docs/api/changelog.md) ## API sürümleri Sürüm yolda: `/api/v1` . içinde `v1` biz sadece **Aditatif** değişiklik yapıyoruz: | Aditif (her zaman gerçekleşebilir) | Breaking (yalnızca yeni bir versiyonda) | | --- | --- | | Yeni End Noktaları | Bir son nokta veya alanı kaldırmak veya yeniden adlandırmak | | Yeni seçmeli talep alanları | Yeni İhtiyaç Alanları | | Yeni yanıt alanları | Bir alanın türünü veya anlamını değiştirmek | | Enumlarda yeni değerler ( `status` , hata `code` ) | Enum değerini kaldırmak | | Yeni hata kodları | Geçerli bir başvuru iptal edilmesi | Bu yüzden müşterileri **Bilmediği alanları görmezden gelin** ve **Bilinmeyen enum değerleri ve hata kodları** lütfen yazın. kırıcı bir değişiklik burada ilk olarak duyurulan `/api/v2` olarak gönderilecek, `v1` yanında çalışmaya devam etti. ## Değişiklik geçmişi ### 2026-10-26 — dönem toplamları - **Yeni için :** [`GET /v1/stats/analytics`](/tr/docs/api/stats/#doc-note-get-v1statsanalytics)'ün her `topCampaigns` satırında `cpm`'ü taşıyor - dönem boyunca 1000 izlenme başına harcıyor - `cpc` ve `cpa`'nın yanında. - **düzeltme :** bir veya iki günlük bir pencere şimdi tam olarak aynı günleri tek bir aralıktır. ilk dakikalar gece yarısından sonra ( UTC ) bu tür pencerelerden çıkmak için kullanılır, böylece tek bir gün geri geldi yaklaşık 1-2% düşük; üç gün ve daha fazla aralığı zaten doğru ve değişmez. - **düzeltme :** 29 günden fazla başlayan iki günlük bir pencere geri döndü sıfır; şimdi o günün sayısını geri getiriyor. ### 2026-10-08 — reklam programı - **Yeni için : `schedule`** - bir kampanyayı yalnızca seçilen haftalarda ve saatlerde gösterir. `PATCH /v1/campaigns/{ad_id}` , kopyalama veya çok sayıda kampanyayı toplu eylem **set_schedule** ile aynı anda oluşturmaya ayarlayın; `null` kaldırır. `GET /v1/campaigns/{ad_id}` geri verir. Format: [Programı](/tr/docs/api/manage-campaigns/#doc-note-schedule) . Kampanyayı açmaz veya kapatmaz. - Bir kampanyayı durdurmak, yeniden düzenlemek ve düzenlemek zamanlamayı tutar; kopyalar ve yeniden düzenlenmiş kampanyalar onu miras alır. - **düzeltme :** `PATCH /v1/campaigns/{ad_id}` ile sadece `cpm`, `active` ve/veya `schedule` kampanyayı Telegram 's incelemesine geri gönderdi. Bunlar şimdi Telegram 's kendi teklif ve durum formları üzerinden gidiyor ve hiçbir zaman bir inceleme başlatmıyor; diğer alanlar hala yapıyor ( Telegram 's kuralı) - bakınız [Edit](/tr/docs/api/manage-campaigns/#doc-note-edit) . - **düzeltme :** Bütçe olmayan bir kampanyaya bir program koymak, onu incelemek için geri gönderemezdi. Böyle bir kampanya şu anda yanıt veriyor `400` ile `param: "schedule"` ve dokunmatik bırakılır - öncelikle bütçe ekleyin, sonra programı ayarlayın. - **`GET /v1/campaigns/{ad_id}` Şu anda mevcut:** Telegram'dan reklamı 5 dakikadan fazla olduğunda tekrar okuyor, bu yüzden `schedule`, `text` ve `views_per_user` Telegram'da doğrudan yapılan değişiklikleri yansıtıyor. Yeni alan **`synced_at`** Ad'ın son okunduğunda söylenir. Görmek [Tebrik](/tr/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08 — kampanya yönetimi - **Yeni: Yazma erişimini yapın.** Anahtarlar artık **Kampanyaları Yönetmek** : `POST /v1/campaigns` (geliştirme, 100'e kadar arama), `PATCH /v1/campaigns/{ad_id}` , `POST …/pause` , `…/resume` , `…/budget` , `…/copy` , `POST /v1/campaigns/bulk` , `DELETE /v1/campaigns/{ad_id}` , `POST /v1/media` taşıyabilir. - **Yeni okuyucu :** `GET /v1/campaigns/{ad_id}` (bir hedef kampanyası), `GET /v1/tasks/{id}`, `GET /v1/groups`, `GET /v1/targeting` . - **Ajans Ekibinin Üyeleri** anahtarları oluşturabilir; bir anahtar üyesi ile paylaşılan büroya ulaşır, erişim düzeyinde. ajans sahibi tüm takım anahtarlarını görür ( API & Webhooks → takım anahtları) ve bunları iptal edebilir. - **Idempotency-Key** oluşturma, kopyalama, toplu ve bütçe için gereklidir. - **Özel yazma oranı sınırı:** dakikada 30 başvuru, 60 okuyucu hariç. - **`GET /v1/account/info`** `access_level` , `currency` , `balance` , `balance_updated_at` , `min_budget` , `features` eklemektedir. - **hatalar** ekleme `code` ve `request_id` Değişmemiş olanların yanında `error` Yazı için. A `500` Artık iç hata metni içermez. - `account_id` her yerde kabul edilir `accountId` olmuştur (her ikisi de çalışma). - **düzeltme :** `GET /v1/stats?period=all` bir tıklama başına `cpa` olarak geri dönüştürülmüş maliyeti; artık herhangi bir diğer dönemde olduğu gibi, eylem başına maliyeti. ### 2026-10-04 - URL filtre her iki webhooks için de geçerlidir; `status_change` yalnızca sahipleri kabineyi görebilecek anahtarlara ulaşır. ### 2026-09-18 - Dönüşümler kendi bütçelerini (20 etkinlik/s) okuma sınırından uzak tutar; 1000 etkinliğe kadar çarpışmalar. ### 2026-06-30 - Giriş dönüşümleri: `POST /v1/postback`, `GET /v1/ingest/{token}`, `GET /v1/conversions` ### Önceki - `GET /v1/campaigns` kursör sayfası ve `bot_username`, `promote_domain` ve `type` filtreleri ile; istatistiksel son noktalar; `status_change` ve `hourly_digest` webhooks. Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## Uygulama notları ## Sürümlü yollar Güncel sözleşme /api/v1 kullanır. Uyumlu eklemeler isteğe bağlı alan, işlem, enum değeri ve hata kodu getirebilir. Bilinmeyen durumları koruyup kullanılmayan yanıt alanlarını atlayın. ## İzlenecek değişiklikler Şema haftalık programı, hesap kapsamlı yazmayı ve topCampaigns içinde CPM'i içerir. Tür değişikliği, alan kaldırma veya yeni zorunlu girdi yeni sürüm gerektirir. ## İşlemler ve alanlar /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 ## İstek örneği GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · API sürüm ve değişiklikleri | Alan | Belgelenen değer | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/changelog/) ## İlgili yazılar [Kampanya olaylarını alma](/tr/docs/api/webhooks/)[Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) Kaynağın güncellenme tarihi 2026-10-26 [Önceki konu**Onaylı dönüşümleri gönderme**](/tr/docs/api/conversions/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Onaylı dönüşümleri gönderme [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/conversions/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Sunucu veya takip aracından kampanya referansı ya da davet bağlantısını, olay türünü ve benzersiz işlem kimliğini gönderin. Gelir ve para birimi sonuçları harcamayla bağlar. [Markdown](/tr/docs/api/conversions.md) Telegram gösterimleri, tıklamaları ve katılımları sayar. Sonraki başvuru, para yatırma veya satış gibi sonuçları sunucunuz ya da takip aracınız görür. Bu olayları Orbito Ads’e göndererek her kampanyanın dönüşümlerini ve gelirini panelde, raporlarda ve otomasyon kurallarında kullanabilirsiniz. ## Dönüşüm takibini etkinleştirme Panelin anahtar kartında, **Postback Alın** 'e geçin. olmadan, geri göndermek `403 INGEST_DISABLED` . bir izleyicisi için de **URL Tracker için** tuşuna basın - sadece URL (bir kez görüntülenir) yazabilirsiniz dönüşümleri yayınlayabilir ama hiçbir şey okuyamaz. ## Dönüşümün kampanyayla eşleştirilmesi Her reklam bir yerde kontrol ettiğiniz bir tanımlayıcıyla bağlantı kurar: - bir bot veya mini uygulama: `t.me/yourbot?start=REF` veya `?startapp=REF` - bir web sitesi: izleyicinizin tıklama kimliği veya bağlantıdaki alt kimliği, e.g . `https://site.com/?subid=REF` Bir dönüşüm gönderdiğinizde, `REF`'i `ref` olarak içerir. Orbito Ads'ün bağlantısı taşıyan kampanyayı bulur, anahtarın ulaştığı kabinlerde. eğer bir kabinetin birkaç kampanyası aynı `ref`'ü paylaşırsa, dönüşüm bunların her biri için hesaplanır. ## Sunucudan · POST /v1/postback Örnek ``` 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" }' ``` Örnek ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` Tek seferde 1000'e kadar olay: `{ "events": [ {…}, {…} ] }` (veya bir bar array). Cevaplar her biri - `{ "accepted": 998, "failed": 2, "results": [ … ] }` - bildirir, bu yüzden kötü bir olay asla çarpmaz. ## Takip aracından · GET /v1/ingest/{token} Tracker URL'i macrosu ile takipçinizin geri dönüş ayarlarına yerleştirin: Örnek ``` # 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} ``` Makro adlarını izleyicinizin kendi belgelerine karşı kontrol edin. cevabı düz metin: `OK`, `OK (deduped)` veya HTTP durumuna sahip bir hata mesajıdır (4xx — geri çekmeyin, 5xx — geri). ## Alanlar | alanı | Aynı zamanda kabul edilen | İhtiyaç | anlamı | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | YES1 | Ad'ın bağlantısından gelen tanımlayıcı. 512 karakter kadar. | | `invite_link` | `invitelink`, `link` | YES1 | Kanal reklamları için: benzersiz davet bağlantısı Orbito Ads oluşturuldu. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | Evet | `lead`, `conversion` veya `purchase` (`signup`, `ftd`, `deposit`, `sale` gibi kelimeler anlaşılır). | | `txid` | `tid` , `transaction_id` , `order_id` , `rdtk_event_id` , başlık `X-Idempotency-Key` | Evet | Bu etkinlik için idiniz. Aynı mesaj göndermek `txid` Bu olayın sayılması yerine iki kez yeniden güncellenmesi. 128 karakter için. | | `amount` | `payout`, `sum`, `revenue`, `value` | Hiçbir | Sayısı; nakliye için negatif. | | `currency` | `cur`, `cnv_currency` | Hiçbir | ISO 4217 kodu olmadan, bir miktar USD olarak kaydedilir. | | `status` | — | Hiçbir | Ağınızın kendi statüs kelimesi (doğrulanmış, beklenen...), olduğu gibi kaydedilmiştir. | | `event_time` | `timestamp`, `date` | Hiçbir | ISO veya unix zaman; son 90 gün içinde saklanır. | | `account_id` | `accountId` | Bazen | İhtiyacınız olduğunda aynı `ref` birkaç ofisinizde mevcuttur ( `409` aksi). | | `meta` | — | Hiçbir | Kendi JSON nesneniz, 4 KB'ye kadar. | 1 `ref` veya `invite_link` . ## Sınırlar ve yeniden denemeler Anahtar başına saniyede 20 olay, 1000'e kadar patlamalarla - okuma ve yazma bütçelerinden ayrı. `429`'de `Retry-After`'yi bekleyin; geri çekilme her zaman güvenlidir çünkü `txid` deduplicates. ## GET /v1/conversions Kampanya başına toplam, etkinlik başına bir kez sayılır: Örnek ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | Parametreler | anlamı | | --- | --- | | `adId` | Bir kampanya var. | | `days` | Sadece 1 - 365 gün içinde alınan etkinlikler. | - `revenue` para birimi başına - miktarlar asla dönüştürülmez. - `ad_id`'in `null`'si, birden fazla kampanyanın paylaştığı `ref`'e eşleşen etkinlikler için. - Gönderdiğiniz miktarlar kendi raporunuzdur. faturalandırılmıyor ve ödediğiniz herhangi bir şeyi değiştirmiyor Orbito Ads . ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## POST `/api/v1/postback` Bir dönüşüm veya en çok 1.000 olaylık toplu kayıt gönderir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Evet | 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 } } ``` ### İstek gövdesi şeması 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}` Yalnızca yazma amaçlı adresle takipçi dönüşümü gönderir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `token` | path | `string` | Evet | | `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` Dönüşüm sayılarını ve geliri özgün para birimine göre listeler. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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 } } ] } ``` ## Uygulama notları ## Olayı reklama bağlama Sağlayıcı anahtarında postback alımını açın. ref veya invite_link, event ve sabit txid gönderin. Ana olaylar lead, conversion ve purchase'dır. Başvuru birden çok hesaba eşleşirse account_id verin. İstek sonuçları ve yanıt alanları | API | Anlamı | | --- | --- | | account_id / accountId | account_id alanı accountId adını da kabul eder. Aynı ref birden fazla hesaptaysa hesabı belirtin. Belirsiz eşleşme HTTP 409 döndürür. | ## Tekilleştirme ve para birimi Aynı txid olayı günceller. Toplu sonuçta başarı ve hata birlikte olabilir. Gelir için ISO para birimi verin, varsayılan USD'dir. Negatif tutar ters ibrazdır. Takip adresi yalnızca yazar, düz metin OK veya OK (deduped) döndürür. ## İşlemler ve alanlar 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 ## İstek örneği GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Onaylı dönüşümleri gönderme | Alan | Belgelenen değer | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | Alan | Alan türü | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | Alan | Alan türü | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Kampanya olaylarını alma](/tr/docs/api/webhooks/)[API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Kampanya olaylarını alma**](/tr/docs/api/webhooks/)[Sonraki konu**API sürüm ve değişiklikleri**](/tr/docs/api/changelog/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Kampanya oluşturma ve medya [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/create-campaigns/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Bir istekte bir hesap için 100 kampanya oluşturulur. Kanal, bot, arama veya kitleyi seçin, benzersiz işlem anahtarı gönderip görevi izleyin. Gerekli medyayı önceden yükleyin. [Markdown](/tr/docs/api/create-campaigns.md) `POST /v1/campaigns` tek hesapta kampanya oluşturur. Kampanya yönetim izinli anahtar ve `Idempotency-Key` başlığı gerekir. `202` yanıtı bir [görev](/tr/docs/api/tasks/) içerir. Kampanyalar görev tamamlanınca görünür. ## Kampanya oluşturma örneği Örnek ``` 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"] }' ``` Örnek ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## Toplu oluşturma Kampanyaları `campaigns`'e koyun (yaklaşık 100'e kadar). `account_id` ve grup alanları üst düzeyde kalır ve bunların hepsine uygulanır. Örnek ``` { "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"] } ] } ``` Kampanyalar birer birer oluşturulur. eğer ilk başarısız olursa, görev durur - aynı hatayı 100 kez tekrarlamak yerine giriş düzeltmek. her başarısızlık görev `errors` ile `index` aralığınızda listelenir. ## Alanlar | alanı | İhtiyaç | anlamı | | --- | --- | --- | | `title` | Evet | Panelde gösterilen iç adı. | | `text` | Evet | Telegram’in kendi uzunluğu ve içeriği kuralları uygulanır – bir reddetme görevi `errors`’de geri gelir. | | `promote_url` | Evet | Reklam ne açıyor: `https://t.me/channel`, `t.me/bot?start=ref`, `@channel` veya bir web sitesi URL. | | `cpm` | Evet | Kabinetin para biriminde 1000 izlenme başına ödeme, 0'dan daha büyük. hedeflemek için çok düşük → Telegram 's minimum hataya geri dönüyor. | | `budget` | Evet | Para kampanyadan kampanyaya taşınır: `0` , ya da en azından `min_budget` ( [Reklam Hesabı](/tr/docs/api/accounts/) ) . `0` ile reklam oluşturulur ama bütçe eklediğiniz sürece çalışamaz. | | `target_type` | Evet | `channels`, `bots`, `search` veya `users` — aşağıda bakınız. | | `active` | Hiçbir | `false` değiştirilmiştir oluşturur. varsayılan `true` . | | `daily_budget` | Hiçbir | Günlük harcama kapısı. | | `views_per_user` | Hiçbir | Bir kişi reklamı kaç kez görebilir, 1-4 | | `media` | Hiçbir | Görüntü veya video token [`POST /v1/media`](/tr/docs/api/create-campaigns/#doc-note-upload-media) . | | `picture` | Hiçbir | `true` reklamda promosyon kanalının avatarını gösterir. | | `button` | Hiçbir | Ad’ın altındaki düğme: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request`. Reklam hesabının yalnızca `features.ad_button` O kadar `true`. | | `website_name` | Hiçbir | Bir web sitesi reklamının üstünde gösterilen marka adı. | | `schedule` | Hiçbir | Reklamı yalnızca seçilen haftalar ve saatlerde gösterin, e.g . haftalar 9:00-18:00. biçim: [Programı](/tr/docs/api/manage-campaigns/#doc-note-schedule) . olmadan reklam saatin etrafında çalışır. | Sadece üst düzey: `account_id` ( anahtarın birkaç kabinete ulaştığı zaman gereklidir), `group_id` (var olan [Grup](/tr/docs/api/targeting/#doc-note-groups)) veya `new_group_name` (grup oluşturur veya bu isimle birini yeniden kullanır). Bilinmeyen alanlar `400 VALIDATION_ERROR` ile reddedilir ve alan adı `param`'de - bir tip asla sessizce bir ayar atmaz. ## Hedefleme ### `channels` — belirli kanallarda reklam göstermek Örnek ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | alanı | anlamı | | --- | --- | | `channels` | 1-100 kamu kanalları: `@name`, `name` veya `t.me/name`. | | `languages`, `topics`, `exclude_topics` | Kanal diline ve konuya göre ince ( [kodları](/tr/docs/api/targeting/) ). | | `add_similar_channels` | Bu kanallara benzer kanallar da ekleyin. | ### `bots` — botlarda reklam göster Örnek ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots` : 1-100 kamu botları. ### `search` — Telegram arama soruları için reklamı göster Örnek ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords` : 1-100 cümle, her biri 64 karakter kadar. ### `users` — bir seyirciye reklam göstermek Örnek ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | alanı | anlamı | | --- | --- | | `countries` | ISO ülke kodları. | | `languages` | Dil kodları için. | | `topics`, `exclude_topics` | Konu ile ilgili bilgiler id. | | `audience_channels` | Bu kanalları okuyanlar. | Bunlardan en az birinin gerekli olması gerekir. kodlar: [hedef kodları](/tr/docs/api/targeting/) . Kanallar, botlar ve anahtar kelimeler Telegram’in kendi kimliklerine çözülür. Telegram bulamayanlar kaybolur; bulamıyorsa, kampanya başarısız olur – `No targets found: …` kanallar ve botlar için, `No valid search queries found` anahtar Kelimeler için – ve `errors`’in dediği gibi. ## Kampanya oluşturulduktan sonra 1. Poll [`GET /v1/tasks/{id}`](/tr/docs/api/tasks/) ile `completed` arasındadır. `ad_ids` yeni kampanyaları tutar. 2. Telegram her yeni reklamı inceliyor: başlıyor `In Review`Sonra da olur `Active` ( ya da `Declined`). A [Webhok](/tr/docs/api/webhooks/) Ne zaman anlatır. 3. Değiştirin, fon veya [Kampanyaları Yönetmek](/tr/docs/api/manage-campaigns/) ile bunları durdurun. ## Medya yükleme `POST /v1/media` bir kabineye bir görüntü veya video yükler ve `POST /v1/campaigns` , `PATCH` ve kopya için `media` tokenini geri getirir. Örnek ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` Örnek ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG, PNG, GIF, WEBP veya MP4, 10 MB'e kadar, alanı `file`'de `multipart/form-data` olarak gönderilir. - Bazı kabineler sadece 16:9 görüntüleri en az 640 px genişlikte kabul eder; bir dosya uygun değilse, Telegram 's nedeni `error`'de geri gelir. ## Hatalar | Kodu | Ne zaman | | --- | --- | | `VALIDATION_ERROR` | Yanlış türün eksik, bilinmeyen bir alanı veya bu `target_type` - `param`'ye ait değildir. | | `IDEMPOTENCY_KEY_REQUIRED` | `Idempotency-Key` sayısı | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | Hangi kabine / bu kabine ulaşılamaz. | | `VIEW_ONLY_ACCESS` | Bu kabineye Viewer erişimi var. | | `QUEUE_FULL` | Bu kabineye 5 kişi katıldı. | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | Hükümet şu anda manuel değişiklikler yapamaz. | Bireysel kampanya başarısızlıkları (Telegram bir metin, bir teklif, bir bağlantı reddetti) başvuru başarısız olmaz - bunlar görev `errors`'de görünür. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## POST `/api/v1/campaigns` Bir hesapta bir veya en çok 100 kampanyanın oluşturulmasını sıraya alır. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Evet | | `X-API-Key` | header | `string` | Evet | 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": [] } } ``` ### İstek gövdesi şeması 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" } ] } ``` İstek sonuçları ve yanıt alanları | API | HTTP | Anlamı | | --- | --- | --- | | VALIDATION_ERROR | 400 | Tekrar denemeden önce alanları ve geçersiz değerleri düzeltin. | | IDEMPOTENCY_KEY_REQUIRED | 400 | Yazma isteğine zorunlu Idempotency-Key başlığını ekleyin. | | VIEW_ONLY_ACCESS | 403 | Viewer hesabı görüntüleyebilir. Değişiklik için hesap yazma izni gerekir. | | QUEUE_FULL | 429 | Hesabın kuyruğunda beş oluşturma işi var. Yer açılmasını bekleyin. | [API hatalarını yorumlama](/tr/docs/api/errors/) ## POST `/api/v1/media` Kreatif medyayı yükleyip hesaba özel dosya belirteci alır. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | | `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 } } ``` ### İstek gövdesi şeması JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` Örnek · 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" ] } ] } ``` ## Uygulama notları ## Tek kampanya veya toplu istek Tek kampanyada title, text, promote_url, cpm, budget ve target_type köktedir. Toplu istekte campaigns 1–100 girdi içerir, hesap ve grup kökte ortaktır. Bütçe sıfır veya en az min_budget olmalıdır. ## Hedefleme ve dosyalar channels, bots, search veya users seçin. Kanal, bot ve arama listesi 1–100 girdi, arama ifadesi en çok 64 karakter alır. Kitlede bir filtre gerekir. En çok 10 MB JPG, PNG, GIF, WebP ve MP4 yükleyen hesaba bağlıdır. ## Kabul ve tamamlanma Oluşturma, kopyalama ve toplu istekler HTTP 202 ve iş kimliği döndürür. Retry-After'a uyarak GET /api/v1/tasks/{id} sorgulayın. completed durumunda da failed ve errors alanlarını kontrol edin. ## İşlemler ve alanlar POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## İstek örneği GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Kitle testi ayarları Oluşturma şeması dört hedefleme modu tanımlar. Kanallar channels, bot adları bots, arama ifadeleri search_keywords alanına girer. Ülke, dil ve konu filtreleri kullanıcı kitlesini tarif eder. Testten önce hesabın özelliklerini okuyun. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Kampanya oluşturma ve medya | Alan | Belgelenen değer | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | Alan | Alan türü | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Erişilebilir reklam hesapları](/tr/docs/api/accounts/)[Kampanya sorgulama](/tr/docs/api/campaigns/)[Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/)[Kampanya ve hesap istatistikleri](/tr/docs/api/stats/)[Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Kampanya sorgulama**](/tr/docs/api/campaigns/)[Sonraki konu**Mevcut kampanyaları değiştirme**](/tr/docs/api/manage-campaigns/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API hatalarını yorumlama [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/errors/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) HTTP durumu ve hata kodunu birlikte okuyun. Eksik anahtar 401 döndürür. Yazmayı tekrarlamadan önce girişi düzeltin ve kota dolduğunda bekleme süresine uyun. [Markdown](/tr/docs/api/errors.md) ## Yanıt biçimi Her hata aynı şekle sahiptir: Örnek ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | alanı | Her zaman | anlamı | | --- | --- | --- | | `error` | Evet | Bir kişi bir cümle okuyabilir. gösterin; vazgeçmeyin - yazma iyileştirebilir. | | `code` | v1 hataları için evet | Sürdürülebilir, makine okunabilir. bu konuda şubeler. | | `param` | Giriş hataları | Bir yol olarak yanlış olan alan: `cpm`, `campaigns[2].channels[0]`, `account_id`. | | `request_id` | Çoğu hata | `X-Request-Id` yanıt başlığı ile aynıdır. destek için alın. | Bazı hatalar bağlam ekledi: `min_cpm` ve `currency`, Telegram çok düşük bir teklif reddettiğinde, `missing` ile `UNKNOWN_AD_IDS` , `limit` ile `QUEUE_FULL` . ## HTTP durum kodları | statüs | anlamı | geri dönmek ? | | --- | --- | --- | | 200 | Done | — | | 202 | Alınan, arka planda çalıştırılan — [Görev](/tr/docs/api/tasks/)'i inceleyin | — | | 400 | Başvuru yanlıştır ( alan, değer, eksik `account_id` ) — veya Telegram değişikliği reddetti | Hayır - talep düzeltme | | 401 | Hiçbir anahtar, kötü anahtar veya anahtar hiçbir kabinete ulaşmaz | No | | 403 | Anahtar veya plan bunu yapmak için izin verilmez | No | | 404 | Bu anahtar nokta bu anahtar noktada bulunmuyor | No | | 409 | Mevcut durumla çatışma (kabin kilitlendi, Telegram oturum sona erdi, aynı talep devam ediyor) | Bazen - koduna bakın | | 413 | Dosya çok büyük | No | | 422 | `Idempotency-Key` farklı bir talep için yeniden kullanılmıştır | Hayır - yeni bir anahtar kullanın | | 429 | Fiyat sınırı veya kuyruk dolu | Evet, `Retry-After` saniye sonra | | 500 | Bug - zaten kaydedildi | Önce durumu okuyun, sonra backoff ile geri dönün | | 503 | Geçici olarak kullanılamaz | Evet, sonra `Retry-After` | ## Hata kodları ### Doğrulama ve erişim | Kodu | HTTP | Ne yapmalı | | --- | --- | --- | | `API_KEY_MISSING` | 401 | `X-API-Key` sayılı Kanun | | `API_KEY_INVALID` | 401 | Anahtar yanlış, iptal edilmiş veya sona ermiştir. yeni bir oluşturun. | | `NO_ACCOUNTS` | 401 | Anahtar şu anda aktif kabineye ulaşmıyor (kabine devre dışı bırakıldı, erişim kaldırıldı). | | `FORBIDDEN` | 403 | Bu anahtar tipi sahipleri için izin verilmez. | | `READ_ONLY_KEY` | 403 | Panelin anahtarı için **Kampanyaları Yönetmek** 'i açın. | | `WRITE_NOT_ALLOWED` | 403 | Bu anahtar türü (bir ortak için Orbito Ads tarafından yayınlanmıştır) asla yazmaz. | | `VIEW_ONLY_ACCESS` | 403 | Bu büroya erişiminiz Görüntüleme'dir. büro sahibine yönetici için sor. | | `FEATURE_NOT_AVAILABLE` | 403 | Plan bu eylemi içermez (cevap `feature` olarak adlandırılır). | | `SUBSCRIPTION_REQUIRED` | 403 | Kabin sahibi aktif aboneliğe sahip değildir. | | `ACCOUNT_INACTIVE` | 403 | Kabin deaktivasyon yapıldı. | ### şeyler bulmak | Kodu | HTTP | Ne yapmalı | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | Anahtar birkaç kabinete ulaşır (veya bu `ad_id` birden fazla içinde var) — geç `account_id` . | | `ACCOUNT_NOT_FOUND` | 404 | Bu `account_id` Bu anahtarla ulaşılamaz. kontrol `GET /v1/account/info`. | | `CAMPAIGN_NOT_FOUND` | 404 | Anahtarın kabinelerinde böyle bir kampanya yoktur (veya silinir). | | `TASK_NOT_FOUND` | 404 | Bu anahtarın sahibi için böyle bir görev yok. | | `NOT_FOUND` | 404 | Bu kampanya ve dönem için hiçbir istatistik yok. | | `UNKNOWN_AD_IDS` | 400 | Toplam çağrıda `ad_ids`'in bazıları bu kabinetin kampanyaları değildir; `missing` bunları listeler. | ### giriş | Kodu | HTTP | Ne yapmalı | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` alanı adlandırır; `error` yanlış olduğunu söyler. bilinmeyen alanlar da reddedilir. | | `UNSUPPORTED_MEDIA` | 400 | JPG, PNG, GIF, WEBP veya MP4'ü `file` alanında yükleyin. | | `FILE_TOO_LARGE` | 413 | Daha küçük bir dosya yükleme (10 MB en fazla). | ### Telegram ve kabine devlet | Kodu | HTTP | Ne yapmalı | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram değişikliği reddetti; `error` nedenini taşıyor. düşük bir teklifle `param: "cpm"`, `min_cpm` ve `currency` alabilirsiniz. | | `BUDGET_UNCHANGED` | 400 | Telegram hesabı finanse etmeyi kabul etti ama kampanyanın bütçesi hareket etmedi. Reklam hesabı hesapları (`GET /v1/account/info`). | | `INSUFFICIENT_AD_BALANCE` | 400 | Kampanyanın sahip olduğundan daha fazlasını geri çekmenizi istediniz. daha az geri çekme veya `withdraw_all` kullanın. | | `CABINET_AUTH_EXPIRED` | 409 | Kabin Telegram oturumu sona erdi. sahibi panelde yeniden bağlar; sonra geri çekilir. | | `CABINET_LOCKED` | 409 | Kabin otomatik olarak yönetilmektedir; manuel değişiklikler engellenir. | ### Sınırlar ve geri çekilme | Kodu | HTTP | Ne yapmalı | | --- | --- | --- | | `RATE_LIMITED` | 429 | `Retry-After` saniye bekleyin [Hız sınırları](/tr/docs/api/rate-limits/) bakın. | | `QUEUE_FULL` | 429 | Reklam hesabı zaten 5 işlemleri de geçiriyor. Bir görevin bitmesini bekleyin, sonra geri çekil (aynı şekilde) `Idempotency-Key` iyi bir şey ) | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | Bir `Idempotency-Key` başlık ekleyin. | | `IDEMPOTENCY_KEY_INVALID` | 400 | 8-255 karakter kullanın; UUID ideal. | | `IDEMPOTENCY_KEY_REUSED` | 422 | Bu anahtar farklı bir talep için kullanıldı - yeni bir çalışma, yeni bir anahtar. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | Bu anahtarla ilk talep hala çalışıyor. birkaç saniye içinde geri çekiliyor. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | Hiçbir şey yapılmadı. aynı anahtarla geri dönün. | | `INGEST_DISABLED` | 403 | Anahtar için **Postback Alın** 'e dönün ( [dönüşümler](/tr/docs/api/conversions/) ). | | `INTERNAL_ERROR` | 500 | tarafımdan biz. Devletin bir GET Bir yazı yazmadan önce; iletişim [@orbitoads](https://t.me/orbitoads) ile ile `request_id` Eğer devam ederse. | ## İsteği ne zaman yinelemeli - **4xx** - değişmemiş geri çekmeyin; isteği düzeltin. (A 4xx asla `Idempotency-Key`'nizi tüketmez, bu yüzden sabit isteği aynı anahtarla geri çekebilirsiniz.) - **429 / 503** - `Retry-After`'den sonra geri çekilme - **5x yazdıktan sonra** - değişim Telegram'ye ulaşabilir ya da ulaşamaz. **Aynı** `Idempotency-Key` ile geri dönmek aynı 5xx'i geri getirir ( tasarım göre - çift eylemden kaçınır). `GET` kampanyası ne olduğunu görmek için karar verir; eğer geri çekilirseniz, yeni bir anahtar kullanın. - **Network timeout bir yazı üzerinde** - **Aynı** `Idempotency-Key` ile geri çekilir. eğer ilk denemeden geçerse sonuç alırsınız; eğer olmasaydı, operasyon şimdi devam eder. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. Örnek · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | Kod | 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 | ## Uygulama notları ## Hata yanıtını okuma Hata success=false ve error içerir. İstemci code, destek için request_id kullanır. param geçersiz alanı, missing bilinmeyen kimlikleri, min_cpm ve currency reddedilen teklifi gösterebilir. ## Duruma göre yeniden deneme 400'de girişi, 401'de anahtarı, 403'te izinleri düzeltin. 404'te hesap ve reklam kimliklerini denetleyin. 409'u code ile ele alın. Kota ve geçici hatalarda Retry-After'a uyun. 422 sonrası gerçek yeni işlem için yeni kimlik gerekir. ## İşlemler ve alanlar error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## İstek örneği GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · API hatalarını yorumlama | Alan | Belgelenen değer | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/errors/) ## Error | Alan | Alan türü | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [İstek ve olay sınırları](/tr/docs/api/rate-limits/)[Tek işlemi yeniden deneme](/tr/docs/api/idempotency/)[Kuyruktaki işlemi izleme](/tr/docs/api/tasks/)[Kampanya sayfalarını gezme](/tr/docs/api/pagination/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Yapay zekâ asistanıyla API belgeleri**](/tr/docs/api/ai-assistants/)[Sonraki konu**İstek ve olay sınırları**](/tr/docs/api/rate-limits/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Tek işlemi yeniden deneme [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/idempotency/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Oluşturma, kopyalama, toplu veya bütçe işlemlerinde yeni Idempotency-Key atayın. Aynı işlemi yinelerken gövde ve anahtarı koruyun. Farklı işlemde aynı kimlik reddedilir. [Markdown](/tr/docs/api/idempotency.md) Sunucu isteği kabul ettikten sonra yanıt size ulaşmadan bağlantı kesilebilir. Korumasız bir tekrar bakiyeyi iki kez aktarabilir veya aynı kampanyayı iki kez oluşturabilir. `Idempotency-Key` yeniden denemeyi ilk işlemle ilişkilendirir. ## İdempotans anahtarı ne zaman gerekir | Son nokta | Başlık | | --- | --- | | `POST /v1/campaigns` | İhtiyaç | | `POST /v1/campaigns/{ad_id}/copy` | İhtiyaç | | `POST /v1/campaigns/bulk` | İhtiyaç | | `POST /v1/campaigns/{ad_id}/budget` | İhtiyaç | | Diğer yazılar ( `PATCH` , pause/resume, `DELETE` , medya) | seçmeli - kendi başlarına tekrarlamak için güvenlidir | Başlık olmadan bu geri `400 IDEMPOTENCY_KEY_REQUIRED` . ## İdempotans anahtarı nasıl gönderilir Yeni bir rastgele değeri oluşturun - bir UUID - **Her Operasyon için** , ve bu işlemi geri aldığınız her seferinde **Aynı** değerini gönderin. Örnek ``` 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 ``` Örnek ``` 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 ``` ## Tekrarlanan isteğin yanıtı | Durum | Cevapla | | --- | --- | | Bu anahtarla ilk başvuru | normal koşuyor. | | Aynı anahtar, aynı talep, ilk bitti | **depolama** cevap, değişmemiş, başlık `Idempotent-Replayed: true` ile. | | Aynı anahtar, aynı talep, ilk hala çalışıyor | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After` . kısa sürede geri dönün. | | Aynı anahtar, farklı vücut veya son nokta | `422 IDEMPOTENCY_KEY_REUSED` - Yeni bir operasyon için yeni bir anahtar gerektirir. | | İlk başvuru 4xx'te sona erdi (kötü giriş, plan, kuyruk dolu...) | Anahtar serbest bırakılır: isteği düzeltin ve **Aynı** anahtarı ile gönderin. | | İlk başvuru 5xx'te sona erdi | 5xx kaydedilir ve yeniden oynanır - değişiklik Telegram'e ulaşabilir ve anahtar iki kez çalışmasını durdurmak için mevcuttur. kampanyayı `GET` ile kontrol edin, daha sonra eylem yapmak istiyorsanız yeni bir anahtar kullanın. | “Aynı talep” aynı yöntem, yol ve JSON vücut anlamına gelir (anahtar sipariş önemli değil). ## Anahtarın işlenme kuralları - Anahtarlar API anahtarınıza kaydırılır - iki entegrasyon çarpışamaz. - Anahtarlar 24 saat boyunca saklanır. sonrasında aynı değeri yeni bir operasyon başlatır. - 8-255 karakter arasındaki herhangi bir satır çalışır; UUID doğru varsayılandır. - Anahtarı kaydedemezseniz, işlem çalışmaz ve `503 IDEMPOTENCY_UNAVAILABLE` alırsınız - aynı anahtarla geri çekilir. Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## Uygulama notları ## İşlem başına bir kimlik Oluşturma, kopyalama, toplu işlem ve bütçede Idempotency-Key gerekir. Her işlem için 8–255 karakterlik yeni rastgele değer kullanıp tekrarda koruyun. Anahtar 24 saat boyunca API anahtarı, yöntem, yol ve JSON'a bağlıdır. ## Eşzamanlı ve değiştirilmiş denemeler Tamamlanan yanıt Idempotent-Replayed: true ile yinelenir. Devam eden kopya 409 ve Retry-After, değişen istek 422 döndürür. 4xx doğrulama hatası anahtarı bırakır. Saklanan 5xx sonrası yeni işlemden önce kaydı okuyun. ## İşlemler ve alanlar Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## İstek örneği GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Tek işlemi yeniden deneme | Alan | Belgelenen değer | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/idempotency/) ## İlgili yazılar [API hatalarını yorumlama](/tr/docs/api/errors/)[İstek ve olay sınırları](/tr/docs/api/rate-limits/)[Kuyruktaki işlemi izleme](/tr/docs/api/tasks/)[Kampanya sayfalarını gezme](/tr/docs/api/pagination/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**İstek ve olay sınırları**](/tr/docs/api/rate-limits/)[Sonraki konu**Kuyruktaki işlemi izleme**](/tr/docs/api/tasks/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Mevcut kampanyaları değiştirme [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/manage-campaigns/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Metin, bağlantı, teklif, günlük sınır, zamanlama, bütçe ve yayını yönetin. Toplu istek 1.000 kampanyaya kadar destekler. Görevde kısmi hataları kontrol edin. [Markdown](/tr/docs/api/manage-campaigns.md) Tüm aramalar burada **Kampanyaları Yönetmek** ve Manager (veya sahibi) kabine erişimi ile bir anahtar gerektirir. Onlar bir kampanya üzerinde hareket, `(account_id, ad_id)` : geç `account_id` vücuda veya anahtar birkaç kabine ulaştığında sorgulama. Her değişiklik kampanyanın geçmişinde görünür panelde işaretlenmiş **🔌 API** . | İletişim | ne yapıyor | Cevaplar | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | metin, link, bid, cap, program değişikliği, on/off | Hızlıca | | `POST /v1/campaigns/{ad_id}/pause` | Sıkıştırma | Hızlıca | | `POST /v1/campaigns/{ad_id}/resume` | Swit on | Hızlıca | | `POST /v1/campaigns/{ad_id}/budget` | Bütçeyi eklemek veya geri çekmek | Hızlıca | | `DELETE /v1/campaigns/{ad_id}` | silin | Hızlıca | | `POST /v1/campaigns/{ad_id}/copy` | 1 - 100 kopya | 202 + [Görev](/tr/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | 1000 kampanyaya kadar bir eylem | 202 + Görev | Doğrudan cevaplar `data`'de güncellenmiş [Kampanya Object](/tr/docs/api/campaigns/#doc-note-the-campaign-object)'i iade eder. ## Düzenleme `PATCH /v1/campaigns/{ad_id}` - Sadece değişiklikleri gönderin. Örnek ``` 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." }' ``` | alanı | anlamı | | --- | --- | | `title`, `text`, `promote_url` | Yaratıcı ve bağlantı | | `cpm` | Yeni teklif, 0'dan daha büyük. | | `daily_budget` | Günlük kapı | | `views_per_user` | 1–4. | | `active` | `true` / `false` - tekrar / dinlenme gibi. | | `schedule` | Reklamı göstermek için günler ve saatler; `null` kaldırır — bakınız [Programı](/tr/docs/api/manage-campaigns/#doc-note-schedule) . | | `media`, `picture`, `button`, `website_name` | Tıpkı [Yaratmak](/tr/docs/api/create-campaigns/#doc-note-fields)'de olduğu gibi. | **Telegram’ın incelemesi ne olacak?** Değiştirmek `cpm` , `active` veya `schedule` değil - onlar tek seferde uygulanır ve kampanya devam ediyor. herhangi bir diğer alan ( `title` , `text` , `promote_url` , `media` , `picture` , `button` , `website_name` , `views_per_user` , `daily_budget` ) ile kaydedilir Telegram 's tam reklam formu, ve Telegram yeniden reklamı incelemek: onaylanana kadar `In Review` gösterir. teklif göndermek, on/off ve zamanlama değişiklikleri kendi, bu alanlarla birlikte değil. Hedef ( `channels`, `countries`, ...) mevcut bir reklamda değişemez - Telegram buna izin vermez. yeni hedef ile yeni bir kampanya oluşturun, ya da [kopyalan](/tr/docs/api/manage-campaigns/#doc-note-copy) ve ayarlayın. `meta` cevap için: | alanı | anlamı | | --- | --- | | `status_warning` | Alanlar kaydedildi, ancak Telegram açma / kapatma anahtarı uygulanmadı (örneğin, bütçe yok). | | `status_intent_only` | On/off seçeneğiniz kaydedilir ve Telegram'in yapabileceği zaman geçerlidir (yorumda, bütçe yok). | | `status_already_set` | Kampanya zaten istediğiniz devletteydi. | Bu hedef için Telegram’in altındaki bir teklif, `param: "cpm"`, `min_cpm` ve `currency` ile `400 PLATFORM_REJECTED`’yi geri getirir. ## Durdurma ve sürdürme Örnek ``` 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` Telegram’ın bu kampanyaya hala harekete geçemediği anlamına gelir – kampanya inceleniyor, reddediliyor ya da bütçeden çıkıyor – ve seçiminiz kaydedildi: mümkün olduğunca çabucak çalışıyor. Eğer durum değiştiğinde, gerçek [Webhook Durumu](/tr/docs/api/webhooks/) İtfaiye ## Reklam yayın takvimi Bir kampanyayı yalnızca seçilen haftalarda ve saatlerde gösterin - örneğin haftalarda 9:00-18:00, ya da sadece akşamları. bu saatlerin dışında Telegram reklamı göstermez. bir program ayarlamak, değiştirmek veya kaldırmak kampanyayı durdurmaz veya kapatmaz - `status` ve `active` olduğu gibi kalır. her kabin tipi üzerinde çalışır. Örnek ``` 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" } }' ``` | alanı | anlamı | | --- | --- | | `days` | `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun` - Her biri o gün yürüyen saatleri (0-23) tutar. `9` anlamı 09:00–09:59Böylece `[9, …, 17]` O kadar 9:00–18:00. Bir gün ayrılır ya da gönderilir `[]`Ama koşmuyor. En az 1 saat toplamda. | | `timezone` | `"viewer"` - izleyicinin kendi yerel saat; sadece seyirci hedeflemek için ( `target_type: "users"` ). Aksi takdirde bir UTC offset: `"+03:00"` , `"-05:00"` , `"+05:30"` . offset Telegram sunuyor: tam saat `-12:00` ile `+14:00` , artı `-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"` ve `"+3"` da kabul edilir. | `"schedule": null` programı kaldırır - reklam tekrar saatin etrafında çalışır. **Bütçe olmayan bir kampanya bir program yapamaz.** Telegram, yalnızca bir kampanyada yürütebilen bir programı kabul eder, bu nedenle `Stopped` Kampanya hiçbir şey bırakmadık `400 PLATFORM_REJECTED` ile `param: "schedule"` Ve hiçbir şey değişmiyor - öncelikle bütçe eklemek, sonra programı ayarlamak. Bir gün geçirmiş (`On Hold`Kampanya iyi gidiyor. Kampanya nesnesi aynı biçimde zamanlamayı geri getirir, her zaman tüm yedi gün ve `"+03:00"` olarak yazılmış bir indirim ile - böylece okuyabilirsiniz, bir gün değiştirebilirsiniz ve geri gönderebilirsiniz. `GET /v1/campaigns/{ad_id}` doğrudan Telegram'te değiştirildiğinde bile geçerli zamanlamayı verir - [Tebrik](/tr/docs/api/campaigns/#doc-heading-freshness)'e bakın. 0-23 dışındaki saatler, bilinmeyen bir gün, boş bir zamanlama, bir kanal/bot/search adında `"viewer"` veya bir indirim Telegram sunmuyor → `400 VALIDATION_ERROR` `param`'de doğru alanı (örneğin `schedule.days.mon`). [kopyaları](/tr/docs/api/manage-campaigns/#doc-note-copy) ve yeniden düzenlenmiş kampanyalar, gelen kampanyaların programını tutar. birden fazla kampanyaya tek seferde bir program koymak için, toplu eylem `set_schedule`'yi kullanın. ## Kampanya bütçesi `POST /v1/campaigns/{ad_id}/budget` para birim dengesi ile kampanya arasında hareket eder. `Idempotency-Key` gerektirir. Örnek ``` 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` | Etkisi | | --- | --- | --- | | `add` | İhtiyaç | Kabin Eşitliği Kampanyası. | | `withdraw` | İhtiyaç | Kampanya → kabine dengesi. kampanyadan daha fazlası → `400 INSUFFICIENT_AD_BALANCE` . | | `withdraw_all` | — | Kampanyaya kalan her şey kabine dengesidir. | `meta.moved` Gerçekten hareket eden şey; `meta.partial` O kadar `true` Daha az talep edilen durumlar geri çekilebilir. Para asla reklam hesabını bırakmaz API. ## Kampanyayı kopyalama `POST /v1/campaigns/{ad_id}/copy` aynı hedefi olan kopyaları oluşturur; gönderdiğiniz her şey orijinalini aşar. `Idempotency-Key` gerektirir. `ad_ids` kopyaları olan bir görevi geri getirir. Örnek ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | alanı | anlamı | | --- | --- | | `copies` | 1 - 100 default 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | `budget` : `0` veya en azından kabinetin `min_budget` kopyası için geçerlidir. | | `schedule` | Kopyalar orijinal [Programı](/tr/docs/api/manage-campaigns/#doc-note-schedule)'i tutar; değiştirmek için birini gönderir, ya da `null`'yi hiçbirine karşı tutar. | | `group_id` / `new_group_name` | Kopyaları bir grupta yerleştirin. | ## Silme Örnek ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` Görüntüleri olan kaldırılmış bir kampanya istatistikleri içinde kalır `status: "Deleted"`Hiçbir zaman koşmadığı kişi kaldırılır. Yine geri dönüşler silin `404 CAMPAIGN_NOT_FOUND`. ## Toplu işlemler `POST /v1/campaigns/bulk` tek bir eylem için 1000 kampanyaya kadar uygulanır. `Idempotency-Key` gerektirir. Örnek ``` 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` | Ekstra alan | Etkisi | | --- | --- | --- | | `pause` | — | Sıkıştırma | | `resume` | — | Swit on | | `add_budget` | `amount` | Her kampanyaya katılın | | `withdraw_budget` | `amount` | Her kampanyadan çekilme | | `withdraw_all_budget` | — | Her kampanyadan her şeyi çıkarın | | `set_cpm` | `cpm` | Her birinde aynı teklifi yapın | | `set_schedule` | `schedule` | [Programı](/tr/docs/api/manage-campaigns/#doc-note-schedule)'i her birine ayarlayın; `"schedule": null` onu kaldırır | | `delete` | — | Her birini silin | Her `ad_id` bu kabinetin canlı bir kampanyası olmalıdır; aksi takdirde hiçbir şey yok ve `missing`'te suçlularla `400 UNKNOWN_AD_IDS`'yi alıyorsunuz. Çoğaltmalar göz ardı ediliyor. Görev `errors` listesi kampanyaları Telegram reddediyor - `set_schedule` ile , aynı zamanda bütçesiz kampanyalar ve `"timezone": "viewer"`'nin bir seyirci hedeflemediği için başvuramayacağı kampanyalar. ## İşlem başına maliyeti yüksek kampanyaları durdurma Örnek ``` 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 başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## PATCH `/api/v1/campaigns/{ad_id}` Kampanyada yalnızca gönderilen ayarları günceller. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | | `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" } } ``` ### İstek gövdesi şeması 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" } ``` İstek sonuçları ve yanıt alanları | API | Anlamı | | --- | --- | | status_warning | Alanlar kaydedildi ancak örneğin bütçe yokluğu nedeniyle yayın durumu değişmedi. | | status_intent_only | İstenen durum kaydedildi. İnceleme veya bütçe elverdiğinde uygulanabilir. | | status_already_set | Kampanya zaten istenen durumdaydı. | [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` Bir kampanyanın gösterimlerini duraklatmayı ister. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | | `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` Gösterim mümkün olduğunda kampanyayı sürdürmeyi ister. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | | `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` Hesap bakiyesi ile bir kampanya arasında bütçe taşır. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Evet | | `X-API-Key` | header | `string` | Evet | 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 } } ``` ### İstek gövdesi şeması 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` Aynı hedeflemeyle en çok 100 kopyayı isteğe bağlı değişikliklerle sıraya alır. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | Evet | | `X-API-Key` | header | `string` | Evet | 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": [] } } ``` ### İstek gövdesi şeması 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` Aynı hesaptaki en çok 1.000 kampanya için tek işlemi sıraya alır. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | Evet | | `X-API-Key` | header | `string` | Evet | 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": [] } } ``` ### İstek gövdesi şeması 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}` Kampanyayı kaldırıp varsa geçmiş gösterim verilerini korur. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `ad_id` | path | `integer` | Evet | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | | `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 } } ``` ## Uygulama notları ## Değişebilir alanlar ve saatler cpm, active veya schedule değişikliği yeni kreatif incelemesi başlatmaz. Kreatif değişikliği başlatabilir. Mevcut hedefleme sabittir. Gün, 0–23 saat ve UTC farkı kullanın. viewer yalnızca users içindir, null programı kaldırır. ## Hesap içi bütçe aktarımı add kampanyaya fon aktarır. withdraw tutarı, withdraw_all kalan bütçeyi hesaba döndürür. meta.moved ve meta.partial kontrol edilir. Dış yükleme, fatura ve iade ödeme akışındadır. ## Kabul ve tamamlanma Oluşturma, kopyalama ve toplu istekler HTTP 202 ve iş kimliği döndürür. Retry-After'a uyarak GET /api/v1/tasks/{id} sorgulayın. completed durumunda da failed ve errors alanlarını kontrol edin. ## İşlemler ve alanlar 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 ## İstek örneği GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Mevcut kampanyaları değiştirme | Alan | Belgelenen değer | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | Alan | Alan türü | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | Alan | Alan türü | | --- | --- | | days | object | | timezone | string | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Erişilebilir reklam hesapları](/tr/docs/api/accounts/)[Kampanya sorgulama](/tr/docs/api/campaigns/)[Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/)[Kampanya ve hesap istatistikleri](/tr/docs/api/stats/)[Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Kampanya oluşturma ve medya**](/tr/docs/api/create-campaigns/)[Sonraki konu**Kampanya ve hesap istatistikleri**](/tr/docs/api/stats/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Kampanya sayfalarını gezme [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/pagination/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Boş cursor ile başlayın. Filtreleri sabit tutarak meta.next_cursor null olana kadar izleyin. Sayfa başına üst sınır 500 kampanyadır. [Markdown](/tr/docs/api/pagination.md) Sayfalama kullanan tek liste `GET /v1/campaigns` listesidir. İki yöntem desteklenir. ## İmleçle sayfalama İlk istekte `cursor=` değerini boş bırakın. `meta.next_cursor` değeri `null` olana kadar dönen imleçle devam edin. Örnek ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` Örnek ``` 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 ``` - Kurşunları karmaşık olarak ele alın. yalnızca aynı filtrelerle geçerlidir. - Sipariş sabittir (kabinet, sonra en yeni `ad_id` ilk), böylece sayfalar kampanyalar eklenirken istikrarlı kalır. - Yukarıdaki sınır yok - bu yüzden 100.000 kampanyası olan bir kabineyi nasıl okursunuz. - `bot_username`, `promote_domain` ve `type` filtreleri her zaman kursör modunu kullanır. - Cursor modu birkaç ağır alanı bırakır (targılı özet, medya, son eylem). Bir kampanyanın tam kaydı için [`GET /v1/campaigns/{ad_id}`](/tr/docs/api/campaigns/#doc-note-get-one-campaign) kullanın. ## Küçük hesaplar için ofsetle sayfalama `cursor` olmadan, son nokta sayfaları `limit` ve `offset` ile sınıflandırılabilir ( `sortBy`, `sortOrder` ). **Reklam hesabı başına 500 kampanya** 'da okur : geçmişte `meta.truncated` `true` ve `meta.next_step` kursör moduna geçmenizi söyler. Örnek ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## Sayfa boyutu `limit` sayfa başına 1–500 sonuç alır. Varsayılan değer 100’dür. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. Örnek · 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' ``` Örnek · 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' ``` ## Uygulama notları ## Büyük listeyi okuma GET /api/v1/campaigns çağrısını cursor= ve filtrelerle başlatın. Sonraki sayfada aynı filtreleri ve değişmemiş meta.next_cursor değerini kullanın. null gelince durun. limit 1–500, varsayılan 100'dür. ## Sıralama ve ofset sınırı İmleç hesap ve azalan ad_id ile sıralar. bot_username, promote_domain ve type bu modu seçer. Ofset sortBy ve sortOrder destekler, hesap başına 500 kampanya okur. meta.truncated imleç gerektiğini gösterir. ## İşlemler ve alanlar GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## İstek örneği GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Kampanya sayfalarını gezme | Alan | Belgelenen değer | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [API hatalarını yorumlama](/tr/docs/api/errors/)[İstek ve olay sınırları](/tr/docs/api/rate-limits/)[Tek işlemi yeniden deneme](/tr/docs/api/idempotency/)[Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Kuyruktaki işlemi izleme**](/tr/docs/api/tasks/)[Sonraki konu**Erişilebilir reklam hesapları**](/tr/docs/api/accounts/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # İstek ve olay sınırları [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/rate-limits/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Anahtar için ayrı kotalar vardır. Yayımlanan sınırlar dakikada 60 okuma ve 30 yazma, saniyede 20 dönüşüm olayıdır. Hesap kuyruğu da sınırlıdır. [Markdown](/tr/docs/api/rate-limits.md) Her anahtar için okuma, yazma ve dönüşüm kotaları ayrıdır. İstatistikleri sık sorgulamak kampanyayı duraklatmayı engellemez. Takip aracından bir anda çok sayıda dönüşüm gelmesi de diğer kotaları tüketmez. | Bütçe | Uygulanır | Sınırı | | --- | --- | --- | | **Okumaya devam et** | Her `GET` | dakikada 60 başvuru | | **yazın** | `POST` , `PATCH` , `DELETE` dönüşümler hariç | dakikada 30 başvuru | | **dönüşümler içinde** | `POST /v1/postback`, `GET /v1/ingest/{token}` | Saniyede 20 olay, 1000'e kadar patlama | Kotalar sürekli yenilenir. Kısa bir yoğunlukta bir dakikalık kullanım hakkının tümü kullanılabilir. Kampanya, istatistik ve toplamları eşitlemek genellikle 3–4 okuma isteğidir. Belirli bir entegrasyon için daha fazlasına ihtiyacınız var mı? sor [@orbitoads](https://t.me/orbitoads) — sınırlar anahtar başına yükseltilebilir. ## HTTP başlıkları Her yanıtın başlıklarında geçerli sınır ve kalan kota belirtilir. Örnek ``` 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 ``` ## İstek sayısını azaltma - **Toptan yerine çamur.** 300 kampanyayı bir kez daha `POST /v1/campaigns/bulk`300 tane duraklama çağrısı yok. Görmek [Kampanyaları Yönetmek](/tr/docs/api/manage-campaigns/#doc-note-bulk). - **Battles içinde yapılır.** `POST /v1/campaigns` 100 kampanyaya kadar gidiyor. - **Webhooks yerine soru sorma.** Durum değişiklikleri gerçekleştikleri anda gelir; saatlik istatistikleri kendileri tarafından gelir. Görmek [Webhoks](/tr/docs/api/webhooks/). - **batch dönüşümleri** `POST /v1/postback` başvuru başına 1000'e kadar etkinlik kabul eder (her etkinlik hala etkinlik bütçesine karşı sayılır - paketleme yuvarlak seyahatleri tasarruf eder, kvota değil). ## Diğer sınırlar | ne ne | Sınırı | | --- | --- | | Kabine başına yapılan veya yürütülen operasyonlar | 5 oluşturur + 5 diğer işlemler (kopy, toptan). 6. geri `429 QUEUE_FULL` . | | Yaratıcı talep üzerine kampanyalar | 100 | | Kopya isteği ile kopya | 100 | | Toplam talep üzerine kampanyalar | 1,000 | | Yüklenmiş dosya | 10 MB | | Sayfa boyutu için `GET /v1/campaigns` | 500 | ## Yeniden denemeden önce bekleme 429 sonrasında `Retry-After` kadar saniye bekleyin. Otomasyonda çalışanların aynı anda yeniden denemesini önlemek için küçük bir rastgele gecikme ekleyin. Örnek ``` 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); } ``` Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## Uygulama notları ## Anahtar başına bağımsız kotalar Anahtar başına dakikada 60 okuma ve 30 yazma vardır. Dönüşüm alımı saniyede 20 olay ve 1.000'e kadar ani yük destekler. Toplu istekte her olay sayılır. X-RateLimit-Limit, X-RateLimit-Remaining ve X-RateLimit-Reset başlıklarını okuyun. ## Kuyruk ve geri çekilme Hesap başına beş oluşturma ve beş başka iş sırada veya çalışıyor olabilir. Her türden bir iş aynı anda yürür. 429 sonrası Retry-After saniye bekleyin. ## İşlemler ve alanlar 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## İstek örneği GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Rapor boyutları API bir oluşturma isteğinde 100 kampanya, bir kopya isteğinde 100 kopya ve toplu işlemde 1.000 mevcut kampanya kabul eder. 202 yanıtı kuyruktaki görevi tanımlar. Sonraki grubu değiştirmeden önce tamamlanan görevin failed ve errors alanlarını inceleyin. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · İstek ve olay sınırları | Alan | Belgelenen değer | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/rate-limits/) ## İlgili yazılar [API hatalarını yorumlama](/tr/docs/api/errors/)[Tek işlemi yeniden deneme](/tr/docs/api/idempotency/)[Kuyruktaki işlemi izleme](/tr/docs/api/tasks/)[Kampanya sayfalarını gezme](/tr/docs/api/pagination/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**API hatalarını yorumlama**](/tr/docs/api/errors/)[Sonraki konu**Tek işlemi yeniden deneme**](/tr/docs/api/idempotency/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Kampanya ve hesap istatistikleri [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/stats/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Kampanya satırları, hesap toplamları veya para birimine göre sıralamaları seçin. Kayan aralık veya özel tarih ve saat kullanın. Dışa aktarılan verilere süreyi ekleyin. [Markdown](/tr/docs/api/stats.md) İstatistikler için ayrıntı düzeyi farklı üç yöntem vardır. Her biri anahtarın erişebildiği tüm hesapların verilerini hesap bazında döndürür. | Son nokta | Geri dönüş | | --- | --- | | `GET /v1/stats` | Her kampanyanın sayısı dönem için | | `GET /v1/stats/total` | Her kabinetin toplamları artı grafik noktaları | | `GET /v1/stats/analytics` | Toplamlar para birimi, grafik, üst kampanyalar tarafından bölünmüştür | Tek bir kampanyanın dönem verileri için `GET /v1/campaigns/{ad_id}/history` kullanın. [`GET /v1/campaigns/{ad_id}/history`](/tr/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## Rapor dönemleri | `period` | pencereler | | --- | --- | | `1d` | Son 24 saat ( `/stats` ve `/stats/total` için varsayılan olarak) | | `7d` | Son 7 gün | | `30d` | son 30 gün (default için `/stats/analytics` ) | | `all` | Her Zaman | | `custom` | `startDate` ve `endDate` ( `YYYY-MM-DD` ), seçmeli olarak `startHour` ve `endHour` (0-23) | Herhangi `h` veya `d` Ayrıca çalışıyor (`6h`, `14d`365 gün için ( Tanımlanmamış bir değer son 24 saat olarak okunur - bir hata iade etmez, bu yüzden kaydırma kontrol edin. Her zaman olduğu gibi UTC. Örnek ``` # 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 Hükümet tarafından yapılan kampanyaya göre: `data[account_id][ad_id]` . Örnek ``` { "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" } } ``` Anahtarlar çizgilerdir; değerler burada **sayılar** 'dir (kampanya nesnesinden farklı olarak). `cpa` eylem başına harcanır; `ctr` bir yüzde. ## GET /v1/stats/total Tablo son noktası: toplamlar ve her kabin için bir grafik. Örnek ``` { "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` puan saatlik veya günlük olarak döneme bağlıdır. `cabinetType` para birimini verir ( `euro` → EUR , `ton` → TON , `stars` → Yıldız). ## GET /v1/stats/analytics `/stats/total` gibi, artı para birimi ve üst kampanyalar tarafından bölünmüş harcama. Örnek ``` { "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" } } ``` ## Notlar - Devletler Telegram'in kendi hesaplarını takip eder, düzenli olarak Orbito Ads'ye senkronize edilir; en yeni saat senkronizasyonlar geldiğinde doldurulur. - Hiçbir zaman farklı para birimleri olan ofislerde `spent`'i eklemeyin. - Kendinizi takip ettiğiniz dönüşümler için (yönlendirmeler, para yatırma, satışlar) [dönüşümler](/tr/docs/api/conversions/) - Telegram 's `actions` katılır ve bot başlar, dönüşümleriniz değil. - Soruşturma istatistikleri üzerinden [Webhook saatlik](/tr/docs/api/webhooks/#doc-heading-hourly_digest)'i birkaç dakikada bir tercih edin. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## GET `/api/v1/stats` Dönem ölçümlerini hesap ve kampanya kimliğine göre getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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` Dönem için hesap toplamlarını ve grafik verilerini getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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` Para birimi ayrımını, grafikleri ve kampanya sıralamasını getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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" } } ``` ## Uygulama notları ## Bakiye ve para birimleri Her hesapta currency, balance_updated_at ve min_budget değerlerini okuyun. Kampanyada para ve oranlar ondalık metin veya null, rapor özetlerinde sayıdır. EUR, TON ve Stars toplamlarını ayırın. ## Dönem ve UTC saatleri period 1d, 7d, 30d, all, custom veya 365 güne kadar Nh/Nd alır. custom için startDate ve endDate, isteğe bağlı 0–23 UTC startHour/endHour verin. Stats ve total varsayılan 1d, analytics 30d'dir. ## Eylemleri yorumlama actions kanala katılım veya bot başlatma gibi olaylardır. Takipçi kaynaklı potansiyel müşteri, satış ve gelir için conversions kullanın. /stats/analytics hesap başına grafik, toplam ve topCampaigns içerir. ## İşlemler ve alanlar 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 ## İstek örneği GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Kampanya ve hesap istatistikleri | Alan | Belgelenen değer | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/stats/) ## StatsNumbers | Alan | Alan türü | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Erişilebilir reklam hesapları](/tr/docs/api/accounts/)[Kampanya sorgulama](/tr/docs/api/campaigns/)[Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/)[Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/)[Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Kaynağın güncellenme tarihi 2026-10-26 [Önceki konu**Mevcut kampanyaları değiştirme**](/tr/docs/api/manage-campaigns/)[Sonraki konu**Hedefleme sözlükleri ve gruplar**](/tr/docs/api/targeting/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Hedefleme sözlükleri ve gruplar [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/targeting/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Kampanya isteğinden önce ülke, dil ve konu kodlarını alın. Kaydedilmiş klasörler için grupları sorgulayın. Sözlükleri önbelleğe alıp seçenekler değişince güncelleyin. [Markdown](/tr/docs/api/targeting.md) ## GET /v1/targeting [`POST /v1/campaigns`](/tr/docs/api/create-campaigns/) kodları kabul eder. listeler Orbito Ads oluşturma formu kullananlardır, bu nedenle buradan gelen bir kod asla bilinmeyen olarak reddedilmez. Örnek ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "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" ] } } ``` | Listesi | Kullanılan içinde | Notlar | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 iki harfli kodlar, artı Telegram 's kendi `FT` (anonim numaralar). | | `languages[].code` | `languages` | Telegram’in dil anahtarları — e.g . `pt-br` ve `pt-pt` , değil `pt` . | | `topics[].id` | `topics`, `exclude_topics` | Sayılar; idler aralıksız değildir. | | `buttons` | `button` | Yalnızca `features.ad_button`'in `true`'si olan kabinlerde. | Bu listeler seyrek değişir. Bir kez alıp bir gün önbellekte saklayın. ## Hedefleme grupları Yeni kampanyaları veya kopyaları `group_id` (var) veya `new_group_name` (ayrı adı varsa oluşturulmuş veya yeniden kullanılmış) ile birine koyun. ### GET /v1 / gruplar Örnek ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` Örnek ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` `account_id` olmadan, anahtar ulaşan her kabinetin gruplarını alırsınız. bir grup bir kabinete aittir - `group_id` başka bir kabineden reddedilir. ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## GET `/api/v1/targeting` Desteklenen ülke, dil, konu ve düğme değerlerini getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | Evet | 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` Kampanya gruplarını, istenirse tek hesap için listeler. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | Evet | 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" } ] } ``` ## Uygulama notları ## Form için geçerli değerler Dönen ülke ve dil kodlarını, sayısal konu kimliklerini ve düğme değerlerini kullanın. pt-br ve pt-pt gibi bölgesel dil kodları vardır. button için hesap desteği gerekir. ## Grup sahipliği Her grup tek hesaba aittir. Oluştururken veya kopyalarken o hesaptaki group_id ya da new_group_name verin. Aynı adlı grup yeniden kullanılabilir. ## İşlemler ve alanlar GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## İstek örneği GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Kitle testi ayarları Oluşturma şeması dört hedefleme modu tanımlar. Kanallar channels, bot adları bots, arama ifadeleri search_keywords alanına girer. Ülke, dil ve konu filtreleri kullanıcı kitlesini tarif eder. Testten önce hesabın özelliklerini okuyun. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Hedefleme sözlükleri ve gruplar | Alan | Belgelenen değer | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/targeting/) ## Targeting | Alan | Alan türü | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Group | Alan | Alan türü | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [Erişilebilir reklam hesapları](/tr/docs/api/accounts/)[Kampanya sorgulama](/tr/docs/api/campaigns/)[Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/)[Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/)[Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Kampanya ve hesap istatistikleri**](/tr/docs/api/stats/)[Sonraki konu**Kampanya olaylarını alma**](/tr/docs/api/webhooks/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Kuyruktaki işlemi izleme [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/tasks/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Oluşturma, kopyalama ve toplu değişikliklerde 202 ve görev kimliği gelebilir. İlerlemeyi, toplamları ve tekil hataları görevden okuyun. Etkilenen kampanyaların kimliklerini saklayın. [Markdown](/tr/docs/api/tasks.md) Bazı işlemler kampanyada bir kez Telegram'a konuşur, bu yüzden birden fazla sürebilir. HTTP İstek beklemelidir. Bu geri dönüş `202 Accepted` A ile **Görev** Son sonuç yerine: - `POST /v1/campaigns` - Yaratılış - `POST /v1/campaigns/{ad_id}/copy` - kopya - `POST /v1/campaigns/bulk` — duraklama, yeniden başlatma, bütçe, CPM veya çok sayıda silme Tek kampanya değişiklikleri ( `PATCH` , duraklama, yeniden başlatma, bütçe, silme) doğrudan cevap — hiçbir görev. ## HTTP 202 yanıtı Örnek ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` Örnek ``` { "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} Örnek ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` `status` sonuna kadar gönderin; bir görev `pending` veya `running` ise cevap `Retry-After: 2`'ü taşıyor - anketler arasında uzun süre bekleyin. | alanı | anlamı | | --- | --- | | `type` | `create` , `copy` , `status` (kırışıklık / resim), `budget` , `cpm` , `delete` | | `status` | aşağı bakın | | `progress` / `total` | Şimdiye kadar işlenmiş kampanyalar / toplam | | `succeeded` / `failed` | Bir zamanlar bilinen, bilinen | | `ad_ids` | oluşturulan görev kampanyaları (yapmak, kopyalamak) veya değiştirmek (bulk) | | `errors[]` | 50'ye kadar başarısızlık: `{ ad_id, index, error }` - `index` yaratıcılar için `campaigns` aralığınızda yer alır | | `paused_reason` | Neden bir görev beklemeyi durdurdu, e.g . büro dengeden çıktı | | `error` | Neden tüm görev başarısız oldu | ### statüs | statüs | anlamı | Sonuç mı ? | | --- | --- | --- | | `pending` | Queued - kabine, bir yaratıcı ve bir başka operasyonu aynı anda yürütür. | Hiçbir | | `running` | ilerlemede | Hiçbir | | `paused` | beklemek için durdu - genellikle kabin dengesi orta yolda dışarı çıktı. üst kabin; panelden yeniden alın | Hiçbir | | `completed` | `failed` ve `errors`'yi kontrol edin - tamamlanmış bir görev bireysel başarısızlıkları içerebilir | Evet | | `failed` | tüm görev başarısız oldu — bak `error` | Evet | | `cancelled` | Panelden iptal edildi | Evet | ## Kampanya oluşturma nasıl tamamlanır - Yeni kampanya kimlikleri, görev tamamlandığında `ad_ids`'de görünür (son kampanya oluşturulduktan sonra kabineti senkronize ederek bulunurlar). - Bir paket **İlk önce** kampanyası başarısız olursa, görev aynı hatayı 100 kez tekrarlamak yerine orada durur. - Eğer Telegram bir kampanyanın kanallarını veya botlarını çözemezse, kampanya `No targets found: …` bunları listelerek başarısız olur. - Telegram her yeni reklamı inceliyor. Bir kampanya genellikle başlar. `In Review`• A [Webhok](/tr/docs/api/webhooks/) Ne zaman değiştiğini anlatır. ## Durum sorgulama örneği Örnek ``` 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)); } } ``` Örnek ``` 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 başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. ## GET `/api/v1/tasks/{id}` İş ilerlemesini, sonuç kimliklerini ve öğe hatalarını getirir. | Parametre | Konum | Biçim | Zorunlu | | --- | --- | --- | --- | | `id` | path | `integer` | Evet | | `X-API-Key` | header | `string` | Evet | 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" } } ``` ## Uygulama notları ## Kabul ve tamamlanma Oluşturma, kopyalama ve toplu istekler HTTP 202 ve iş kimliği döndürür. Retry-After'a uyarak GET /api/v1/tasks/{id} sorgulayın. completed durumunda da failed ve errors alanlarını kontrol edin. ## İş sonuçları pending, running ve paused geçicidir. completed, failed ve cancelled son durumdur. progress, total, ad_ids ve 50'ye kadar öğe hatasını inceleyin. paused_reason panelden giderilecek yetersiz bakiyeyi gösterebilir. ## İşlemler ve alanlar 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 ## İstek örneği GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Rapor boyutları API bir oluşturma isteğinde 100 kampanya, bir kopya isteğinde 100 kopya ve toplu işlemde 1.000 mevcut kampanya kabul eder. 202 yanıtı kuyruktaki görevi tanımlar. Sonraki grubu değiştirmeden önce tamamlanan görevin failed ve errors alanlarını inceleyin. ## Protokol başvurusu | Yöntem | Yol | Parametreler | İstek içeriği | Yanıt kodları | | --- | --- | --- | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## Şema alanları ve sınırları · Kuyruktaki işlemi izleme | Alan | Belgelenen değer | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/tasks/) ## Task | Alan | Alan türü | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/openapi.yaml) ## İlgili yazılar [API hatalarını yorumlama](/tr/docs/api/errors/)[İstek ve olay sınırları](/tr/docs/api/rate-limits/)[Tek işlemi yeniden deneme](/tr/docs/api/idempotency/)[Kampanya sayfalarını gezme](/tr/docs/api/pagination/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Tek işlemi yeniden deneme**](/tr/docs/api/idempotency/)[Sonraki konu**Kampanya sayfalarını gezme**](/tr/docs/api/pagination/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # Kampanya olaylarını alma [Orbito Ads · Türkçe · HTML](https://orbitoads.pro/tr/docs/api/webhooks/) Kaynak kontrol tarihi · 2026-11-27 ### Belgelere göz at [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Tüm belgeler](/tr/docs/) Başlangıç - [API başlangıç rehberi](/tr/docs/api/) - [Anahtarlar ve hesap yetkileri](/tr/docs/api/authentication/) - [Yapay zekâ asistanıyla API belgeleri](/tr/docs/api/ai-assistants/) Temel kavramlar - [API hatalarını yorumlama](/tr/docs/api/errors/) - [İstek ve olay sınırları](/tr/docs/api/rate-limits/) - [Tek işlemi yeniden deneme](/tr/docs/api/idempotency/) - [Kuyruktaki işlemi izleme](/tr/docs/api/tasks/) - [Kampanya sayfalarını gezme](/tr/docs/api/pagination/) API başvurusu - [Erişilebilir reklam hesapları](/tr/docs/api/accounts/) - [Kampanya sorgulama](/tr/docs/api/campaigns/) - [Kampanya oluşturma ve medya](/tr/docs/api/create-campaigns/) - [Mevcut kampanyaları değiştirme](/tr/docs/api/manage-campaigns/) - [Kampanya ve hesap istatistikleri](/tr/docs/api/stats/) - [Hedefleme sözlükleri ve gruplar](/tr/docs/api/targeting/) Entegrasyonlar - [Kampanya olaylarını alma](/tr/docs/api/webhooks/) - [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/) - [API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Dosyalar ve şemalar - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/tr/docs/llms.txt) - [llms-full.txt](/tr/docs/llms-full.txt) [Orbito Ads](/tr/) [Dokümantasyon](/tr/docs/) [API](/tr/docs/api/) Belgelerde status_change, hourly_digest ve test ping'i vardır. HTTPS üzerinden alın, ham gövdeyle imzayı doğrulayın ve yinelenen teslimleri ayıklayın. [Markdown](/tr/docs/api/webhooks.md) API’yi düzenli sorgulamak yerine API ve Webhook’lar bölümündeki anahtar kartına bir Postback URL girin. Orbito Ads bu anahtarın eriştiği hesapların olaylarını POST ile gönderir. Her teslimat webhook imza sırrıyla imzalanır. ## Olaylar | etkinlik | Ne zaman | | --- | --- | | `status_change` | Bir kampanyanın durumu değişti (Yorum → Aktif, Aktif → Durdurulmuş...) Gönderilen her kabin senkronizasyonundan sonra ve hemen kampanyalar panelde veya API aracılığıyla değiştirildiğinde. | | `hourly_digest` | 5 dakikada her saat geçti, sadece kapanmış saat sayısı ile - bir POST kabin başına. görüntüleri olmayan saatler, tıklamalar veya harcamalar kaçırılır. | | `ping` | Anahtarı **Testler** tuşuna basın. | ### status_change Örnek ``` { "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 Örnek ``` { "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" } ] } ``` En çok harcama yapan en fazla 200 kampanya `campaigns` alanında yer alır. Daha fazla kampanya değiştiyse `truncated` dışarıda kalan sayıyı verir. `totals` tüm kampanyaları kapsar. Tutarlar hesabın para birimindedir. ## HTTP başlıkları Örnek ``` 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= ``` ## İmzayı doğrulama `X-Orbito-Timestamp`, bir nokta ve istek gövdesinin özgün baytlarını birleştirin. Anahtarı oluştururken veya gizli değeri yenilerken gösterilen webhook sırrını kullanarak HMAC-SHA256 hesaplayın. JSON’u ayrıştırmadan önce imzayı doğrulayın. Yeniden serileştirme baytları değiştirir. Beş dakikadan eski istekleri reddedin. ### Node.js (Express için) Örnek ``` 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 ( şişe ) Örnek ``` 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 ``` ## Olay teslimi - Son nokta kamuya açık olmalıdır **HTTPS** . `http://` , yerel konuk ve özel adresler reddedilir. - **10 saniyede** içinde herhangi bir `2xx` ile cevap verin. cevap verdikten sonra yavaş çalışın. - Bir ağ hatası veya bir `5xx` geri çekiliyoruz **Bir kez** , 750 Daha sonra, aynı `X-Orbito-Delivery`. A `4xx` Emekli değilim. - Yönlendirmeler takip edilmez. - Panelin anahtar kartı, son teslimatın zamanını, durumunu ve hatasını gösterir. ## Webhook kapsamındaki hesaplar Anahtar yalnızca erişim kapsamındaki hesapların olaylarını alır. Ajans üyesinin anahtarına paylaşılan hesapların olayları gelir. Erişim kaldırıldığı anda teslim durur. [Anahtarlar ve erişim](/tr/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## Test gönderimi Anahtar kartında Test’e basın. Gerçek olaylarla aynı yöntemle imzalanmış bir `ping` olayı alırsınız. Örnek ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## API başvurusu Tam reklam sözleşmesi bu çalışma alanına ayrılmış bir sağlayıcı anahtarı gerektirir. İstemci çağrılarında Orbito API anahtarınızı kullanın. Hesap siparişi, tahsis ve dış faturalama ayrı süreçlerdir. Örnek · 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" } ] } ``` ## Uygulama notları ## Olaylar ve geri çağrı ayarları Sağlayıcı anahtarında açık HTTPS geri çağrısı tanımlayın. status_change durum geçişini, hourly_digest etkin hesap saatini 05. dakikada bildirir. ping teslimatı dener. Yapılandırma 22 HTTP işleminden ayrıdır. ## İmza ve yeniden teslimat Webhook sırrıyla zaman damgası, nokta ve ham gövde baytları üzerinde HMAC-SHA256 doğrulayın. Beş dakikadan eski damgayı reddedin. On saniye içinde 2xx verin. Ağ hatası veya 5xx aynı kimlikle 750 ms sonra bir kez denenir. ## İşlemler ve alanlar 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} ## Şema alanları ve sınırları Tablo açık v1 sözleşmesine dayanır. Parametre ve alan adları büyük-küçük harfe duyarlıdır. HTTP kodları başarıyı, girdi doğrulamasını ve erişim kontrollerini ayırır. Bağlı belirtim tam istek ve yanıt yapılarını verir. ## Zaman aralığı · hourly_digest hourly_digest webhook'u biten saati kapsar ve trafiği olan her hesap için sonraki saatin beşinci dakikasında gönderilir. Dönem zamanlarıyla hesap ve teslim kimliklerini saklayın. Olay saati ile sunucunun alım saatini ayrı tutun. ## Şema alanları ve sınırları · Kampanya olaylarını alma | Alan | Belgelenen değer | | --- | --- | | 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 | Kaynak · [Veri kaynağı](https://adsly.pro/docs/api/webhooks/) ## İlgili yazılar [Onaylı dönüşümleri gönderme](/tr/docs/api/conversions/)[API sürüm ve değişiklikleri](/tr/docs/api/changelog/) Kaynağın güncellenme tarihi 2026-10-08 [Önceki konu**Hedefleme sözlükleri ve gruplar**](/tr/docs/api/targeting/)[Sonraki konu**Onaylı dönüşümleri gönderme**](/tr/docs/api/conversions/) ## Kaynaklar ve veriler - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 开发者参考 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) 文档 文档涵盖账户权限、活动管理、统计和事件投递。首先用只读密钥列出有权访问的账户。 [查看文档索引](/zh/docs/llms.txt) [API 密钥](/api-keys?lang=en) 本节说明如何从自己的程序调用 Orbito Ads。API 支持读取统计、新建广告活动、修改出价和文案、暂停或恢复投放以及调拨预算。所有广告账户均使用相同的方法和 API 密钥。 ## API - [**快速启动** 关键,第一请求和您的第一次活动通过 API 约五分钟。](/zh/docs/api/) - [**关键与访问** 阅读和广告活动管理关键,广告会计一个关键的到达,机构团队。](/zh/docs/api/authentication/) - [**创建活动** 频道、机器人、搜索和观众目标,每次呼叫一百个活动。](/zh/docs/api/create-campaigns/) - [**管理活动** 编辑、休息和重新编辑、移动预算、复制、删除 - 一场活动或一千次。](/zh/docs/api/manage-campaigns/) - [**网页** 签名状态变化实时和一个小时统计消化。](/zh/docs/api/webhooks/) - [**与 AI 助理相结合** 把这些文件交给克劳德·科德或其他编码代理,让它写入整合。](/zh/docs/api/ai-assistants/) ## 基础 URL 与身份验证 示例 ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` 在面板中创建密钥:[API 和 Webhooks](/api-keys?lang=en)(Pro和Agency计划). Questions — [@orbitoads](https://t.me/orbitoads). ## 机器可读格式 - [OpenAPI 3.1 SPEC](/docs/api/openapi.yaml) — 每个端点,参数和出错代码. - [llms.txt](/docs/llms.txt) —索引为AI代理已读; [llms-full.txt](/docs/llms-full.txt) — 所有页都是在一个文件中. - 每页都有一个Markdown双:在它的路径上加上`.md`,e.g. [/docs/api.md](/docs/api.md) . 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## 实施说明 ## 连接工作区 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ### 开发指南与账户访问 **API 快速入门** API 快速入门 — 在服务端使用密钥获取账户列表,选择账户并查询广告活动。首次写入时使用新的幂等键创建暂停的草稿,再查询返回的任务编号。 [**API 快速入门**](/zh/docs/api/) **密钥与账户权限** 密钥与账户权限 — 从服务端通过 X-API-Key 请求头传递密钥。可授权单个、多个或全部可用账户。写入还需密钥具有管理权限,且持有人为账户管理者或所有者。 [**密钥与账户权限**](/zh/docs/api/authentication/) **创建广告活动与上传媒体** 创建广告活动与上传媒体 — 每个请求可在一个账户内创建最多 100 项活动。选择频道、机器人、搜索或受众定向,提供唯一操作键并跟踪返回的任务。需要媒体时先上传。 [**创建广告活动与上传媒体**](/zh/docs/api/create-campaigns/) **修改现有广告活动** 修改现有广告活动 — 可管理文案、链接、出价、每日限额、排期、预算和投放状态。单个批量请求支持最多 1,000 项活动,请查询任务中的局部失败记录。 [**修改现有广告活动**](/zh/docs/api/manage-campaigns/) **接收广告活动事件** 接收广告活动事件 — 文档区分 status_change、hourly_digest 和测试 ping。通过 HTTPS 接收回调,用原始请求体校验签名,并在处理前对重复投递去重。 [**接收广告活动事件**](/zh/docs/api/webhooks/) **将 API 文档交给 AI 助手** 将 API 文档交给 AI 助手 — 从 OpenAPI 查看字段,用 Markdown 文档了解行为。真实密钥保存在服务端环境。开放写入前先验证只读操作。 [**将 API 文档交给 AI 助手**](/zh/docs/api/ai-assistants/) [管理 API 密钥和 Webhook](/api-keys?lang=en) ## 首次请求 携带 X-API-Key 调用 GET /api/v1/account/info,从 data 中选取 id,在下一次请求中作为 account_id。示例数据和标识均为虚构。 ## 操作与字段 /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## 请求示例 GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ### 机器可读的参考资料 [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/zh/docs/api.md) ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 开发者文档 | 字段 | 文档取值 | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | 来源 · [数据来源](https://adsly.pro/docs/) ## Cabinet | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [API 快速入门](/zh/docs/api/)[密钥与账户权限](/zh/docs/api/authentication/)[创建广告活动与上传媒体](/zh/docs/api/create-campaigns/)[修改现有广告活动](/zh/docs/api/manage-campaigns/)[接收广告活动事件](/zh/docs/api/webhooks/) [下一主题**API 快速入门**](/zh/docs/api/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API 快速入门 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) API 在服务端使用密钥获取账户列表,选择账户并查询广告活动。首次写入时使用新的幂等键创建暂停的草稿,再查询返回的任务编号。 [Markdown](/zh/docs/api.md) 通过 Orbito Ads API,可在自己的应用中执行面板支持的 Telegram Ads 账户管理操作。Euro、TON 和 Stars 账户共用一套方法、一个基础地址和同一密钥。 | 你想这样... You want to... | 使用 | | --- | --- | | 把运动和统计数据拉入仪表板或BI号仪表板 | [活动](/zh/docs/api/campaigns/), [国家](/zh/docs/api/stats/) | | 从脚本、机器人或你的CRM发动运动 | [创建活动](/zh/docs/api/create-campaigns/) | | 出价,暂停输家,自动加注赢家 | [管理活动](/zh/docs/api/manage-campaigns/) | | 了解一项运动何时获得批准、何时遭到拒绝或何时预算用完 | [网页](/zh/docs/api/webhooks/) | | 算上你追踪器的线索和销量 与每次广告活动相对应 | [转换](/zh/docs/api/conversions/) | ## 基础 URL 示例 ``` https://orbitoads.pro/api/v1 ``` 每个请求都将您的密钥带入 `X-API-Key` 头部 请求和回应机构是 JSON. 所有时间都是 UTC. ## 快速开始 ### 1. 创建密钥 在面板中打开**API 和 Webhooks** — **+ 新钥匙** (Pro和Agency计划) 选择键的哪个柜子。 要创建和改变运动, 请选中 **允许管理活动** — 没有它, 键只能读取 。 复制键: 显示一次 。 示例 ``` export ORBITO_API_KEY="orb_…" ``` ### 2. 列出密钥所看到的内阁 示例 ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "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` — 这是`account_id`的所有其他呼叫用途, 内阁中所有的钱都在`currency`。 ### 3. 阅读运动 示例 ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. 发起一场运动(取消,因此没有花费) 示例 ``` 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"] }' ``` 创造Telegram的谈话,所以它运行在背景。你得到`202 Accepted`和一个任务: 示例 ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. 等待任务 示例 ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` 当`status`是`completed`时,`ad_ids`持有新广告活动的身份证。 现在你可以资助它并把它转换为: 示例 ``` 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在运行前每条新广告都会评论;广告活动的`status`显示其位置(参见[地位](/zh/docs/api/campaigns/#doc-note-statuses) ) 。 A [网页](/zh/docs/api/webhooks/)告诉您它改变的时刻。 ## 集成的五条规则 1. **`ad_id` 它仅在广告账户内独特。** Telegram 复用广告标识横跨柜子,存储并查看对子`(account_id, ad_id)`的广告活动,每当有钥匙看到一个以上的柜子时通过`account_id`. 2. **发送一 `Idempotency-Key` 创建、复制、大批和预算呼叫** — 每起手术都新鲜出UUID起, 重试时也一样。 重试之后再也没有创造第二次广告活动或两次移动钱财。 见[无能](/zh/docs/api/idempotency/) 。 3. **创建、复制和大批返回任务。** Poll `GET /v1/tasks/{id}` 直到完成,见[任务](/zh/docs/api/tasks/) . 4. **金钱是线条** (`"spent": "3.541000"`) 来保持精确的十进制。在进行算术前将其分析为十进制 。 5. **分支在 `code`展览 `error`.** 每个出错都有稳定的机读`code`和`error`中的人文句子. See [错误](/zh/docs/api/errors/) . ## 响应结构 示例 ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## 后续步骤 - [关键与访问](/zh/docs/api/authentication/) — 只读 vs 广告活动管理密钥, 代理团队. - [与克劳德和其他AI助理一起建造](/zh/docs/api/ai-assistants/) — 让一个编码代理编写集成. - [OpenAPI SPEC](/docs/api/openapi.yaml) — 从Postman, Insomnia 或客户端生成器中导入. ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 示例 · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` 示例 · 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 } } ] } ``` ## 实施说明 ## 首次请求 携带 X-API-Key 调用 GET /api/v1/account/info,从 data 中选取 id,在下一次请求中作为 account_id。示例数据和标识均为虚构。 ## 账户与广告标识 联合保存 account_id 和 ad_id。不同账户可能重复使用同一 ad_id。密钥可访问多个账户时请传入 account_id 选定记录。 ## 受理与完成 创建、复制和批量操作返回 HTTP 202 及任务 ID。按 Retry-After 轮询 GET /api/v1/tasks/{id}。即使状态为 completed,也要检查 failed 和 errors。 ## 操作与字段 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} ## 请求示例 GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · API 快速入门 | 字段 | 文档取值 | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | 来源 · [数据来源](https://adsly.pro/docs/api/) ## CampaignStatus | 字段 | 字段类型 | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [开发者文档](/zh/docs/)[密钥与账户权限](/zh/docs/api/authentication/)[将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 参考资料更新日期 2026-10-08 [上一主题**开发者文档**](/zh/docs/)[下一主题**密钥与账户权限**](/zh/docs/api/authentication/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 可访问的广告账户 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/accounts/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 账户列表显示结算货币、可用余额、权限级别及支持的广告字段。保存活动标识时同时保存 account_id。 [Markdown](/zh/docs/api/accounts.md) Orbito 的每个账户对应一个 Telegram Ads 广告账户。每项广告活动仅属于一个账户,通过 `account_id` 标识。 ## GET /v1/account/info 返回此密钥当前可访问的广告账户。 示例 ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "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 } } ] } ``` | 田野 | 意义 | | --- | --- | | `id` | `account_id`号传到其他电话. | | `cabinet_type` | `euro`, `ton`或`stars` (中文(简体) ). | | `currency` | `EUR`,`TON`或`STARS` — 这个内阁中**每个** 个货币领域的货币:余额,预算,支出,CPM. 永远不要将不同货币的内阁间货币相加. | | `access_level` | 您的访问权限:`owner`、`manager`(机构成员可以改变广告活动)或`viewer`(机构成员,只读)。写作需要`owner`或`manager`。 | | `balance` | 内阁上的钱,还没有给广告活动(十进制字符串). 内阁同步时刷新——见`balance_updated_at`. | | `min_budget` | 这个内阁中最小的一场非零`budget`的新广告活动可以举行. | | `features.ad_button` | 内阁的广告格式有一个自定义按钮(创建/编辑的`button`字段). | | `features.crypto_filters` | 内阁的广告形式有密码通道过滤器. | 对于展示调整后数据的特殊合作伙伴密钥,`balance` 字段为 `null`。 ## 说明 - `GET /v1/account/info`费用1个读取请求——在启动时和写回`ACCOUNT_NOT_FOUND`时拨打,而不是在每通电话之前拨打. - 柜子在被关闭或您无法访问时从列表中消失 。 - Orbito Ads小组增加了内阁;API小组管理内部的广告活动。 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## GET `/api/v1/account/info` 列出密钥可访问的账户、币种、限额及权限。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | 是 | 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 } } ] } ``` ## 实施说明 ## 余额与币种 逐账户核对 currency、balance_updated_at 和 min_budget。广告对象中的金额及费率可能是十进制字符串或 null,统计聚合使用数值。EUR、TON 和 Stars 分开汇总。 ## 功能可用性 features.ad_button 表示可用自定义按钮,features.crypto_filters 表示可用加密频道筛选。提供操作前检查 is_active 和 access_level。 ## 操作与字段 GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## 请求示例 GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 可访问的广告账户 | 字段 | 文档取值 | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | 来源 · [数据来源](https://adsly.pro/docs/api/accounts/) ## Cabinet | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## Money | 字段 | 字段类型 | | --- | --- | | Money | string \| null | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [查询广告活动](/zh/docs/api/campaigns/)[创建广告活动与上传媒体](/zh/docs/api/create-campaigns/)[修改现有广告活动](/zh/docs/api/manage-campaigns/)[广告活动与账户统计](/zh/docs/api/stats/)[定向词典与群组](/zh/docs/api/targeting/) 参考资料更新日期 2026-10-08 [上一主题**逐页读取广告活动**](/zh/docs/api/pagination/)[下一主题**查询广告活动**](/zh/docs/api/campaigns/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 将 API 文档交给 AI 助手 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/ai-assistants/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 从 OpenAPI 查看字段,用 Markdown 文档了解行为。真实密钥保存在服务端环境。开放写入前先验证只读操作。 [Markdown](/zh/docs/api/ai-assistants.md) 这些文档同时面向开发者与编程助手。每个页面都提供 Markdown 版本,也可一次下载全套文档。API 的机器可读规范采用 OpenAPI 格式。将任务所需的文档链接提供给助手即可。 ## 供 AI 助手使用的文件 | 文件 | 什么是 | 什么时候用? | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | 每页索引,有一行摘要([格式:txt](https://llmstxt.org/)). | 让经纪人去选它需要的页面 | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | 所有页面在一个Markdown文件中( 大约80 KB) | 装入大文件全体的工具; 网易工具可能缩短它, 因此更倾向于 `llms.txt` + 页面 | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec:终点,参数,计划,出错代码 | 输入客户端, 请求验证, Postman | | `.md` | 页面为Markdown, e.g. [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | 单一主题 | 每页上还设有**将页面复制为 Markdown** 个最上层——直接粘入聊天. ## 用 Claude Code 接入 API 的提示词 把这放在项目中的Clood Code(或其他编码代理)中,该项目应该与Orbito Ads谈话。 编辑最后一节,说明你正在建造什么。 示例 ``` 请为这个项目接入 Orbito Ads API。 编写代码前,先阅读 https://orbitoads.pro/zh/docs/llms.txt 及其列出的相关 Markdown 页面。完整文档见 https://orbitoads.pro/zh/docs/llms-full.txt,OpenAPI 规范见 https://orbitoads.pro/docs/api/openapi.yaml。 - 使用基础地址 https://orbitoads.pro/api/v1,通过 X-API-Key 请求头验证身份。从环境变量 ORBITO_API_KEY 读取密钥,不要将密钥写入源码或日志。 - 以 (account_id, ad_id) 标识广告活动。不同账户中可能出现相同的 ad_id。 - 每次向 /campaigns、/campaigns/bulk、/campaigns/{id}/copy 或 /campaigns/{id}/budget 发起新的 POST 操作时,均在 Idempotency-Key 中传入新的 UUID。重试同一操作时复用原 UUID。 - 创建、复制和批量操作返回 202 和任务信息。按照 Retry-After 指定的间隔调用 GET /tasks/{id},直到状态为 completed 或 failed。 - 金额以十进制字符串表示。比较前先用十进制数值类型解析,保留原精度。 - 收到 429 时按 Retry-After 等待。写入返回 5xx 时,先用 GET 确认广告活动的状态,再决定是否换用新的 Idempotency-Key 重试。 - 程序依据 code 字段处理错误;面向用户显示 error 字段。 - 编写一个提供类型化方法的小型客户端,并用模拟 HTTP 响应编写测试。 所需功能:<例如,每小时检查账户 53,将过去 24 小时 CPA 超过 4 EUR 的广告活动暂停>。 ``` ## 在聊天中执行一次性任务的提示词 对于一个问题而不是一个代码库的更改(Claude.ai, ChatGPT 或任何与网页访问的聊天): 示例 ``` 阅读 https://orbitoads.pro/zh/docs/llms.txt 及其列出的广告活动和统计页面。编写 Python 脚本,调用 Orbito Ads API,列出我所有账户中状态为 Active 的广告活动及各自在过去 7 天的花费,并按花费排序。从 ORBITO_API_KEY 读取密钥。 ``` ## 项目 CLAUDE.md 文件中的规则 如果您的项目有`CLAUDE.md`(Claude Code在每场会议开始时读取),请添加这个块,这样以后对整合的每次修改都遵循同样的规则: 示例 ``` ## Orbito Ads API 集成 - 更改调用前,查阅 https://orbitoads.pro/zh/docs/llms.txt、相关 .md 页面及 https://orbitoads.pro/docs/api/openapi.yaml。端点名称和字段以规范为准。 - 从环境变量读取 ORBITO_API_KEY。不得把密钥写入提交记录、终端输出或日志。 - 用 (account_id, ad_id) 标识广告活动。每次通过 POST 创建活动或调拨资金时发送 Idempotency-Key。每项操作单独生成 UUID,重试时使用同一 UUID。 - 创建、复制及批量操作后,轮询 GET /v1/tasks/{id}。对线上活动的预算调整、暂停和删除都应经过同一个有测试覆盖的模块。在生产环境运行一次性脚本前先取得授权。 ``` ## 助手的权限与安全 - **用一只阅读关键开发。** 代理可以探索真实数据而无事可改,仅在对写出代码进行审查时才切换到**管理活动** 的密钥上. - **与活动创建 `"active": false` 和 `"budget": 0` 测试时。** 无运行和无用; 事后删除。 - **缩小关键的范围** 到测试柜,而整合则是新式. - **让代理人读错。** 每个错误都说要修什么(`error`)并搭载一个稳定的`code`和错误的`param`——特工们用这些东西自行解决自己的要求而不会猜测. - 所有API的改变都显示在小组的广告活动史上,标有**🔌 API** 号,所以你可以检视经纪人的行为. ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 示例 · 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' ``` ## 实施说明 ## 密钥与账户权限 在服务端保管 X-API-Key。报表使用只读权限;写入需要广告管理权限、指定账户的所有者或经理角色,以及有效的功能套餐。 ## 可复现的集成说明 提供本地 OpenAPI 合约、虚构账户 ID、操作、预期响应及重试测试。由服务端读取实际密钥。只读报表可先获取账户和广告列表。 ## 操作与字段 /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 ## 请求示例 GET /docs/api/openapi.yaml ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 将 API 文档交给 AI 助手 | 字段 | 文档取值 | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | 来源 · [数据来源](https://adsly.pro/docs/api/ai-assistants/) ## 相关阅读 [开发者文档](/zh/docs/)[API 快速入门](/zh/docs/api/)[密钥与账户权限](/zh/docs/api/authentication/) 参考资料更新日期 2026-10-08 [上一主题**密钥与账户权限**](/zh/docs/api/authentication/)[下一主题**解读 API 错误**](/zh/docs/api/errors/) ## 来源与数据 - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 密钥与账户权限 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/authentication/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 从服务端通过 X-API-Key 请求头传递密钥。可授权单个、多个或全部可用账户。写入还需密钥具有管理权限,且持有人为账户管理者或所有者。 [Markdown](/zh/docs/api/authentication.md) ## 传递密钥 每次请求都通过 HTTP 请求头发送 API 密钥。 示例 ``` X-API-Key: orb_0f3c… (共 68 个字符:orb_ 前缀加 64 个十六进制字符) ``` 直接使用密钥认证,无需 OAuth 流程或令牌交换。密钥应保存在服务器端,不要打包进浏览器代码或移动应用。 ## 获取密钥 在面板的“API 与 Webhook”中选择“新建密钥”。Pro 和 Agency 套餐支持每人最多 5 个有效密钥。密钥仅在创建时显示一次,服务端只保存其 SHA-256 哈希值。遗失后请撤销旧密钥并创建新密钥。 ## 密钥权限 | 许可 | 怎样得到它 | 它允许什么 | | --- | --- | --- | | **阅读** | 每一个钥匙 | 运动、统计、转换、任务、目标代码、网络呼克、向我们发送转换 | | **管理活动** | 勾选 **允许管理活动** 当您创建密钥时, 或者在密钥卡的后期切换 | 阅读中的所有内容, 加上创建、 编辑、 暂停/ 重置、 预算、 复制、 批量动作、 删除、 媒体上传 | 只读密钥调用写入接口会收到 `403 READ_ONLY_KEY`。报表和看板适合使用只读密钥,仅向可信的广告管理程序授予写权限。两类密钥都只能在账户余额与其广告活动之间调拨预算,无法提现。 写入时会检查当前的 Pro 或 Agency 套餐,以及面板中此功能的权限。套餐不支持时返回 `403 FEATURE_NOT_AVAILABLE`。 ## 密钥可访问的账户 创建密钥时,请选择它有权访问的广告账户。 | 权限范围 | 密钥到达 | | --- | --- | | 我所有的柜子( 默认) | 在面板上可以打开的每个柜子,包括后面添加的柜子 | | 多种 | 你抽查过的柜子 | | 1 广告账户 | 仅存的柜子 | 只有**微笑** 的镜面才能打开面板——它永远不会拓宽它。每一次请求都要重新检查它:当您无法进入一个柜子时,您的钥匙会在同一时刻丢失。`GET /v1/account/info`总是准确列出钥匙现在到达的地方。 当密钥可访问多个账户,而请求只操作其中一个时,请传入 `account_id`。缺少该字段会返回 `400 ACCOUNT_ID_REQUIRED`。 ## 代理机构与团队成员的访问权限 API 访问权限与您在面板上的访问权限, 内阁: | 你是谁 | 柜子,你的钥匙 | 能够管理在以下领域的运动: | | --- | --- | --- | | 账户所有者(经常用户) | 自己的橱柜 | 所有这些 | | Agency 车主 | 您的个人和代理内阁 | 所有这些 | | Agency名小组成员 | 与您共享的内阁 | 与**管理员** 次访问共用的柜子;**观察员** 次只读的柜子 | - 团队成员在自己的**API 和 Webhooks** 页上创建自己的钥匙,该机构的计划涵盖这些钥匙。 - 机构所有人看到**API 网页 > 团队 > 团队** 所创立的小组的每一个关键——它是谁的,它是否能够管理广告活动,它能到达多少个柜子,在它最后被使用的时候——并且可以撤销其中的任何一个. - `GET /v1/account/info`回每柜`access_level`回:`owner`回,`manager`回或`viewer`回. `viewer`回一册回回`403 VIEW_ONLY_ACCESS`回. - 如果所有者移除一个成员,将他们降格为Viewer,或者代理计划结束,则成员的密钥会立即跟进——没有什么可以手取而代之. 这些角色在小组中的含义是:**管理员** — — 该内阁中完全的广告活动管理;**观察员** — — 广告活动和统计。 业主还可以让成员加入内阁,邀请队友或分享自己的内阁(从未超过自己的级别 ) 。 ## 撤销与轮换密钥 - **回归** 在面板上的卡片键,它立刻停止工作. - **旋转** = 创建新密钥,部署后再取消旧密钥,可一并活出两个密钥,因此没有停机时间. - **Webhook 秘密** 型(用于验证[网页](/zh/docs/api/webhooks/))与键相分离,可自行旋转. ## 安全存储密钥 - 每集成一个密钥,这样你就可以取消一个而不打破其他的. - 将密钥存储在环境变量或密钥管理器中。 永远不要将密钥粘贴在聊天或门票中 。 - 偏好只读键;仅在代码更改运动时才添加**管理活动** . - 将内阁的范围缩小为一体化需要。 - 如果钥匙可能漏出,那么首先撤销它,然后调查第二处。 通过API型机车所做的每一处改变都出现在广告活动史上,标有**🔌 API** 号的板块上。 ## 身份验证错误 | HTTP | `code` | 意义 | | --- | --- | --- | | 401 | `API_KEY_MISSING` | 无 `X-API-Key` 页眉 | | 401 | `API_KEY_INVALID` | 错误、 被撤销或过期的密钥 | | 401 | `NO_ACCOUNTS` | 键目前没有到达活动柜中 | | 403 | `READ_ONLY_KEY` | 写着没有管理运动的密钥 | | 403 | `VIEW_ONLY_ACCESS` | 写给作为查看器与您共享的柜子 | | 403 | `FEATURE_NOT_AVAILABLE` | 计划并未包含此行动 | | 403 | `WRITE_NOT_ALLOWED` | 这种密钥( 由 Orbito Ads 为合伙人发行) 无法写入 | 完整的状态码列表见“API [错误](/zh/docs/api/errors/)”。 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## 实施说明 ## 连接工作区 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## 密钥与账户权限 在服务端保管 X-API-Key。报表使用只读权限;写入需要广告管理权限、指定账户的所有者或经理角色,以及有效的功能套餐。 请求结果与响应字段 | API | HTTP | 含义 | | --- | --- | --- | | API_KEY_MISSING | 401 | 请通过 X-API-Key 请求头发送密钥。 | | API_KEY_INVALID | 401 | 密钥无效、已过期或已撤销。 | | NO_ACCOUNTS | 401 | 密钥目前无法访问任何活跃广告账户。 | | READ_ONLY_KEY | 403 | 此密钥只允许读取,写入广告活动需要管理权限。 | | VIEW_ONLY_ACCESS | 403 | Viewer 可查看该账户,修改则需要账户级写权限。 | | FEATURE_NOT_AVAILABLE | 403 | 当前套餐未包含此操作。 | | WRITE_NOT_ALLOWED | 403 | 服务商向合作伙伴签发的这类密钥不允许写入。 | [解读 API 错误](/zh/docs/api/errors/) ## 访问范围与撤销 供应商密钥可限定一个、多个或所有获准账户,每次调用核实范围。符合条件的套餐每人最多五个有效密钥。遗失时撤销密钥,webhook 密钥可单独轮换。 ## 操作与字段 X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## 请求示例 GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 密钥与账户权限 | 字段 | 文档取值 | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | 来源 · [数据来源](https://adsly.pro/docs/api/authentication/) ## Cabinet | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [开发者文档](/zh/docs/)[API 快速入门](/zh/docs/api/)[将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 参考资料更新日期 2026-10-08 [上一主题**API 快速入门**](/zh/docs/api/)[下一主题**将 API 文档交给 AI 助手**](/zh/docs/api/ai-assistants/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 查询广告活动 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/campaigns/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 可按状态或目标链接过滤列表,也可读取单项活动和历史记录。不同账户的广告 ID 可能相同,定位时需同时使用 account_id 与 ad_id。 [Markdown](/zh/docs/api/campaigns.md) 在 API 中,一项广告活动对应一条 Telegram 广告。请用 `(account_id, ad_id)` 标识;不同账户可能重复使用同一 `ad_id`。 ## 广告活动对象字段 `GET /v1/campaigns/{ad_id}` 返回 : 示例 ``` { "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" } ``` | 田野 | 意义 | | --- | --- | | `title` | 你的广告内部名字。 | | `text` | 广告短信人们看到。 | | `status` | Telegram正在做的广告——见[状态](/zh/docs/api/campaigns/#doc-note-statuses). | | `active` | 你要求的:`true`=应该运行. `active: true`和`Stopped`状态的广告活动一旦再次获得预算,即恢复. | | `promote_url` / `tme_path` | 广告内容包括:网站URL,或`t.me/`链接(频道,bot,迷你应用,帖子). | | `target_type` | `channels`,`bots`,`search`或`users` —见[创建活动](/zh/docs/api/create-campaigns/). | | `targets` | 用户名称为广告目标(频道或bots),当知道时。 | | `cpm` | 每1000次观看,在广告账户的货币中。 | | `budget` | **左** 钱在广告活动中。 `budget + spent` 是它得到的一切。 | | `spent` | 至今所花之钱. | | `daily_budget` | 每日开支上限,如果设置了的话。 | | `views`, `clicks`, `actions`, `opens` | 生活计数器. `actions`是平台动作(joins,bot start)——而不是你的转换;对于那些,参见[转换](/zh/docs/api/conversions/). | | `ctr`, `cvr` | 百分比:`"1.15"`意味着1.15%。 | | `cpc`, `cpa` | 每点击一次和每起行动的费用。 | | `views_per_user` | 一个人能看多少次广告(1–4). | | `schedule` | 周日与时日广告显示,或`null` — 它全天候运行。见[时间表](/zh/docs/api/manage-campaigns/#doc-note-schedule) 。 | | `group_id` | 广告活动团体在小组中, | | `auto_cpm_enabled` | Orbito Ads的CPM号汽车管理出价. | | `date` | 当广告创建时:unix秒,作为字符串. | | `status_changed_at` | 最后地位变化:不受最新数据的影响——对“此后的变化”有利。 | | `synced_at` | 当广告本身的设置——`schedule`,`text`,`views_per_user`,目标设定——最后从Telegram读取. 见[新鲜](/zh/docs/api/campaigns/#doc-heading-freshness). | **金钱领域是十字线** (`cpm`,`budget`,`spent`,`ctr`,`cvr`,`cpc`,`cpa`)所以十进制不变,计数器(`views`,`clicks`,`actions`,`opens`)都是数字,所有的钱都在内阁的货币中(参见[广告账户](/zh/docs/api/accounts/)). ## 状态 | 状态 | 意义 | 做你该做的 | | --- | --- | --- | | `Active` | 跑步。 | 暂停,变更出价,增加预算. | | `In Review` | 等待Telegram的检讨;尚未显示. | 等等,一个网友告诉你,当它改变。 | | `Declined` | Telegram拒绝了该广告. | 编辑文本或链接(重新提交),或创建新的文本或链接。 | | `On Hold` | 关机了——由你或自动化规则。 | 回复。 | | `Stopped` | 预算用光了。 | 增加预算;如果`active`是`true`,则再次运行。 | | `Paused` | 全柜被Telegram停用(稀有). | 联系[@orbitoads](https://t.me/orbitoads) | | `Deleted` | 被删除,在历史中保存,隐藏在列表中. | — | ## GET /v1/campaigns 每个内阁的广告活动都是关键所在。 示例 ``` 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" ``` | 参数 | 默认 | 意义 | | --- | --- | --- | | `account_id` | — | 只有这个柜子(`accountId`也有效. ) | | `status` | 全部删除 | 一个或几个状态,逗号分隔. | | `title` | — | 标题载有本案文。 | | `bot_username` | — | 一个bot或通道的广告:匹配`tme_path`中的用户名,大小写不敏感,编号为`@`. `foo`不匹配`foobar`. | | `promote_domain` | — | 链接在这个主机上的网站广告。 接受`example.com`或一个完整的URL; `www.`, 方案, 路径和端口被忽略 。 | | `promote_domain_mode` | `exact` | `suffix`也匹配子域(`x.example.com`). | | `type` | — | `bot` (机器人和微型应用程序),`channel`(频道,组,站)或`site`(外部网站). | | `limit` | 100 | 1–500. | | `cursor` | — | 铺设-见[页面](/zh/docs/api/pagination/). 建议。 | | `offset`, `sortBy`, `sortOrder` | — | 抵消平面图(每柜500美元)。 | 过滤器与 AND 结合。 一个未知的bot 或域返回一个空列表,而不是错误 。 示例 ``` { "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 /v1/campaigns/{ad_id}` — 上面的全部对象,包括瞄准,创意字段和`schedule`(列表终点将那些留作快速停留). 已删除的战役也被还原,有`status: "Deleted"`. 示例 ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id`只有在你几个柜子里存在同样的`ad_id`时才需要(`400 ACCOUNT_ID_REQUIRED`告诉你). ### 新鲜 每一场运动的柜台和状态每时每刻都在刷新。广告本身的设置 — — `schedule`,`text`,`views_per_user` — — 目标来自阅读广告本身,所以: - `GET /v1/campaigns/{ad_id}`在回答之前从Telegram重新读取了这个广告,因为我们的复制时间已经超过**5分钟** 年。 Telegram年的广告界面中有人直接做了改动,就出现在了窗外。 - 活动活动(`Active`, `In Review`, `On Hold`此外,在背景下每3小时都会重新阅读。 - 通过Orbito Ads——面板或这API——所作的修改,一并抄入. 如果Telegram没有及时回答,你就能拿到存储的拷贝;`synced_at`告诉你它多大了. ## GET /v1/campaigns/{ad_id}/history 一个运动的总数在一段时间内——一个总数,而不是一个小时的分数。 示例 ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "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`(默认),`7d`,`30d`或`custom`,有`startDate`/`endDate`(`YYYY-MM-DD`,UTC)和可选的`startHour`/`endHour`(0–23). 该时期没有数据~`404 NOT_FOUND`. ## 同步本地副本 1. 页面通过`GET /v1/campaigns?cursor=`,上升由`(account_id, ad_id)`. 2. 订阅[网页](/zh/docs/api/webhooks/),用于状态变化和小时统计,而不是每分钟投票. 3. 一天一次重新同步 捕捉到任何被网友错过的东西 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## GET `/api/v1/campaigns` 按筛选条件分页读取广告列表。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `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` | 是 | 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}` 获取单条广告的定向、素材与时段安排。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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` 读取一条广告在日期或小时范围内的汇总指标。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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" } } ``` ## 实施说明 ## 账户与广告标识 联合保存 account_id 和 ad_id。不同账户可能重复使用同一 ad_id。密钥可访问多个账户时请传入 account_id 选定记录。 ## 筛选与状态 筛选条件按 AND 合并,status 可传逗号分隔值。列表默认省略 Deleted,详情仍可返回。active 为期望投放状态,status 为平台实际状态。 ## 操作与字段 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 ## 请求示例 GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 查询广告活动 | 字段 | 文档取值 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | 字段 | 字段类型 | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [可访问的广告账户](/zh/docs/api/accounts/)[创建广告活动与上传媒体](/zh/docs/api/create-campaigns/)[修改现有广告活动](/zh/docs/api/manage-campaigns/)[广告活动与账户统计](/zh/docs/api/stats/)[定向词典与群组](/zh/docs/api/targeting/) 参考资料更新日期 2026-10-08 [上一主题**可访问的广告账户**](/zh/docs/api/accounts/)[下一主题**创建广告活动与上传媒体**](/zh/docs/api/create-campaigns/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API 版本与更新 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/changelog/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 版本位于 API 路径中。客户端应能处理新增字段和枚举值。2026 年 10 月的更新涵盖投放排期、管理操作及期间汇总。 [Markdown](/zh/docs/api/changelog.md) ## API 版本 该版本在路径:`/api/v1`。在`v1`之内,我们只做了**添加剂** 个修改: | 添加( 随时可能发生) | 断开( 仅在新版本中) | | --- | --- | | 新终点 | 删除或重命名一个终点或字段 | | 新可选请求字段 | 需要新建的字段 | | 新反应领域 | 更改字段的类型或含义 | | enums中的新值( `status`, 错误 `code`) | 删除 enum 值 | | 新错误代码 | 无效的有效请求 | 因此,请给客户写**忽略他们不了解的领域** 和**处理未知的 enum 值和错误代码** 的优雅信息。 一次突破性改变会以`/api/v2`的船位,首先在这里宣布,`v1`一直在同时运行。 ## 更新记录 ### 2026-10-26年——期间合计. - **新:** 每`topCampaigns`行[`GET /v1/stats/analytics`](/zh/docs/api/stats/#doc-note-get-v1statsanalytics)行搭载了`cpm`——在此期间每1000个取景地花费了`cpc`和`cpa`相邻. - **修复:** 个一到两天的窗口现在正好等于同一个距离。 午夜后的第一分钟(UTC)曾经从这些窗口中跳出,所以一天的距离就低了1–2 % ; 三天和多的距离已经对了,而且没有改变。 - **修复:** 窗口长达两天, 开始于29多天后返回零; 它现在返回当天的数字 。 ### 2026-10-08-广告时间表. - **新: `schedule`** — 只在选定的工作日和工作时段进行广告活动。 设定为创建, `PATCH /v1/campaigns/{ad_id}` , 复制, 或随批量动作**set_schedule** 同时进行许多广告活动; `null`将其删除。 `GET /v1/campaigns/{ad_id}` 返回。 格式: [时间表](/zh/docs/api/manage-campaigns/#doc-note-schedule) 。 它不会打开或关闭广告活动。 - 暂停、恢复和编辑一项运动,保留其时间表;复制和重新制作的运动继承它。 - **修复:** `PATCH /v1/campaigns/{ad_id}`,只有`cpm`,`active`和/或`schedule`将广告活动结果退回到Telegram的检讨中去,这些现在都经过了Telegram自己的出价和状况表,从不触发检讨;其他领域仍然如此(Telegram的规则)——参见[编辑](/zh/docs/api/manage-campaigns/#doc-note-edit). - **修复:** 在没有预算的情况下制定广告活动时间表,可以将其送回检讨。 这一运动现在以`param: "schedule"`回答`400`, 并且没有受到任何影响 — — 先增加预算,然后确定日程。 - **`GET /v1/campaigns/{ad_id}` 现在是当前的:** 它从Telegram重新读取了我们的复制时间超过5分钟的广告,所以`schedule`,`text`和`views_per_user`直接反映了Telegram的修改. New field **synced_at** 说广告是上次读取时,参见[新鲜](/zh/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08-运动管理. - **新:写入访问。** 键可以现在携带**管理活动** 键:`POST /v1/campaigns`(创建,每通呼叫最多可达100),`PATCH /v1/campaigns/{ad_id}`,`POST …/pause`,`…/resume`,`…/budget`,`…/copy`,`POST /v1/campaigns/bulk`,`DELETE /v1/campaigns/{ad_id}`,`POST /v1/media` 键可保持只读,直到开通. - **新读者:** `GET /v1/campaigns/{ad_id}`(一次有目标的运动),`GET /v1/tasks/{id}`,`GET /v1/groups`,`GET /v1/targeting`。 - **公司团队成员** 可以创建密钥;一个密钥到达与成员共享的柜子,在他们的访问级别上. 机构所有者看到所有的团队密钥(API & Webhooks ~ Team密钥),可以撤销. - **Idempotency-Key** 需要用于创建、复制、批量和预算。 - 每分钟**单独写字率限制:** 个30个请求,除了60个读数之外. - **`GET /v1/account/info`** 又增加了`access_level`,`currency`,`balance`,`balance_updated_at`,`min_budget`,`features`. - **错误** 在未修改的`error`文本旁边加上了`code`和`request_id`. A`500`不再包括内部出错文本. - `account_id`在`accountId`的任何地方被接受(两者都是工作)。 - **修复:** `GET /v1/stats?period=all` 每点击一次返回成本为`cpa`;现在是每起行动的成本,与其他期间一样。 ### 2026-10-04 - URL过滤器适用于两个webhooks;`status_change`只到达其所有者能看见柜子的密钥. ### 2026-09-18 - 转会除读取限制外,还可得到自己的预算(20个活动/s);分批最多可达1000个活动. ### 2026-06-30 - 出入境转换:`POST /v1/postback`,`GET /v1/ingest/{token}`,`GET /v1/conversions`. ### 早期 - `GET /v1/campaigns` 有光标平面和`bot_username`,`promote_domain`和`type`等滤波器;统计端点;`status_change`和`hourly_digest`网点. 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## 实施说明 ## 路径版本 本契约使用 /api/v1。兼容更新可加入可选字段、端点、枚举值和错误码。客户端应保留未知状态,并忽略未使用的响应字段。 ## 需要关注的变更 当前支持每周排期、按账户写入广告及 topCampaigns 中的 CPM。改变字段类型、移除字段或新增必填输入属于破坏性变更,需使用新版本。 ## 操作与字段 /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 ## 请求示例 GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · API 版本与更新 | 字段 | 文档取值 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/changelog/) ## 相关阅读 [接收广告活动事件](/zh/docs/api/webhooks/)[发送已确认的转化](/zh/docs/api/conversions/) 参考资料更新日期 2026-10-26 [上一主题**发送已确认的转化**](/zh/docs/api/conversions/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 发送已确认的转化 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/conversions/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 从服务端或追踪器发送活动引用或邀请链接、事件类型及唯一交易 ID。可选的金额和货币字段可用于关联收入与广告支出。 [Markdown](/zh/docs/api/conversions.md) Telegram 记录展示、点击和加入频道等行为。之后发生的留资、入金或成交由您的后端或跟踪系统记录。将这些事件上报至 Orbito Ads 后,就能在面板、报告和自动化规则中查看并使用各活动的转化和收入。 ## 启用转化跟踪 在面板上的密钥卡片上,切换到**收到邮件** 。没有它,就发送回`403 INGEST_DISABLED`。对于一个追踪器,请按**创建Tracker URL** — — 您只能收到URL(一次下)的写出,它可以张贴转换,但不能读出任何东西。 ## 转化如何归因到广告活动 每条广告都与您控制的标识符连接到某个地方: - 机器人或微型应用程序:`t.me/yourbot?start=REF`或`?startapp=REF` - 网站:您追踪器在链接中的点击 id 或 sub id, e.g . `https://site.com/?subid=REF` 当您发送一个转换时, 包括`REF` 和 `ref` 。 Orbito Ads 在内阁中找到其链接的广告活动。 如果一个内阁的几次广告活动共用同样的`ref`, 那么每个内阁的转换都算得上。 ## 从服务器发送 · POST /v1/postback 示例 ``` 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" }' ``` 示例 ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` 一次多达1000起事件:`{ "events": [ {…}, {…} ] }`起(或一阵赤裸). 反应报告每起事件——`{ "accepted": 998, "failed": 2, "results": [ … ] }`起,因此一个坏事件从未下沉过批次. ## 从跟踪工具发送 · GET /v1/ingest/{token} 将URL跟踪器粘入您的跟踪器的后置设置, 并带有其宏 : 示例 ``` # 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} ``` 在您自己的文档中检查宏名称。 答案是纯文本: `OK`, `OK (deduped)`, 或带有HTTP状态的错误信息( 4xx — 不重试, 5xxx — 重试 ) 。 ## 字段 | 田野 | 亦被接受为 | 需要 | 意义 | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | 是1 | 广告链接中的标识符。最多512个字符。 | | `invite_link` | `invitelink`, `link` | 是1 | 为频道广告:所创建的独有邀请链接Orbito Ads. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | 是的 | 成为`lead`,`conversion`或`purchase`(字相通有`signup`,`ftd`,`deposit`,`sale`等). 未知的字被拒绝. | | `txid` | `tid`, `transaction_id`, `order_id`, `rdtk_event_id`首席 `X-Idempotency-Key` | 是的 | 您的此事件的代号 。 发送相同的 `txid` 重新更新事件, 而不是重复计算 。 最多 128 个字符 。 | | `amount` | `payout`, `sum`, `revenue`, `value` | 无 | 数字; 充值为负. | | `currency` | `cur`, `cnv_currency` | 无 | ISO 4217 代码,没有一个,一个金额记录为USD . | | `status` | — | 无 | 您的网络状态单词( 已核准, 待定. ) , 已保存 。 | | `event_time` | `timestamp`, `date` | 无 | ISO或unix时间;保存在后90天以内. | | `account_id` | `accountId` | 有时 | 需要时,你的几个柜子里有同样的`ref`个(另`409`个)。 | | `meta` | — | 无 | 你自己的JSON天体,最高可达4个KB . | 1,`ref`或`invite_link` (中文(简体) ). ## 限额与重试 每把钥匙每秒有20个事件,连发可达1000个——与读写预算分开. `429`等`Retry-After`;再试总是安全的,因为`txid`个去重试. ## GET /v1/conversions 每项运动的总数,每活动计算一次: 示例 ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | 参数 | 意义 | | --- | --- | | `adId` | 一场广告活动. | | `days` | 过去1至365天只收到事件。 | - `revenue`是按货币计算——金额从不兑换. - `ad_id`是`null`,与多个运动共享的`ref`对应的事件. - 您发送的金额是您自己的报告。 这些金额没有计费, 也不改变您支付Orbito Ads美元的任何费用 。 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## POST `/api/v1/postback` 提交单个转化或最多 1,000 个事件。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | 是 | 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 } } ``` ### 请求体结构 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}` 通过仅写入的网址回传追踪转化。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `token` | path | `string` | 是 | | `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` 按原始币种列出转化量与收入。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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 } } ] } ``` ## 实施说明 ## 关联转化与广告 先在供应商密钥上启用接收回传。传 ref 或 invite_link、event 和稳定的 txid。标准事件为 lead、conversion、purchase。多个账户匹配时指定 account_id。 请求结果与响应字段 | API | 含义 | | --- | --- | | account_id / accountId | account_id 也可以写成 accountId。同一 ref 出现在多个账户时需指定账户,匹配不明确会返回 HTTP 409。 | ## 去重与币种 相同 txid 更新既有事件,批次可部分成功。收入采用 ISO 币种,缺省 USD;负值可表示退款。追踪链接只可写入,以纯文本返回 OK 或 OK (deduped)。 ## 操作与字段 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 ## 请求示例 GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 发送已确认的转化 | 字段 | 文档取值 | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | 来源 · [数据来源](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | 字段 | 字段类型 | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | 字段 | 字段类型 | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [接收广告活动事件](/zh/docs/api/webhooks/)[API 版本与更新](/zh/docs/api/changelog/) 参考资料更新日期 2026-10-08 [上一主题**接收广告活动事件**](/zh/docs/api/webhooks/)[下一主题**API 版本与更新**](/zh/docs/api/changelog/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 创建广告活动与上传媒体 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/create-campaigns/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 每个请求可在一个账户内创建最多 100 项活动。选择频道、机器人、搜索或受众定向,提供唯一操作键并跟踪返回的任务。需要媒体时先上传。 [Markdown](/zh/docs/api/create-campaigns.md) `POST /v1/campaigns` 在一个账户中创建广告活动。需要有管理权限的密钥以及 `Idempotency-Key` 请求头。`202` 响应包含[任务](/zh/docs/api/tasks/)信息,任务完成后才会出现新活动。 ## 创建广告活动示例 示例 ``` 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"] }' ``` 示例 ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## 批量创建 将运动设置为`campaigns`个(最多为100个). `account_id`个组域保留在顶层,并适用于所有组域. 示例 ``` { "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"] } ] } ``` 运动是逐个创建的。 如果第一个失败, 任务停止了 —— 修正输入而不是重复同样的错误100次。 每个失败都列在任务`errors` 中, 它的`index` 在您的数组中 。 ## 字段 | 田野 | 需要 | 意义 | | --- | --- | --- | | `title` | 是的 | 内部名称,显示在面板上. | | `text` | 是的 | Ad text people see. Telegram自身长度和内容规则适用——任务`errors`回回回拒绝. | | `promote_url` | 是的 | 广告内容:`https://t.me/channel`、`t.me/bot?start=ref`、`@channel`或网站URL。 | | `cpm` | 是的 | 内阁货币的比价(bid / 1000)大于0. 。 目标 — — Telegram — 的最小值太低了。 | | `budget` | 是的 | 钱从内阁平衡转向广告活动:`0`,至少是内阁的`min_budget` ([广告账户](/zh/docs/api/accounts/) ) 。 有了`0`,广告已经创建,但直到你增加预算才能运行。 | | `target_type` | 是的 | `channels`、`bots`、`search`或`users`——见下文。 | | `active` | 无 | `false` 创建它关闭。默认 `true` 。 | | `daily_budget` | 无 | 每日支出上限。 | | `views_per_user` | 无 | 1–4号,有多少人能看到广告? | | `media` | 无 | [`POST /v1/media`](/zh/docs/api/create-campaigns/#doc-note-upload-media)的图像或视频标志。 | | `picture` | 无 | `true`在广告中展示了被推广的频道的相声. | | `button` | 无 | 广告下键:`subscribe`,`view`,`read`,`learn_more`,`download`,`open`,`sign_up`,`buy`,`order`,`play`,`try`,`leave_request`. 只有内阁的`features.ad_button`是`true`的. | | `website_name` | 无 | 在网站广告上显示的品牌名称. | | `schedule` | 无 | 仅在选定的工作日及时间播放广告, e.g . 工作日 9: 00–18: 00。 格式: [时间表](/zh/docs/api/manage-campaigns/#doc-note-schedule) 。 没有广告, 广告会全天候播放 。 | 顶级仅:`account_id`(当密钥到达多个柜子时需要),`group_id`(现存[团体](/zh/docs/api/targeting/#doc-note-groups))或`new_group_name`(创建组,或再用取名后需要). 以`400 VALIDATION_ERROR`拒绝未知字段,以`param`拒绝字段名——一个twico从不默不作声地放弃一个设置. ## 定向设置 ### `channels` — 在具体频道显示广告 示例 ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | 田野 | 意义 | | --- | --- | | `channels` | 1–100 公共频道:`@name`个,`name`个或`t.me/name`个。 | | `languages`, `topics`, `exclude_topics` | 按频道语言和话题划分的收缩([代码](/zh/docs/api/targeting/). | | `add_similar_channels` | 同时加入类似这些频道. | ### `bots` — 以 bots 显示广告 示例 ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots`: 1–100 个公共bots. required. ### `search` — 显示Telegram搜索查询的广告 示例 ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords`: 1–100 个短语,每个短语最多64个字符。 需要 。 ### `users` — 向观众展示广告 示例 ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | 田野 | 意义 | | --- | --- | | `countries` | ISO国道代码. | | `languages` | 语言代码. | | `topics`, `exclude_topics` | 兴趣,按专题编号。 | | `audience_channels` | 读这些频道的人。 | 至少需要其中之一。代码:[目标代码](/zh/docs/api/targeting/) 。 当任务进行时,频道、bots和关键词被解决到Telegram自己的ID上。 Telegram号无法找到;如果找不到的话,这场广告活动失败了 — — `No targets found: …`个频道和boots,`No valid search queries found`个关键词 — — 而任务`errors`号也这么说。 ## 创建广告活动后 1. [`GET /v1/tasks/{id}`](/zh/docs/api/tasks/)号投票直到`completed`. `ad_ids`举行新的广告活动. 2. Telegram评出每条新广告:开始`In Review`个,然后变成`Active`(或`Declined`个). A[网页](/zh/docs/api/webhooks/)告诉你什么时候. 3. 用[管理活动](/zh/docs/api/manage-campaigns/)来改变、资助或暂停 ## 上传媒体文件 `POST /v1/media`将一个图像或视频上传到一个柜子,并返回`POST /v1/campaigns`、`PATCH`和副本的`media`个代币。 该代币属于该柜子,上传到您将要创建的柜子中。 示例 ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` 示例 ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG,PNG,GIF,WEBP或MP4,至10 MB,以`multipart/form-data`发于场上`file`. - 有些柜子只接受16:9的图像, 至少640px宽;如果一个文件不合适, Telegram的理由在`error`回. ## 错误 | 代码 | 当时 | | --- | --- | | `VALIDATION_ERROR` | 一个字段丢失, 未知, 类型错误, 或不属于这个`target_type` — `param`说。 | | `IDEMPOTENCY_KEY_REQUIRED` | 编号为`Idempotency-Key`. | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | 说哪个柜子是无法到达的。 | | `VIEW_ONLY_ACCESS` | 你可进入这个柜子 | | `QUEUE_FULL` | 5 创建此内阁中已经排队的 。 | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | 内阁现在无法接受手动修改。 | 个人广告活动故障(Telegram拒绝文本、提议、链接)不会失败请求 - 它们在任务中出现 `errors`. ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## POST `/api/v1/campaigns` 在一个账户中排队创建单条或最多 100 条广告。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | 是 | | `X-API-Key` | header | `string` | 是 | 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": [] } } ``` ### 请求体结构 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" } ] } ``` 请求结果与响应字段 | API | HTTP | 含义 | | --- | --- | --- | | VALIDATION_ERROR | 400 | 核对请求字段,修正非法输入后重试。 | | IDEMPOTENCY_KEY_REQUIRED | 400 | 写请求中需提供 Idempotency-Key 请求头。 | | VIEW_ONLY_ACCESS | 403 | Viewer 可查看该账户,修改则需要账户级写权限。 | | QUEUE_FULL | 429 | 该账户的创建队列已有五项任务,请等待空位。 | [解读 API 错误](/zh/docs/api/errors/) ## POST `/api/v1/media` 上传广告素材并取得该账户专用的文件令牌。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | | `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 } } ``` ### 请求体结构 JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` 示例 · 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" ] } ] } ``` ## 实施说明 ## 单条与批量创建 单条创建在根级传 title、text、promote_url、cpm、budget、target_type。批量创建在 campaigns 中放 1–100 个对象,根级共享账户和分组。预算可为零或至少达到 min_budget。 ## 定向与文件 定向可选 channels、bots、search 或 users。频道、机器人、关键词各 1–100 项,搜索词最多 64 字符。受众模式至少有一项筛选。JPG、PNG、GIF、WebP、MP4 最大 10 MB,素材令牌属于上传账户。 ## 受理与完成 创建、复制和批量操作返回 HTTP 202 及任务 ID。按 Retry-After 轮询 GET /api/v1/tasks/{id}。即使状态为 completed,也要检查 failed 和 errors。 ## 操作与字段 POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## 请求示例 GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 受众测试设置 创建结构区分四种定向方式。频道使用 channels,机器人名使用 bots,搜索词使用 search_keywords。国家、语言与主题用于描述用户受众。构建测试前应先读取账户所支持的选项。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 创建广告活动与上传媒体 | 字段 | 文档取值 | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | 来源 · [数据来源](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | 字段 | 字段类型 | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [可访问的广告账户](/zh/docs/api/accounts/)[查询广告活动](/zh/docs/api/campaigns/)[修改现有广告活动](/zh/docs/api/manage-campaigns/)[广告活动与账户统计](/zh/docs/api/stats/)[定向词典与群组](/zh/docs/api/targeting/) 参考资料更新日期 2026-10-08 [上一主题**查询广告活动**](/zh/docs/api/campaigns/)[下一主题**修改现有广告活动**](/zh/docs/api/manage-campaigns/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 解读 API 错误 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/errors/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 结合 HTTP 状态码与机器错误码解读。缺少密钥会返回 401。重试写入前先纠正输入;触发限流后按响应提示等待。 [Markdown](/zh/docs/api/errors.md) ## 响应格式 每个错误都有相同的形状 : 示例 ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | 田野 | 总的来说 | 意义 | | --- | --- | --- | | `error` | 是的 | 一个人可以读出一句话。 显示它; 不要分析它。 措辞可以改进。 | | `code` | 在所有 v1 出错时是 | 稳定,机器可读 分局负责这个 | | `param` | 输入错误 | 错误的球场,作为一个路径:`cpm`,`campaigns[2].channels[0]`,`account_id`. | | `request_id` | 在大多数错误上 | 与`X-Request-Id`响应头相同,引用支持. | 一些错误增加了上下文:`min_cpm`和`currency`,当Telegram拒绝投标时为过低,`missing`与`UNKNOWN_AD_IDS`相通,`limit`与`QUEUE_FULL`相通. ## HTTP 状态码 | 状态 | 意义 | 退休? | | --- | --- | --- | | 200 | 达尼 | — | | 202 | 接受,在背景中运行——民意调查[任务](/zh/docs/api/tasks/) | — | | 400 | 请求错误( 字段, 值, 缺失 `account_id`) —— 或 Telegram 拒绝更改 。 | 否- 解决请求 | | 401 | 没有钥匙,坏钥匙,也没有钥匙,没有柜子 | 无 | | 403 | 关键或计划不允许这样做 | 无 | | 404 | 在柜子里找不到这个密钥 | 无 | | 409 | 与当前状态相冲突( cabinet 锁定, Telegram会话已过期, 请求相同 ) | 有时——见代码. | | 413 | 文件太大了 | 无 | | 422 | `Idempotency-Key` 重复使用不同的请求 | 否- 使用新密钥 | | 429 | 速率限制或队列已满 | 是, `Retry-After`秒后开始 | | 500 | 我们的bug——已经登录了 | 先读读状态, 然后再用备份重试 | | 503 | 暂时无法提供 | 是,在`Retry-After`号之后 | ## 错误代码 ### 认证和访问 | 代码 | HTTP | 什么要做 | | --- | --- | --- | | `API_KEY_MISSING` | 401 | 发送`X-API-Key`。 | | `API_KEY_INVALID` | 401 | 密钥错误、 被撤销或过期 。 创建新密钥 。 | | `NO_ACCOUNTS` | 401 | 密钥现在没有到达活动相册(内阁失效,访问权限被移除). | | `FORBIDDEN` | 403 | 这种密钥类型不允许所有者使用 。 | | `READ_ONLY_KEY` | 403 | 打开**管理活动** 键在面板中。 | | `WRITE_NOT_ALLOWED` | 403 | 这种密钥类型(由Orbito Ads为合伙人发行)从不写作. | | `VIEW_ONLY_ACCESS` | 403 | 您访问这个柜子是查看器,请询问代理店主是经理。 | | `FEATURE_NOT_AVAILABLE` | 403 | 计划并未包括此行动(回应名称为`feature`). | | `SUBSCRIPTION_REQUIRED` | 403 | 内阁所有者没有主动订阅。 | | `ACCOUNT_INACTIVE` | 403 | 柜子已经失效了 | ### 找到东西 | 代码 | HTTP | 什么要做 | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | 键通到数个柜子(或这个`ad_id`存在于数个柜中)——通过`account_id`. | | `ACCOUNT_NOT_FOUND` | 404 | `account_id` 无法用这把钥匙到达。 请检查 `GET /v1/account/info` 。 | | `CAMPAIGN_NOT_FOUND` | 404 | 在密钥的内阁中没有这样的运动(或删除). | | `TASK_NOT_FOUND` | 404 | 此密钥的主人没有这样的任务 。 | | `NOT_FOUND` | 404 | 这场运动和期间没有统计数据。 | | `UNKNOWN_AD_IDS` | 400 | 某些 `ad_ids` 在大规模通话中,没有广告账户的活动; `missing` 列出他们。 | ### 入口 | 代码 | HTTP | 什么要做 | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param`名字段命名;`error`说出出出错来. 未知字段也被拒绝——检查拼写. | | `UNSUPPORTED_MEDIA` | 400 | 上传JPG,PNG,GIF,WEBP或`file`场MP4. | | `FILE_TOO_LARGE` | 413 | 上传一个更小的文件(最多10个MB个). | ### Telegram和内阁州 | 代码 | HTTP | 什么要做 | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram拒绝了这一修改;`error`带着它的理由。 低价价格还给你`param: "cpm"`、`min_cpm`和`currency`。 | | `BUDGET_UNCHANGED` | 400 | Telegram接受了顶级广告活动,但广告活动预算没有动静。 请检查内阁平衡(`GET /v1/account/info` ) 。 | | `INSUFFICIENT_AD_BALANCE` | 400 | 你要求退出的比广告活动多 少退出,或者使用`withdraw_all`。 | | `CABINET_AUTH_EXPIRED` | 409 | 内阁的Telegram会话已过期。 所有者在面板上重新连接; 然后重试 。 | | `CABINET_LOCKED` | 409 | 柜子实行自动管理;手动更改被屏蔽. | ### 限制和复议 | 代码 | HTTP | 什么要做 | | --- | --- | --- | | `RATE_LIMITED` | 429 | 等`Retry-After`秒,见[速度限制](/zh/docs/api/rate-limits/) | | `QUEUE_FULL` | 429 | 柜子已经排入了5个操作队列。 等待任务完成, 然后重试( 同为 `Idempotency-Key` 是罚款 ) 。 | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | 增加一个`Idempotency-Key`页头. | | `IDEMPOTENCY_KEY_INVALID` | 400 | 使用8–255个字符;一个UUID是理想的. | | `IDEMPOTENCY_KEY_REUSED` | 422 | 这个键被用于不同的请求——新的操作,新的键. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | 此密钥的第一个请求仍在运行中。 几秒钟后重试 。 | | `IDEMPOTENCY_UNAVAILABLE` | 503 | 什么都没做,用同样的钥匙重试 | | `INGEST_DISABLED` | 403 | 开通**收到邮件** 为密钥([转换](/zh/docs/api/conversions/). | | `INTERNAL_ERROR` | 500 | 我们这边,在重新试写前用GET号机检查状态;如果持续使用`request_id`号机,请联系[@orbitoads](https://t.me/orbitoads). | ## 何时重试请求 - **4X** — 不要修改重试; 修正请求 。 (A 4xx 从未消耗您的`Idempotency-Key`, 这样您就可以用相同的密钥重试固定的请求 ) 。 - **429 / 503** — `Retry-After`后再试. - **5x 写作后** — 变化可能已经达到或没有达到Telegram. 与**同一** `Idempotency-Key`重试返回相同的5xx(通过设计——它防止了双重动作). `GET` 运动去查看发生了什么,然后决定;如果重试,使用一把新钥匙. - **网络时间在写作上** — — 重试**同一** `Idempotency-Key` — — 如果第一次尝试成功,你就能得到结果;如果失败,手术现在就进行。 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 示例 · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | 代码 | 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 | ## 实施说明 ## 读取错误响应 错误含 success=false 和 error。客户端用 code 进行处理,联系支持时提供 request_id。param 可指示无效字段,missing 可列出未知广告,出价被拒时可能返回 min_cpm 和 currency。 ## 按状态处理重试 400 检查输入,401 检查认证,403 检查权限,404 检查账户与广告 ID。409 按 code 处理。限额或暂时故障遵循 Retry-After。422 幂等冲突时,真正的新操作要使用新标识。 ## 操作与字段 error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## 请求示例 GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 解读 API 错误 | 字段 | 文档取值 | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | 来源 · [数据来源](https://adsly.pro/docs/api/errors/) ## Error | 字段 | 字段类型 | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [请求和事件限额](/zh/docs/api/rate-limits/)[安全重试同一操作](/zh/docs/api/idempotency/)[跟踪排队中的操作](/zh/docs/api/tasks/)[逐页读取广告活动](/zh/docs/api/pagination/) 参考资料更新日期 2026-10-08 [上一主题**将 API 文档交给 AI 助手**](/zh/docs/api/ai-assistants/)[下一主题**请求和事件限额**](/zh/docs/api/rate-limits/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 安全重试同一操作 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/idempotency/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 每次创建、复制、批量操作或预算更改时分配新的 Idempotency-Key。重试保持相同的键和请求体。复用同一标识提交不同操作会产生冲突。 [Markdown](/zh/docs/api/idempotency.md) 服务器可能已经收到请求,但响应尚未送达客户端,连接便中断了。直接重试可能导致重复充值或创建两份相同的广告活动。使用 `Idempotency-Key`,服务端就能识别对同一操作的重试。 ## 哪些操作需要幂等键 | 终点 | 首席 | | --- | --- | | `POST /v1/campaigns` | 需要的 | | `POST /v1/campaigns/{ad_id}/copy` | 需要的 | | `POST /v1/campaigns/bulk` | 需要的 | | `POST /v1/campaigns/{ad_id}/budget` | 需要的 | | 其他写作(`PATCH`,暂停/重播,`DELETE`,媒体) | 可选择性——他们可以安全地自己重复 | 没有标题,这些返回`400 IDEMPOTENCY_KEY_REQUIRED`。 ## 如何传递幂等键 生成一个新的随机值——一个UUID——**每一次操作** ,并且每次重试操作时都会发送**同一** 的值. 示例 ``` 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 ``` 示例 ``` 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 ``` ## 重复请求会返回什么 | 情况 | 答案 | | --- | --- | | 使用此密钥的第一个请求 | 正常运行。 | | 同样的密钥,同样的请求,第一个完成 | **存储** 响应,没有改变,头号为`Idempotent-Replayed: true`. 无事再起. | | 同样的密钥,同样的请求,第一个还在运行 | `409 IDEMPOTENCY_IN_PROGRESS`+`Retry-After` 很快再试. | | 相同的密钥, 不同的正文或端点 | `422 IDEMPOTENCY_KEY_REUSED` 新行动需要新密钥. | | 第一个请求以 4xx 结尾( 错误输入, 计划, 队列满满... ) | 密钥发布:将请求修复并用**同一** 密钥发送. | | 第一次请求以5xx结束 | 5xx被存储并重放——变化可能已经达到Telegram,而密钥存在以阻止其运行两次. 以`GET`来检查广告活动,然后使用新密钥,如果您仍然想要行动的话. | “同一请求”是指同一方法、路径和JSON正文(钥匙顺序并不重要)。 ## 密钥处理规则 - 键被标注在您的API个键上——两个集成无法碰撞. - 密钥保存了24小时。 之后, 相同的值开始新的操作 。 - 任意字符串 8–255 字符有效; 一个 UUID 是正确的默认 。 - 如果我们无法记录密钥,操作不会运行,你会得到 `503 IDEMPOTENCY_UNAVAILABLE` 用同一钥匙退出。 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## 实施说明 ## 每项操作一个标识 创建、复制、批量操作和预算划拨必须传 Idempotency-Key。每项操作生成 8–255 字符的随机值,重试时复用。保留 24 小时,关联 API 密钥、方法、路径及 JSON 内容。 ## 并发重试与请求变更 已完成请求回放时带 Idempotent-Replayed: true。仍在处理的重复请求返回 409 和 Retry-After,同键改内容返回 422。4xx 校验错误释放键,遇到已缓存 5xx 先读取实际对象再发起新操作。 ## 操作与字段 Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## 请求示例 GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 安全重试同一操作 | 字段 | 文档取值 | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | 来源 · [数据来源](https://adsly.pro/docs/api/idempotency/) ## 相关阅读 [解读 API 错误](/zh/docs/api/errors/)[请求和事件限额](/zh/docs/api/rate-limits/)[跟踪排队中的操作](/zh/docs/api/tasks/)[逐页读取广告活动](/zh/docs/api/pagination/) 参考资料更新日期 2026-10-08 [上一主题**请求和事件限额**](/zh/docs/api/rate-limits/)[下一主题**跟踪排队中的操作**](/zh/docs/api/tasks/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 修改现有广告活动 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/manage-campaigns/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 可管理文案、链接、出价、每日限额、排期、预算和投放状态。单个批量请求支持最多 1,000 项活动,请查询任务中的局部失败记录。 [Markdown](/zh/docs/api/manage-campaigns.md) 所有电话都需要**管理活动** 和经理(或所有者)进入内阁的钥匙。 他们在一个广告活动中行动,`(account_id, ad_id)`:当钥匙到达多个内阁时,通过`account_id`。 每一次广告活动的历史变化都出现在标有**🔌 API** 的面板上。 | 呼叫 | 它会做什么 | 答案 | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | 更改文本、链接、出价、上限、时间表、打开/关闭 | 即时 | | `POST /v1/campaigns/{ad_id}/pause` | 切换 | 即时 | | `POST /v1/campaigns/{ad_id}/resume` | 转换 | 即时 | | `POST /v1/campaigns/{ad_id}/budget` | 增加或撤回预算 | 即时 | | `DELETE /v1/campaigns/{ad_id}` | 删除 | 即时 | | `POST /v1/campaigns/{ad_id}/copy` | 1 - 100 份 | 202 + [任务](/zh/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | 一项行动,最多1 000项运动 | 第202章 任务 | 直接回答返回更新的[广告活动项目](/zh/docs/api/campaigns/#doc-note-the-campaign-object) 在`data`。 ## 编辑 `PATCH /v1/campaigns/{ad_id}` — 只发送什么变化 。 示例 ``` 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." }' ``` | 田野 | 意义 | | --- | --- | | `title`, `text`, `promote_url` | 创意与链接. | | `cpm` | 新出价,超过0分. | | `daily_budget` | 每日的卡普 | | `views_per_user` | 1–4. | | `active` | `true` / `false` — 与恢复/暂停相同. | | `schedule` | 日以继夜地展示广告;`null`取出——参见[时间表](/zh/docs/api/manage-campaigns/#doc-note-schedule). | | `media`, `picture`, `button`, `website_name` | 和[创建](/zh/docs/api/create-campaigns/#doc-note-fields)年一样 | **关于Telegram的评论** Changing `cpm`,`active`或`schedule`并不使用-它们同时应用,广告活动持续进行. 任何其他领域(`title`,`text`,`promote_url`,`media`,`picture`,`button`,`website_name`,`views_per_user`,`daily_budget`)通过Telegram的完整广告形式保存下来,Telegram再次审查广告:它显示`In Review`直到获得批准. 发送出价,上/下和时间表变化,而不是与这些领域一起. 目标设定(`channels`,`countries`,. ) , 无法改变现有的广告 — — Telegram不允许。 创建新的目标设定运动,或[复制](/zh/docs/api/manage-campaigns/#doc-note-copy)并调整。 答复中`meta`: | 田野 | 意义 | | --- | --- | | `status_warning` | 但Telegram没有应用开关(例如没有预算), | | `status_intent_only` | 您的上/下选择被存储并适用于Telegram可以时(在审查中,没有预算). | | `status_already_set` | 广告活动已经在你要求的状态下进行. | 低于Telegram的标价将`400 PLATFORM_REJECTED`和`param: "cpm"`、`min_cpm`和`currency`回报。 ## 暂停与恢复 示例 ``` 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`意味着Telegram还不能对此采取行动 — — 广告活动正在审查中、被否决或预算外 — — 而你的选择被存储起来:它会尽快运行。 当状态真的改变时,你的[网站状态](/zh/docs/api/webhooks/)起火灾就会发生。 ## 广告投放时段 只有在选定的工作日和时间(比如工作日9:00-18:00)或晚上才进行广告活动。 Telegram小时以外的时间并不展示广告。 设定、更改或删除时间表不会改变或关闭广告活动 — — `status`和`active`保持原样。 它在每个内阁类型上都有效。 示例 ``` 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" } }' ``` | 田野 | 意义 | | --- | --- | | `days` | `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun` 每人都有时间(0~23)的广告在那一天运行。 `9` 意味着 09:00–09:59是的, `[9, …, 17]` 是 9:00–18:00. 有一天你离开,或者发送 `[]`没有跑。 总共至少一个小时。 | | `timezone` | `"viewer"`——每个观众自己的当地时间;只针对观众(`target_type: "users"`),否则,UTC冲抵:`"+03:00"`、`"-05:00"`、`"+05:30"`。Telegram冲抵:从`-12:00`至`+14:00`的全程时间,加上`-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"`和`"+3"`。 | `"schedule": null`移除了时间表——广告再次昼夜跑出. **没有预算的广告活动不能有时间表。** Telegram只接受一个可以展开的广告活动的时间表,所以在`Stopped`的广告活动上,你得到`400 PLATFORM_REJECTED`和`param: "schedule"`一无所有,而且没有任何改变——先增加预算,然后设定日程,暂停的(`On Hold`)广告活动可以顺利进行. 运动对象以相同的形状返回时间表,总是所有7天,并写为`"+03:00"`的抵消——这样你就可以读取,更改一天并发回. `GET /v1/campaigns/{ad_id}`给出了目前的时间表,即使它是在Telegram年直接被更改的——见[新鲜](/zh/docs/api/campaigns/#doc-heading-freshness). 0–23外的小时,未知的一天,空的日程,在频道/bot/搜索广告上的`"viewer"`或抵消Telegram并不能提供~`400 VALIDATION_ERROR`,准确的球场在`param`(例如`schedule.days.mon`). [复印件](/zh/docs/api/manage-campaigns/#doc-note-copy)和重现的广告活动保持了他们来自的广告活动时间表。 为了同时为许多广告活动设定一个时间表,请使用`set_schedule`号大片行动。 ## 广告活动预算 `POST /v1/campaigns/{ad_id}/budget`在内阁和广告活动之间移动金钱,需要`Idempotency-Key`美元。 示例 ``` 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` | 效应 | | --- | --- | --- | | `add` | 需要的 | 内阁平衡-广告活动. | | `withdraw` | 需要的 | 运动 —— 内阁平衡,比运动多 —— `400 INSUFFICIENT_AD_BALANCE`。 | | `withdraw_all` | — | 广告活动中留下的一切 内阁的平衡 | `meta.moved`是实际移动的;`meta.partial`是`true`,因为比要求的要少才能取出。 钱从不通过API离开内阁。 ## 复制广告活动 `POST /v1/campaigns/{ad_id}/copy` 创建具有相同目标的复制件; 任何您发送的复制件都会超过原件。 需要`Idempotency-Key` 。 返回复制件为`ad_ids` 的任务 。 示例 ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | 田野 | 意义 | | --- | --- | | `copies` | 1–100,默认值 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | `budget`:`0` 或至少内阁的`min_budget`。 | | `schedule` | 副本保存原件的[时间表](/zh/docs/api/manage-campaigns/#doc-note-schedule);发送一份来取而代之,或`null`份无。 | | `group_id` / `new_group_name` | 把拷贝放入一组. | ## 删除 示例 ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` 已删除的、 有 `status: "Deleted"` 个数据保留了视图的广告活动被删除。 删除后返回 `404 CAMPAIGN_NOT_FOUND` 。 ## 批量操作 `POST /v1/campaigns/bulk`对一个内阁的多达1 000次广告活动采取了一项行动。需要`Idempotency-Key`次广告活动。 示例 ``` 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` | 额外的田野 | 效应 | | --- | --- | --- | | `pause` | — | 切换 | | `resume` | — | 转换 | | `add_budget` | `amount` | 在每个运动中增加 | | `withdraw_budget` | `amount` | 退出每个运动 | | `withdraw_all_budget` | — | 从每次广告活动中撤走一切 | | `set_cpm` | `cpm` | 给每个都设置相同的出价 | | `set_schedule` | `schedule` | 每个都设置相同的[时间表](/zh/docs/api/manage-campaigns/#doc-note-schedule); `"schedule": null` 移除它 | | `delete` | — | 删除每一个 | 每`ad_id`次必须是该内阁的现场宣传;否则就不会排队,在`missing`年你和罪犯一起得到`400 UNKNOWN_AD_IDS`次。 重复被忽略了。 任务`errors`列出了Telegram次活动被拒绝 — — `set_schedule`次活动,也没有预算,`"timezone": "viewer"`因为没有针对观众而不能申请。 ## 如何暂停单次行动成本过高的广告活动 示例 ``` 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 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## PATCH `/api/v1/campaigns/{ad_id}` 仅更新请求中给出的广告设置。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | | `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" } } ``` ### 请求体结构 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" } ``` 请求结果与响应字段 | API | 含义 | | --- | --- | | status_warning | 字段已保存,但投放开关未能生效,例如预算不足。 | | status_intent_only | 目标状态已记录,待审核或预算条件允许后可生效。 | | status_already_set | 广告活动已处于所请求的状态。 | [跟踪排队中的操作](/zh/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` 请求暂停广告投放。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | | `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` 请求在满足投放条件时恢复广告。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | | `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` 在账户余额和单条广告之间划拨预算。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | 是 | | `X-API-Key` | header | `string` | 是 | 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 } } ``` ### 请求体结构 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` 排队创建最多 100 份副本,继承定向,可覆盖部分设置。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | 是 | | `X-API-Key` | header | `string` | 是 | 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": [] } } ``` ### 请求体结构 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` 对同一账户最多 1,000 条广告排队执行同一操作。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | 是 | | `X-API-Key` | header | `string` | 是 | 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": [] } } ``` ### 请求体结构 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}` 移除广告,保留已有的历史投放统计。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `ad_id` | path | `integer` | 是 | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | | `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 } } ``` ## 实施说明 ## 可编辑字段与时段 修改 cpm、active、schedule 无需重新审核素材,修改素材字段可能触发审核。原有定向保持固定。按星期和 0–23 小时并指定 UTC 偏移,users 定向支持 viewer,设为 null 移除时段。 ## 账户内部预算划拨 add 将额度转入广告。withdraw 转回指定金额,withdraw_all 将剩余预算转回账户。查看 meta.moved 和 meta.partial。外部充值、开票及退款使用账务流程。 ## 受理与完成 创建、复制和批量操作返回 HTTP 202 及任务 ID。按 Retry-After 轮询 GET /api/v1/tasks/{id}。即使状态为 completed,也要检查 failed 和 errors。 ## 操作与字段 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 ## 请求示例 GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 修改现有广告活动 | 字段 | 文档取值 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | 字段 | 字段类型 | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | 字段 | 字段类型 | | --- | --- | | days | object | | timezone | string | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [可访问的广告账户](/zh/docs/api/accounts/)[查询广告活动](/zh/docs/api/campaigns/)[创建广告活动与上传媒体](/zh/docs/api/create-campaigns/)[广告活动与账户统计](/zh/docs/api/stats/)[定向词典与群组](/zh/docs/api/targeting/) 参考资料更新日期 2026-10-08 [上一主题**创建广告活动与上传媒体**](/zh/docs/api/create-campaigns/)[下一主题**广告活动与账户统计**](/zh/docs/api/stats/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 逐页读取广告活动 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/pagination/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 从空 cursor 开始,保持过滤条件不变,使用 meta.next_cursor 翻页直到其为 null。每页最多返回 500 条活动记录。 [Markdown](/zh/docs/api/pagination.md) 仅 `GET /v1/campaigns` 列表使用分页,支持两种模式。 ## 游标分页 首次请求发送空的 `cursor=`,随后使用返回的 `meta.next_cursor`,直到其值为 `null`。 示例 ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` 示例 ``` 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 ``` - 将光标视为不透明。 它仅对相同的过滤器有效 。 - 秩序是固定的(cabinet,后为最新`ad_id`先行),因此页面在加入广告活动的同时保持稳定. - 没有上限——这就是你如何读取一个10万个广告活动的内阁. - 滤镜`bot_username`,`promote_domain`和`type`总是使用光标模式. - cursor 模式省略出几个重字段(目标摘要,媒体,最后动作). 使用[`GET /v1/campaigns/{ad_id}`](/zh/docs/api/campaigns/#doc-note-get-one-campaign)来完整记录一次战役. ## 小型账户的偏移量分页 没有`cursor`,端点页有`limit`和`offset`并可以排序(`sortBy`,`sortOrder`). 它最多读取了**广告账户500个活动** :过去`meta.truncated`是`true`,`meta.next_step`指示您切换到光标模式. 示例 ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## 每页数量 每页 `limit` 可设为 1–500,默认 100。 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 示例 · 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' ``` 示例 · 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' ``` ## 实施说明 ## 读取完整列表 GET /api/v1/campaigns 首次传 cursor= 和筛选条件。下一页保持筛选不变,原样传入 meta.next_cursor,直至 null。limit 为 1–500,默认 100。 ## 排序与偏移限制 游标按账户、再按 ad_id 降序。bot_username、promote_domain、type 会启用该模式。偏移模式支持 sortBy、sortOrder,每账户最多 500 条;meta.truncated 表示需改用游标。 ## 操作与字段 GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## 请求示例 GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 逐页读取广告活动 | 字段 | 文档取值 | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | 来源 · [数据来源](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [解读 API 错误](/zh/docs/api/errors/)[请求和事件限额](/zh/docs/api/rate-limits/)[安全重试同一操作](/zh/docs/api/idempotency/)[跟踪排队中的操作](/zh/docs/api/tasks/) 参考资料更新日期 2026-10-08 [上一主题**跟踪排队中的操作**](/zh/docs/api/tasks/)[下一主题**可访问的广告账户**](/zh/docs/api/accounts/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 请求和事件限额 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/rate-limits/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 读取、写入及入站事件分别限额。公布的限制为每分钟 60 次读取、30 次写入,每秒 20 个转化事件。每个账户的队列另有限制。 [Markdown](/zh/docs/api/rate-limits.md) 每个密钥分别计算读取、写入和转化事件三类配额。看板频繁查询统计不影响暂停广告活动。跟踪系统瞬间上报大量转化也不会占用另外两类配额。 | 预算 | 适用于 | 限制 | | --- | --- | --- | | **阅读** | 每个 `GET` | 每分钟60个请求 | | **写作** | 每`POST`、`PATCH`、`DELETE`,但转换除外 | 每分钟30个请求 | | **转换在** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 每秒20起事件,暴发至1 000起 | 配额持续补充,可在短时间内用完一分钟的可用额度。同步广告活动、统计和汇总数据通常需要 3–4 个读取请求。 需要更多的具体整合吗? 问[@orbitoads](https://t.me/orbitoads)——每个密钥都可以提高限额. ## HTTP 请求头与响应头 每个响应都通过请求配额响应头说明当前限额和剩余额度。 示例 ``` 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 ``` ## 如何减少请求次数 - **是大小而不是子。** 暂停300次运动是一次`POST /v1/campaigns/bulk`次,而不是300次暂停电话。见[管理活动](/zh/docs/api/manage-campaigns/#doc-note-bulk)。 - **用棒子创造。** `POST /v1/campaigns`项运动最多可有100项。 - **网页而不是查询** 状态变化发生时即将到来;时间统计本身即将到来的。 看 [网页](/zh/docs/api/webhooks/). - **巴特克转换** `POST /v1/postback` 每起请求最多接受1 000起事件(每个事件仍以事件预算为计数——批量节省了来回旅行,而不是定额). ## 其他限制 | 什么 | 限制 | | --- | --- | | 每个内阁排队或运行操作 | 5 创建 + 5 其它操作( 副本, 批量) 。 第6 返回 `429 QUEUE_FULL` 。 | | 每个创建请求的广告活动 | 100 | | 每一份副本请求 | 100 | | 按批量请求开展的运动 | 1,000 | | 上传的文件 | 10 MB | | `GET /v1/campaigns`的页码 | 500 | ## 重试前的退避 收到 429 后,等待 `Retry-After` 指定的秒数再重试。自动任务可加入随机延迟,避免多个进程同时重试。 示例 ``` 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); } ``` 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## 实施说明 ## 每个密钥的独立限额 每个密钥每分钟可读 60 次、写 30 次。转化接收为每秒 20 个事件,突发最多 1,000 个;批量提交逐个计数。查阅 X-RateLimit-Limit、X-RateLimit-Remaining、X-RateLimit-Reset。 ## 队列与退避 每账户创建与其他任务分别最多排队或运行五个,两类各自同时执行一个。遇到 429,按 Retry-After 的秒数等待。 ## 操作与字段 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## 请求示例 GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 报告维度 API 的单次创建请求最多 100 项活动,单次复制最多 100 份,单次批量操作最多处理 1,000 项已有活动。202 响应指向排队任务。修改下一组之前,先检查完成任务的 failed 与 errors。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 请求和事件限额 | 字段 | 文档取值 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/rate-limits/) ## 相关阅读 [解读 API 错误](/zh/docs/api/errors/)[安全重试同一操作](/zh/docs/api/idempotency/)[跟踪排队中的操作](/zh/docs/api/tasks/)[逐页读取广告活动](/zh/docs/api/pagination/) 参考资料更新日期 2026-10-08 [上一主题**解读 API 错误**](/zh/docs/api/errors/)[下一主题**安全重试同一操作**](/zh/docs/api/idempotency/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 广告活动与账户统计 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/stats/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 可获取单项活动数据、账户汇总或按货币展示的排名。支持滚动窗口和自定义日期小时范围,导出数据时一并记录时间范围。 [Markdown](/zh/docs/api/stats.md) 统计接口有三种汇总粒度。每个接口都会按账户返回密钥可访问的各个账户的数据。 | 终点 | 回归 | | --- | --- | | `GET /v1/stats` | 期间的每个运动人数 | | `GET /v1/stats/total` | 每个内阁的总和加图表点 | | `GET /v1/stats/analytics` | 按货币、图表、顶级活动划分的总数 | 查询单项广告活动一段时间内的历史数据,请使用 `GET /v1/campaigns/{ad_id}/history`。 [`GET /v1/campaigns/{ad_id}/history`](/zh/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## 报告周期 | `period` | 窗口 | | --- | --- | | `1d` | 最后24小时(`/stats`和`/stats/total`的默认) | | `7d` | 过去 7 天 | | `30d` | 最后30天( `/stats/analytics` 的默认) | | `all` | 所有时间 | | `custom` | `startDate`和`endDate`(`YYYY-MM-DD`),可选`startHour`和`endHour`(0-23) | 任何`h`或`d`也是可行的(`6h`,`14d`,可长达365天 ) 。 一个未识别的值被读作最后24小时 — — 它不会返回错误,所以请检查您的拼写。 所有时间都是UTC 。 示例 ``` # 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 每一次广告活动,由内阁驻巢:`data[account_id][ad_id]`. 示例 ``` { "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" } } ``` 键是字符串;这里的值是**数字** (与广告活动对象不同). `cpa`是每个动作的支出;`ctr`是一个百分比. ## GET /v1/stats/total 仪表板端点:总数和每个柜子的图表. 示例 ``` { "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`分是按时或按时计算. `cabinetType`给出了货币(`euro`~EUR,`ton`~TON,`stars`~恒星). ## GET /v1/stats/analytics 例如`/stats/total`,加上按货币和最高广告活动额划分的支出。 示例 ``` { "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" } } ``` ## 说明 - Stats跟随Telegram自己的计数器,定期同步到Orbito Ads;最新时数随着同步到来而填补. - 永远不要加起来`spent` 横跨不同货币的柜子. - 关于转换,你跟踪自己(铅,存款,销售) [转换](/zh/docs/api/conversions/) - Telegram的`actions`是加入和bot开始,而不是你的转换。 - 最好每几分钟就把[时刻消化 Webhook](/zh/docs/api/webhooks/#doc-heading-hourly_digest)的票数 放在投票统计表上 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## GET `/api/v1/stats` 按账户与广告 ID 读取时段指标。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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` 读取所选时段的账户总计及图表数据点。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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` 读取币种拆分、图表和广告排名。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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" } } ``` ## 实施说明 ## 余额与币种 逐账户核对 currency、balance_updated_at 和 min_budget。广告对象中的金额及费率可能是十进制字符串或 null,统计聚合使用数值。EUR、TON 和 Stars 分开汇总。 ## 周期与 UTC 小时 period 支持 1d、7d、30d、all、custom 及最长 365 天的 Nh/Nd 窗口。custom 必须指定 startDate、endDate,可选 0–23 UTC 的 startHour/endHour。stats、total 默认 1d,analytics 默认 30d。 ## 理解平台行动数 actions 统计加入频道或启动机器人等平台行为。追踪器的线索、购买和收入见 conversions。/stats/analytics 按账户提供图表、总计及 topCampaigns。 ## 操作与字段 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 ## 请求示例 GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 广告活动与账户统计 | 字段 | 文档取值 | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | 来源 · [数据来源](https://adsly.pro/docs/api/stats/) ## StatsNumbers | 字段 | 字段类型 | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [可访问的广告账户](/zh/docs/api/accounts/)[查询广告活动](/zh/docs/api/campaigns/)[创建广告活动与上传媒体](/zh/docs/api/create-campaigns/)[修改现有广告活动](/zh/docs/api/manage-campaigns/)[定向词典与群组](/zh/docs/api/targeting/) 参考资料更新日期 2026-10-26 [上一主题**修改现有广告活动**](/zh/docs/api/manage-campaigns/)[下一主题**定向词典与群组**](/zh/docs/api/targeting/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 定向词典与群组 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/targeting/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 组装请求前先获取国家、语言和主题代码。群组列表可识别已保存的活动文件夹。可缓存词典,并在可用选项变更时刷新。 [Markdown](/zh/docs/api/targeting.md) ## GET /v1/targeting 代码 [`POST /v1/campaigns`](/zh/docs/api/create-campaigns/) 被接受。 这些列表是 Orbito Ads 创建格式 的 。 因此, 这里的代码从未被拒绝 。 示例 ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "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" ] } } ``` | 列表 | 使用在 | 笔记 | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166个双字母代码,外加Telegram个自有的`FT`(匿名号码). | | `languages[].code` | `languages` | Telegram's language keys - e.g. `pt-br`和`pt-pt`,不是`pt`. | | `topics[].id` | `topics`, `exclude_topics` | 数字; ids 不连续 。 | | `buttons` | `button` | 只有在`features.ad_button`是`true`的内阁里 | 这些列表很少变更,获取一次后可缓存一天。 ## 定向组 组合是板块中运动的文件夹。 将新的运动或复制件放入一个有`group_id`( 现有) 或 `new_group_name`( 如果有名称, 则创建或重新使用) 的文件夹 。 ### GET/v1/组 示例 ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` 示例 ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` 没有`account_id`你就能拿到每个内阁的团体钥匙。 一个团体属于一个内阁 — — 另一内阁的`group_id`人被拒绝。 ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## GET `/api/v1/targeting` 读取支持的国家、语言、主题和按钮取值。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | 是 | 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` 列出广告分组,可限定为单个账户。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | 是 | 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" } ] } ``` ## 实施说明 ## 表单可接受的值 原样使用返回的国家和语言代码、数字主题 ID 及按钮值。区域语言如 pt-br 和 pt-pt 分开,使用 button 需账户支持。 ## 分组归属 每组归属一个账户。创建或复制时传该账户的 group_id 或 new_group_name,已有同名组可复用。 ## 操作与字段 GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## 请求示例 GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 受众测试设置 创建结构区分四种定向方式。频道使用 channels,机器人名使用 bots,搜索词使用 search_keywords。国家、语言与主题用于描述用户受众。构建测试前应先读取账户所支持的选项。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 定向词典与群组 | 字段 | 文档取值 | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | 来源 · [数据来源](https://adsly.pro/docs/api/targeting/) ## Targeting | 字段 | 字段类型 | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## Group | 字段 | 字段类型 | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [可访问的广告账户](/zh/docs/api/accounts/)[查询广告活动](/zh/docs/api/campaigns/)[创建广告活动与上传媒体](/zh/docs/api/create-campaigns/)[修改现有广告活动](/zh/docs/api/manage-campaigns/)[广告活动与账户统计](/zh/docs/api/stats/) 参考资料更新日期 2026-10-08 [上一主题**广告活动与账户统计**](/zh/docs/api/stats/)[下一主题**接收广告活动事件**](/zh/docs/api/webhooks/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 跟踪排队中的操作 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/tasks/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 创建、复制和批量修改可能返回 HTTP 202 与任务 ID。轮询任务查看进度、汇总和单项失败,保存最终受影响的活动编号以便核对。 [Markdown](/zh/docs/api/tasks.md) 有些行动每次行动一次会与Telegram谈话,所以它们需要比HTTP请求更长的时间等待。这些返回的`202 Accepted`是**任务** ,而不是最后的结果: - `POST /v1/campaigns` — 创建 - `POST /v1/campaigns/{ad_id}/copy` — 副本 - `POST /v1/campaigns/bulk` — 暂停、 恢复、 预算、 CPM 或删除许多 单场阵容变化(`PATCH`,暂停,恢复,预算,删除)直接回答——没有任务. ## HTTP 202 响应 示例 ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` 示例 ``` { "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} 示例 ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` 和上面的形状一样,在`status`成为最终任务之前,输入它;虽然一个任务是`pending`或`running`,但答复中包含`Retry-After: 2`——在民调之间等待了那么长的时间,任何同一个主人的钥匙都可以读取这个任务. | 田野 | 意义 | | --- | --- | | `type` | `create`、`copy`、`status`(暂停/复发)、`budget`、`cpm`、`delete` | | `status` | 下面看 | | `progress` / `total` | 迄今处理的宣传活动/总数 | | `succeeded` / `failed` | 数,一旦知道 | | `ad_ids` | 运动任务创建( 创建、 复制) 或更改( 块) | | `errors[]` | 最多50个失败: `{ ad_id, index, error }` - `index` 是您`campaigns`阵列中用于创建的位置 。 | | `paused_reason` | e.g. 内阁没有平衡 | | `error` | 整个任务为何失败 | ### 状态 | 状态 | 意义 | 最终? | | --- | --- | --- | | `pending` | 已排队 —— 内阁每次运行一个创建和另一个操作 | 无 | | `running` | 进展中 | 无 | | `paused` | 停止等待 — 通常内阁的平衡在中途就耗尽。 将内阁顶上; 从面板上恢复 | 无 | | `completed` | 完成。 请检查 `failed` 和 `errors` – 完成的任务可以包含单个失败 。 | 是的 | | `failed` | 整个任务失败——见`error` | 是的 | | `cancelled` | 从面板上取消 | 是的 | ## 广告活动创建如何完成 - 新广告活动代号出现在`ad_ids`年任务完成后(在上届广告活动成立后通过内阁同步找到). - 如果一个批次的**第一** 运动失败,任务就停止在那里,而不是重复同样的错误100次. 修正输入并再次发送. - 如果Telegram无法解决任何一个活动的频道或机器人,则该活动将失败。 `No targets found: …` 列出他们。 - Telegram评论了每一个新广告。一个创建的广告活动通常开始`In Review`;一个[网页](/zh/docs/api/webhooks/)告诉你,当它改变的时候。 ## 轮询状态示例 示例 ``` 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)); } } ``` 示例 ``` 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 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 ## GET `/api/v1/tasks/{id}` 读取任务进度、返回的广告 ID 及各项失败信息。 | 参数 | 位置 | 格式 | 必填 | | --- | --- | --- | --- | | `id` | path | `integer` | 是 | | `X-API-Key` | header | `string` | 是 | 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" } } ``` ## 实施说明 ## 受理与完成 创建、复制和批量操作返回 HTTP 202 及任务 ID。按 Retry-After 轮询 GET /api/v1/tasks/{id}。即使状态为 completed,也要检查 failed 和 errors。 ## 任务状态与结果 pending、running、paused 是非终态;completed、failed、cancelled 表示结束。查看 progress、total、ad_ids 及最多 50 条单项错误。paused_reason 可说明需在面板处理的预算不足。 ## 操作与字段 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 ## 请求示例 GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 报告维度 API 的单次创建请求最多 100 项活动,单次复制最多 100 份,单次批量操作最多处理 1,000 项已有活动。202 响应指向排队任务。修改下一组之前,先检查完成任务的 failed 与 errors。 ## 协议参考 | 方法 | 路径 | 参数 | 请求内容 | 响应码 | | --- | --- | --- | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 结构字段与限制 · 跟踪排队中的操作 | 字段 | 文档取值 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/tasks/) ## Task | 字段 | 字段类型 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/openapi.yaml) ## 相关阅读 [解读 API 错误](/zh/docs/api/errors/)[请求和事件限额](/zh/docs/api/rate-limits/)[安全重试同一操作](/zh/docs/api/idempotency/)[逐页读取广告活动](/zh/docs/api/pagination/) 参考资料更新日期 2026-10-08 [上一主题**安全重试同一操作**](/zh/docs/api/idempotency/)[下一主题**逐页读取广告活动**](/zh/docs/api/pagination/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # 接收广告活动事件 [Orbito Ads · 简体中文 · HTML](https://orbitoads.pro/zh/docs/api/webhooks/) 来源核对日期 · 2026-11-27 ### 浏览文档 [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [全部文档](/zh/docs/) 快速入门 - [API 快速入门](/zh/docs/api/) - [密钥与账户权限](/zh/docs/api/authentication/) - [将 API 文档交给 AI 助手](/zh/docs/api/ai-assistants/) 基础概念 - [解读 API 错误](/zh/docs/api/errors/) - [请求和事件限额](/zh/docs/api/rate-limits/) - [安全重试同一操作](/zh/docs/api/idempotency/) - [跟踪排队中的操作](/zh/docs/api/tasks/) - [逐页读取广告活动](/zh/docs/api/pagination/) API 参考 - [可访问的广告账户](/zh/docs/api/accounts/) - [查询广告活动](/zh/docs/api/campaigns/) - [创建广告活动与上传媒体](/zh/docs/api/create-campaigns/) - [修改现有广告活动](/zh/docs/api/manage-campaigns/) - [广告活动与账户统计](/zh/docs/api/stats/) - [定向词典与群组](/zh/docs/api/targeting/) 集成 - [接收广告活动事件](/zh/docs/api/webhooks/) - [发送已确认的转化](/zh/docs/api/conversions/) - [API 版本与更新](/zh/docs/api/changelog/) 文件与架构 - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/zh/docs/llms.txt) - [llms-full.txt](/zh/docs/llms-full.txt) [Orbito Ads](/zh/) [文档](/zh/docs/) [API](/zh/docs/api/) 文档区分 status_change、hourly_digest 和测试 ping。通过 HTTPS 接收回调,用原始请求体校验签名,并在处理前对重复投递去重。 [Markdown](/zh/docs/api/webhooks.md) 如需接收事件而不轮询 API,请在“API 与 Webhook”的密钥卡片中设置 Postback URL。Orbito Ads 会通过 POST 向该地址发送此密钥可访问账户的事件,并用该密钥的 Webhook 签名密钥为每次投递签名。 ## 事件 | 事件 | 当时 | | --- | --- | | `status_change` | 一场运动的状况发生了变化(在评论中 ) , 活跃的,活跃的,停止的。 每次内阁同步后,当运动在小组中或通过API运动时,即刻发出。 | | `hourly_digest` | 每小时5分钟,小时数刚刚关闭,每个柜子一个POST小时。 没有看到、点击或花费的小时被跳过。 | | `ping` | 当你按**测试** 键。 | ### status_change 示例 ``` { "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 示例 ``` { "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` 最多列出花费最高的 200 个广告活动。若有更多活动发生变化,`truncated` 会列出被省略的数量。`totals` 始终统计全部活动,金额使用账户币种。 ## HTTP 请求头与响应头 示例 ``` 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= ``` ## 验证签名 把 `X-Orbito-Timestamp`、一个英文句点和原始请求体的字节拼接起来。用创建密钥或轮换 Webhook 密钥时显示的签名密钥计算 HMAC-SHA256。在解析 JSON 之前验证签名,因为重新序列化会改变字节。拒绝超过五分钟的请求。 ### Node.js (快递) 示例 ``` 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 (弗拉克语) 示例 ``` 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 ``` ## 事件投递 - 您的端点必须是公开的**HTTPS** `http://`, 本地主机和私人地址被拒绝。 - 回答**10秒** 之内的`2xx`。回答后要慢一点。 - 在网络错误或`5xx`上,我们重试**一次** 分,750毫秒后,同样的`X-Orbito-Delivery`分,A`4xx`分机没有重试. - 改行不随入. - 面板上的密钥卡显示最后交付的时间、状态和出错。 ## Webhook 可接收哪些账户的事件 密钥只会收到其权限范围内的账户事件。代理机构成员可收到与其共享的账户事件。一旦撤销访问权限,相关事件立即停止投递。 [关键与访问](/zh/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## 发送测试事件 在密钥卡片中点击“测试”,即可收到与实际事件采用相同签名方式的 `ping` 事件。 示例 ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## API 参考 完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。 示例 · 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" } ] } ``` ## 实施说明 ## 事件与回调设置 在供应商密钥设置登记公开 HTTPS 回调。status_change 推送状态变更,hourly_digest 在每小时第 05 分钟汇总活跃账户,ping 测试投递。配置流程独立于这里的 22 项 HTTP 操作。 ## 签名与再次投递 用 webhook 密钥对时间戳、一个点及原始请求字节计算 HMAC-SHA256。拒绝五分钟前的时间戳,十秒内响应 2xx。网络错误或 5xx 会在 750 毫秒后以同一投递 ID 重试一次。 ## 操作与字段 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} ## 结构字段与限制 本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。 ## 时间范围 · hourly_digest hourly_digest 回调汇总刚结束的一小时,并在整点后五分钟为有流量的账户发送。请保存统计时段、账户 ID 和投递 ID。事件发生时间与接收服务器的到达时间应分列。 ## 结构字段与限制 · 接收广告活动事件 | 字段 | 文档取值 | | --- | --- | | 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 | 来源 · [数据来源](https://adsly.pro/docs/api/webhooks/) ## 相关阅读 [发送已确认的转化](/zh/docs/api/conversions/)[API 版本与更新](/zh/docs/api/changelog/) 参考资料更新日期 2026-10-08 [上一主题**定向词典与群组**](/zh/docs/api/targeting/)[下一主题**发送已确认的转化**](/zh/docs/api/conversions/) ## 来源与数据 - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # डेवलपर संदर्भ [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) दस्तावेज़ संदर्भ में खाते, अभियान संचालन, आँकड़े और इवेंट डिलीवरी हैं। पहले केवल-पढ़ने वाली कुंजी से उपलब्ध खातों की सूची देखें। [दस्तावेज़ सूची देखें](/hi/docs/llms.txt) [API कुंजियाँ](/api-keys?lang=en) यह दस्तावेज़ बताता है कि अपने ऐप से Orbito Ads कैसे चलाएँ। API से आँकड़े पढ़ें, अभियान बनाएँ, बोली और विज्ञापन टेक्स्ट बदलें, अभियान रोकें या फिर शुरू करें और बजट स्थानांतरित करें। सभी खातों में एक ही API कुंजी और तरीके लागू होते हैं। ## API - [**Quickstart के बारे में** कुंजी, पहला अनुरोध और आपके पहले अभियान के माध्यम से API - लगभग पांच मिनट।](/hi/docs/api/) - [**कुंजी और पहुंच** केवल पढ़ने और अभियान-प्रबंधन कुंजी, जिसमें विज्ञापन एक कुंजी पहुंच की गणना, एजेंसी टीमों।](/hi/docs/api/authentication/) - [**अभियान बनाएं** चैनल, बॉट, खोज और दर्शकों को लक्षित करना, एक या एक सारा कॉल प्रति अभियान।](/hi/docs/api/create-campaigns/) - [**अभियानों का प्रबंधन** संपादित करें, रुकें और पुन:, बजट को स्थानांतरित करें, कॉपी करें, हटाएं - एक अभियान या एक हजार।](/hi/docs/api/manage-campaigns/) - [**Webhooks के बारे में** रियल टाइम में हस्ताक्षर किए गए स्थिति परिवर्तन और एक घंटे के आंकड़े पचते हैं।](/hi/docs/api/webhooks/) - [**एक एआई सहायक के साथ बनाया** इन दस्तावेजों को क्लॉड कोड या किसी अन्य कोडिंग एजेंट को भेजें और उन्हें एकीकरण लिखने दें।](/hi/docs/api/ai-assistants/) ## बेस URL और प्रमाणीकरण उदाहरण ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` पैनल में कुंजी बनाएं: [API Webhooks के बारे में](/api-keys?lang=en) (प्रो और एजेंसी योजनाओं) सवालों के लिए - [@orbitoads](https://t.me/orbitoads). ## मशीन-पठनीय प्रारूप - [OpenAPI 3.1 स्पेक्ट्रम](/docs/api/openapi.yaml) - प्रत्येक अंत बिंदु, पैरामीटर और त्रुटि कोड। - [llms.txt](/docs/llms.txt) — सूचकांक AI एजेंट पढ़े; [llms-full.txt](/docs/llms-full.txt) — एक फ़ाइल में सभी पृष्ठों। - प्रत्येक पृष्ठ में एक मार्कडाउन जुड़वां है: अपने मार्ग में `.md` जोड़ें, e.g . [/docs/api.md](/docs/api.md) । पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## कार्यान्वयन संबंधी नोट्स ## वर्कस्पेस जोड़ना पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ### डेवलपर गाइड और खाता पहुँच **API की शुरुआत** API की शुरुआत — सर्वर की कुंजी से खाते सूचीबद्ध करें। एक खाता चुनकर उसके अभियान पढ़ें। पहली बार लिखते समय नई इडेम्पोटेंसी कुंजी से रोका हुआ ड्राफ़्ट बनाएँ और लौटे टास्क को देखें। [**API की शुरुआत**](/hi/docs/api/) **कुंजियाँ और खाता अनुमतियाँ** कुंजियाँ और खाता अनुमतियाँ — सर्वर से X-API-Key हेडर में कुंजी भेजें। एक, कई या सभी अनुमत खाते चुनें। लिखने के लिए अभियान प्रबंधन कुंजी और खाते के प्रबंधक या स्वामी की भूमिका चाहिए। [**कुंजियाँ और खाता अनुमतियाँ**](/hi/docs/api/authentication/) **अभियान और मीडिया बनाना** अभियान और मीडिया बनाना — एक अनुरोध एक खाते में 100 अभियान स्वीकार करता है। चैनल, बॉट, खोज या दर्शक चुनें, नई ऑपरेशन कुंजी दें और टास्क देखें। [**अभियान और मीडिया बनाना**](/hi/docs/api/create-campaigns/) **मौजूदा अभियान बदलना** मौजूदा अभियान बदलना — टेक्स्ट, लिंक, बोली, दैनिक सीमा, समय, बजट और डिलीवरी बदलें। बैच में अधिकतम 1,000 अभियान आते हैं। टास्क में आंशिक विफलता जाँचें। [**मौजूदा अभियान बदलना**](/hi/docs/api/manage-campaigns/) **अभियान के इवेंट प्राप्त करना** अभियान के इवेंट प्राप्त करना — संदर्भ में status_change, hourly_digest और परीक्षण ping हैं। HTTPS पर लें, मूल बॉडी से हस्ताक्षर जाँचें और दोहराए गए इवेंट हटाएँ। [**अभियान के इवेंट प्राप्त करना**](/hi/docs/api/webhooks/) **AI असिस्टेंट के लिए API संदर्भ** AI असिस्टेंट के लिए API संदर्भ — फ़ील्ड के लिए OpenAPI और व्यवहार के लिए Markdown देखें। असली कुंजियाँ सर्वर पर रखें। अभियान बदलने से पहले पढ़ने की जाँच करें। [**AI असिस्टेंट के लिए API संदर्भ**](/hi/docs/api/ai-assistants/) [API कुंजियाँ और वेबहुक प्रबंधित करें](/api-keys?lang=en) ## पहला अनुरोध X-API-Key सहित GET /api/v1/account/info भेजें। data से id चुनकर अगले अनुरोध में account_id दें। उदाहरणों के सभी मान और ID काल्पनिक हैं। ## कार्रवाइयाँ और फ़ील्ड /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## अनुरोध का उदाहरण GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ### मशीन-पठनीय संदर्भ [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/hi/docs/api.md) ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · डेवलपर दस्तावेज़ | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/) ## Cabinet | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [API की शुरुआत](/hi/docs/api/)[कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/)[अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/)[मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/)[अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) [अगला विषय**API की शुरुआत**](/hi/docs/api/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API की शुरुआत [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) API सर्वर की कुंजी से खाते सूचीबद्ध करें। एक खाता चुनकर उसके अभियान पढ़ें। पहली बार लिखते समय नई इडेम्पोटेंसी कुंजी से रोका हुआ ड्राफ़्ट बनाएँ और लौटे टास्क को देखें। [Markdown](/hi/docs/api.md) Orbito Ads API से आप अपने ऐप में Telegram Ads खाते वैसे ही चला सकते हैं जैसे पैनल में। Euro, TON और Stars खातों के लिए एक ही कुंजी, बेस URL और तरीके काम करते हैं। | आप चाहते हैं... | उपयोग करें | | --- | --- | | एक डैशबोर्ड या BI में अभियानों और आंकड़ों को डालें | [अभियान](/hi/docs/api/campaigns/), [राज्यों](/hi/docs/api/stats/) | | एक स्क्रिप्ट, बोट या आपके CRM से अभियान लॉन्च करें | [अभियान बनाएं](/hi/docs/api/create-campaigns/) | | उतार-चढ़ाव, ब्रेक हारने वालों, शीर्ष जीतने वालों स्वचालित रूप से | [अभियानों का प्रबंधन](/hi/docs/api/manage-campaigns/) | | यह जानने के लिए कि एक अभियान कब अनुमोदित, रद्द या बजट से बाहर निकलता है | [Webhooks के बारे में](/hi/docs/api/webhooks/) | | प्रत्येक अभियान के खिलाफ अपने ट्रैकर से लीड और बिक्री की गिनती करें | [रूपांतरण](/hi/docs/api/conversions/) | ## बेस URL उदाहरण ``` https://orbitoads.pro/api/v1 ``` प्रत्येक अनुरोध `X-API-Key` शीर्षक में अपना कुंजी ले जाता है. अनुरोध और उत्तर शरीर JSON हैं. सभी समय UTC हैं. ## त्वरित शुरुआत ### 1. एक कुंजी बनाएं पैनल में **API Webhooks के बारे में** → **+ नई कुंजी** (Pro और Agency योजनाएं) खोलें. चुनें कि कौन से कैबिनेट कुंजी पहुंचती है. अभियानों को बनाने और बदलने के लिए, **अभियानों का प्रबंधन करने की अनुमति** टैप करें – इसके बिना कुंजी केवल पढ़ती है. कुंजी को कॉपी करें: यह एक बार दिखाई देता है. उदाहरण ``` export ORBITO_API_KEY="orb_…" ``` ### 2. कुंजी देखने वाले कार्यालयों की सूची उदाहरण ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "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` रखें - यह `account_id` है हर अन्य कॉल का उपयोग करता है. एक कैबिनेट में सभी पैसे अपने `currency` में हैं. ### 3. अभियानों को पढ़ना उदाहरण ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4. एक अभियान बनाएं (उत्तरित करें, इसलिए कुछ भी खर्च नहीं किया जाता है) उदाहरण ``` 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"] }' ``` Telegram पर वार्तालाप बनाएं , इसलिए यह पृष्ठभूमि में चलता है. आपको `202 Accepted` मिलता है और एक कार्य: उदाहरण ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5. कार्य के लिए इंतजार करें उदाहरण ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` जब `status` `completed` है, तो `ad_ids` नए अभियान का आईडी रखता है. अब आप इसे वित्त पोषित कर सकते हैं और इसे स्विच कर सकते हैं: उदाहरण ``` 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 हर नए विज्ञापन की समीक्षा करता है इससे पहले कि यह चलता है; अभियान के `status` यह दिखाता है कि वह कहां है (देखें) [स्थिति](/hi/docs/api/campaigns/#doc-note-statuses)). A [Webhook के बारे में](/hi/docs/api/webhooks/) वह आपको बताता है कि यह बदलने का समय है। ## इंटीग्रेशन के पाँच नियम 1. **`ad_id` यह केवल एक विज्ञापन खाते के अंदर अद्वितीय है।** Telegram कैबिनेटों के माध्यम से विज्ञापन आईडी का पुन: उपयोग करता है. `(account_id, ad_id)` जोड़े द्वारा अभियानों को स्टोर और देखें, और `account_id` पारित करें जब भी एक कुंजी एक से अधिक कैबिनेट देखती है. 2. **भेजें एक `Idempotency-Key` बनाना, कॉपी करना, बड़े पैमाने पर और बजट कॉल** - एक ताजा UUID प्रति ऑपरेशन, जब आप इसे वापस लेते हैं तो एक वापसी फिर कभी दूसरी अभियान नहीं बनाती है या पैसे को दो बार स्थानांतरित करती है. देखें [अभाव](/hi/docs/api/idempotency/) . 3. **एक कार्य बनाएं, कॉपी करें और बड़े पैमाने पर वापस करें।** पॉल `GET /v1/tasks/{id}` जब तक यह समाप्त नहीं होता. देखें [कार्यों](/hi/docs/api/tasks/) . 4. **पैसे के क्षेत्रों में तार हैं** ( `"spent": "3.541000"` ) को सटीक दशकों को बनाए रखने के लिए. उन्हें दशकों के रूप में विभाजित करें, इससे पहले कि आरिथ्मेटिक करें. 5. **शाखा में `code`, प्रदर्शित `error`.** हर त्रुटि में एक स्थिर मशीन-पढ़ने योग्य है `code` और एक मानवीय फैसले में `error`. देखें [त्रुटियां](/hi/docs/api/errors/). ## जवाब की संरचना उदाहरण ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## अगले कदम - [कुंजी और पहुंच](/hi/docs/api/authentication/) - केवल पढ़ने के खिलाफ अभियान-प्रबंधन कुंजी, एजेंसी टीमों। - [क्लॉड और अन्य एआई सहायक के साथ बनाएं](/hi/docs/api/ai-assistants/) - एक कोडिंग एजेंट को एकीकरण लिखने दें। - [OpenAPI SPEC के बारे में](/docs/api/openapi.yaml) - Postman, Insomnia या एक क्लाइंट जनरेटर में आयात। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। उदाहरण · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` उदाहरण · 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 } } ] } ``` ## कार्यान्वयन संबंधी नोट्स ## पहला अनुरोध X-API-Key सहित GET /api/v1/account/info भेजें। data से id चुनकर अगले अनुरोध में account_id दें। उदाहरणों के सभी मान और ID काल्पनिक हैं। ## अकाउंट और अभियान ID account_id और ad_id साथ रखें। अलग अकाउंट में वही ad_id हो सकता है। कई अकाउंट वाले कुंजी अनुरोध में सही रिकॉर्ड के लिए account_id दें। ## स्वीकृति और पूर्णता बनाने, कॉपी और बल्क अनुरोध HTTP 202 तथा काम का id देते हैं। Retry-After के अनुसार GET /api/v1/tasks/{id} जाँचें। completed पर भी failed और errors पढ़ें। ## कार्रवाइयाँ और फ़ील्ड 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} ## अनुरोध का उदाहरण GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · API की शुरुआत | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/) ## CampaignStatus | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [डेवलपर दस्तावेज़](/hi/docs/)[कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/)[AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**डेवलपर दस्तावेज़**](/hi/docs/)[अगला विषय**कुंजियाँ और खाता अनुमतियाँ**](/hi/docs/api/authentication/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # उपलब्ध विज्ञापन खाते [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/accounts/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) सूची में हर खाते की मुद्रा, बैलेंस, पहुँच और समर्थित फ़ील्ड दिखते हैं। अभियान ID के साथ account_id सहेजें। [Markdown](/hi/docs/api/accounts.md) Orbito का हर कैबिनेट एक Telegram Ads विज्ञापन खाता है। हर अभियान एक ही खाते का होता है, जिसकी पहचान `account_id` से होती है। ## GET /v1/account/info यह विधि वे खाते लौटाती है जिन तक इस कुंजी की अभी पहुँच है। उदाहरण ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "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 } } ] } ``` | फ़ील्ड | अर्थ | | --- | --- | | `id` | `account_id` अन्य कॉल के लिए स्थानांतरित करने के लिए। | | `cabinet_type` | `euro`, `ton` या `stars`। | | `currency` | `EUR`, `TON` या `STARS` - इस कैबिनेट में **हर** पैसे के क्षेत्र का मुद्रा: संतुलन, बजट, खर्च, CPM। | | `access_level` | आपकी पहुंच : `owner`, `manager` (एक एजेंसी सदस्य जो अभियानों को बदल सकता है) या `viewer` (अनुच्छेद के सदस्य, केवल पढ़ने के लिए) लेखन की आवश्यकता `owner` या `manager`. | | `balance` | कैबिनेट पर पैसा, अभी तक अभियानों के लिए नहीं दिया गया है (दसवीं श्रृंखला)। जब कैबिनेट सिंक्रनाइज़ करते हैं तो उजागर किया गया - देखें `balance_updated_at` । | | `min_budget` | सबसे छोटा गैर शून्य `budget` इस कैबिनेट में एक नई अभियान हो सकता है। | | `features.ad_button` | कैबिनेट के विज्ञापन फॉर्म में एक कस्टम बटन (संपादित/संपादित करने के लिए `button` फ़ील्ड) है। | | `features.crypto_filters` | कैबिनेट के विज्ञापन फॉर्म में क्रिप्टो-चैनल फ़िल्टर हैं। | समायोजित आँकड़े दिखाने वाली विशेष पार्टनर कुंजियों में `balance` का मान `null` होता है। ## टिप्पणियाँ - `GET /v1/account/info` एक पढ़ने के अनुरोध की लागत है - इसे स्टार्ट-अप पर कॉल करें और जब एक लिखित वापस आता है `ACCOUNT_NOT_FOUND` , हर कॉल से पहले नहीं। - एक कैबिनेट सूची से गायब हो जाता है जब यह निष्क्रिय हो जाता है या आपके एक्सेस को हटा दिया जाता है। - Orbito Ads पैनल में कैबिनेट जोड़े जाते हैं; API उनके भीतर अभियानों का प्रबंधन करता है। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## GET `/api/v1/account/info` कुंजी से उपलब्ध अकाउंट, मुद्राएँ, सीमाएँ और भूमिकाएँ सूचीबद्ध करें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | हाँ | 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 } } ] } ``` ## कार्यान्वयन संबंधी नोट्स ## बैलेंस और मुद्राएँ हर अकाउंट में currency, balance_updated_at और min_budget देखें। अभियान में राशि व दर दशमलव स्ट्रिंग या null हो सकती हैं। रिपोर्ट योग संख्याएँ हैं। EUR, TON और Stars अलग रखें। ## सुविधा उपलब्धता features.ad_button से कस्टम बटन और features.crypto_filters से क्रिप्टो चैनल फ़िल्टर का समर्थन पता चलता है। क्रिया दिखाने से पहले is_active और access_level पढ़ें। ## कार्रवाइयाँ और फ़ील्ड GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## अनुरोध का उदाहरण GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · उपलब्ध विज्ञापन खाते | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/accounts/) ## Cabinet | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## Money | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | Money | string \| null | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [अभियान की जानकारी देखना](/hi/docs/api/campaigns/)[अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/)[मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/)[अभियान और खाते के आँकड़े](/hi/docs/api/stats/)[टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**अभियान के पेज पढ़ना**](/hi/docs/api/pagination/)[अगला विषय**अभियान की जानकारी देखना**](/hi/docs/api/campaigns/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # AI असिस्टेंट के लिए API संदर्भ [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/ai-assistants/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) फ़ील्ड के लिए OpenAPI और व्यवहार के लिए Markdown देखें। असली कुंजियाँ सर्वर पर रखें। अभियान बदलने से पहले पढ़ने की जाँच करें। [Markdown](/hi/docs/api/ai-assistants.md) ये पृष्ठ डेवलपर और कोडिंग असिस्टेंट दोनों के लिए हैं। हर पृष्ठ Markdown में है, पूरा संग्रह एक फ़ाइल में मिलता है और API का विनिर्देश OpenAPI में है। असिस्टेंट को अपने काम से जुड़े लिंक दें। ## AI एजेंटों के लिए फ़ाइलें | फ़ाइल | क्या है | कब इस्तेमाल करें | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | प्रत्येक पृष्ठ का सूचकांक, एक-लाइन सारांशों के साथ ( [लम्बेड.txt प्रारूप](https://llmstxt.org/) ) | एजेंट को उन पृष्ठों को चुनने दें जिनकी उसे आवश्यकता है | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | सभी पृष्ठ एक मार्क-डाउन फ़ाइल में (लगभग 80 KB ) | टूल जो एक बड़ा फ़ाइल पूरे लोड करते हैं; वेब-फैच टूल इसे छोटा कर सकते हैं, इसलिए `llms.txt` + पृष्ठों को वहां पसंद करें | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec: अंत बिंदु, पैरामीटर, योजनाएं, त्रुटि कोड | टाइप किए गए ग्राहक, अनुरोध वैधता, पोस्टमैन | | `.md` | पृष्ठ के रूप में Markdown, e.g . [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | एक ही विषय | प्रत्येक पृष्ठ के शीर्ष पर **पृष्ठ को Markdown के रूप में कॉपी करें** भी है - इसे सीधे एक चैट में डालें। ## Claude Code से API जोड़ने का प्रॉम्प्ट इस परियोजना में Claude Code (या अन्य कोडिंग एजेंट) में डालें जो Orbito Ads पर बात करना चाहिए. अंतिम पैराग्राफ को संपादित करें ताकि आप बता सकें कि आप क्या बना रहे हैं. उदाहरण ``` इस प्रोजेक्ट में Orbito Ads API जोड़ें। कोड लिखने से पहले https://orbitoads.pro/hi/docs/llms.txt और उसमें सूचीबद्ध प्रासंगिक Markdown पृष्ठ पढ़ें। पूरा दस्तावेज़ https://orbitoads.pro/hi/docs/llms-full.txt पर और OpenAPI विनिर्देश https://orbitoads.pro/docs/api/openapi.yaml पर है। - बेस URL https://orbitoads.pro/api/v1 और X-API-Key हेडर का उपयोग करें। कुंजी ORBITO_API_KEY एनवायरनमेंट वैरिएबल से पढ़ें। इसे सोर्स कोड या लॉग में न लिखें। - अभियान को (account_id, ad_id) से पहचानें। अलग-अलग खातों में एक ही ad_id हो सकता है। - /campaigns, /campaigns/bulk, /campaigns/{id}/copy या /campaigns/{id}/budget पर हर नए POST के लिए Idempotency-Key में नया UUID भेजें। उसी कार्रवाई को दोहराते समय वही UUID भेजें। - बनाने, कॉपी करने और बल्क बदलावों पर 202 और एक टास्क मिलता है। Retry-After के अनुसार GET /tasks/{id} से स्थिति जाँचें, जब तक completed या failed न मिले। - राशियाँ दशमलव स्ट्रिंग के रूप में मिलती हैं। तुलना से पहले सटीकता बनाए रखते हुए उन्हें दशमलव संख्या में बदलें। - 429 मिलने पर Retry-After में बताई अवधि तक प्रतीक्षा करें। बदलाव के दौरान 5xx आए तो नई Idempotency-Key से दोबारा कोशिश करने से पहले GET से अभियान की स्थिति पढ़ें। - कोड के निर्णय के लिए code और उपयोगकर्ता को संदेश दिखाने के लिए error फ़ील्ड इस्तेमाल करें। - टाइप सहित विधियों वाला छोटा क्लाइंट और नकली HTTP जवाबों का उपयोग करने वाले टेस्ट लिखें। आवश्यक सुविधा: <उदाहरण के लिए, हर घंटे खाते 53 में वे अभियान रोकें जिनका पिछले 24 घंटों का CPA, 4 EUR से अधिक है>। ``` ## चैट में एक बार के काम का प्रॉम्प्ट कोडबेस परिवर्तन के बजाय एक प्रश्न के लिए ( Claude.ai, ChatGPT या वेब एक्सेस के साथ किसी भी चैट के लिए): उदाहरण ``` https://orbitoads.pro/hi/docs/llms.txt और अभियान व आँकड़ों के लिए बताए गए पृष्ठ पढ़ें। Orbito Ads API के लिए Python स्क्रिप्ट लिखें जो मेरे खातों के सभी Active अभियान दिखाए, हर अभियान का पिछले 7 दिनों का खर्च दे और सूची को खर्च के अनुसार क्रमबद्ध करे। कुंजी ORBITO_API_KEY से पढ़ें। ``` ## प्रोजेक्ट की CLAUDE.md फ़ाइल के नियम यदि आपके प्रोजेक्ट में `CLAUDE.md` है (Claude Code इसे प्रत्येक सत्र की शुरुआत में पढ़ता है), तो इस ब्लॉक को जोड़ें ताकि किसी भी भविष्य के परिवर्तन में एकीकरण के लिए उसी नियम का पालन किया जा सके: उदाहरण ``` ## Orbito Ads API का इंटीग्रेशन - किसी कॉल को बदलने से पहले https://orbitoads.pro/hi/docs/llms.txt, संबंधित .md पृष्ठ और https://orbitoads.pro/docs/api/openapi.yaml देखें। एंडपॉइंट और फ़ील्ड के नाम विनिर्देश से लें। - ORBITO_API_KEY को एनवायरनमेंट से पढ़ें। इसे कमिट, टर्मिनल आउटपुट या लॉग में शामिल न करें। - अभियान की पहचान (account_id, ad_id) है। अभियान बनाने या राशि स्थानांतरित करने वाले हर POST में Idempotency-Key दें। हर कार्रवाई का अपना UUID हो और उसकी पुनः कोशिश में वही UUID रहे। - बनाने, कॉपी करने और बल्क कार्यों के लिए GET /v1/tasks/{id} जाँचें। लाइव अभियान का बजट बदलना, रोकना और हटाना एक ही परीक्षित मॉड्यूल से करें। प्रोडक्शन में कोई तदर्थ स्क्रिप्ट चलाने से पहले अनुमति लें। ``` ## एजेंट की अनुमतियाँ और सुरक्षा - **एक पढ़ने-केवल कुंजी के साथ विक्रेता।** एजेंट वास्तविक डेटा का पता लगा सकता है और कुछ भी नहीं बदल सकता. **अभियानों का प्रबंधन** के साथ एक कुंजी पर स्विच करें केवल जब लिखित कोड की समीक्षा की जाती है. - **अभियानों के साथ `"active": false` और `"budget": 0` परीक्षण के दौरान।** कुछ भी नहीं चलता और कुछ भी खर्च नहीं किया जाता है; बाद में उन्हें हटा दें। - **कुंजी के दायरे को कम करें** एक परीक्षण कैबिनेट के लिए जबकि एकीकरण नया है। - **एजेंट को त्रुटियों को पढ़ने दें।** हर त्रुटि बताती है कि क्या ठीक करना है ( `error` ) और एक स्थिर `code` और `param` लाता है जो गलत था - एजेंट इन से अपने स्वयं के अनुरोधों को ठीक करते हैं बिना किसी हिचकिचाहट के। - सभी API परिवर्तन पैनल के अभियान इतिहास में **🔌 API** को चिह्नित करते हैं, इसलिए आप समीक्षा कर सकते हैं कि एजेंट ने क्या किया। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। उदाहरण · 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' ``` ## कार्यान्वयन संबंधी नोट्स ## कुंजी और अकाउंट अनुमतियाँ X-API-Key सर्वर पर रखें। रिपोर्ट के लिए पढ़ने की अनुमति काफ़ी है। बदलाव के लिए अभियान प्रबंधन, चुने अकाउंट पर मालिक या मैनेजर भूमिका और संबंधित सक्रिय प्लान अधिकार चाहिए। ## दोहराने योग्य एकीकरण ब्रीफ़ स्थानीय OpenAPI, काल्पनिक अकाउंट id, क्रिया, अपेक्षित उत्तर और पुनः प्रयास परीक्षण दें। असली कुंजी सर्वर सीक्रेट स्टोर से पढ़े। रिपोर्टिंग अकाउंट और अभियान सूची से शुरू करें। ## कार्रवाइयाँ और फ़ील्ड /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 ## अनुरोध का उदाहरण GET /docs/api/openapi.yaml ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · AI असिस्टेंट के लिए API संदर्भ | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/ai-assistants/) ## संबंधित गाइड [डेवलपर दस्तावेज़](/hi/docs/)[API की शुरुआत](/hi/docs/api/)[कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**कुंजियाँ और खाता अनुमतियाँ**](/hi/docs/api/authentication/)[अगला विषय**API त्रुटियाँ समझना**](/hi/docs/api/errors/) ## स्रोत और डेटा - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # कुंजियाँ और खाता अनुमतियाँ [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/authentication/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) सर्वर से X-API-Key हेडर में कुंजी भेजें। एक, कई या सभी अनुमत खाते चुनें। लिखने के लिए अभियान प्रबंधन कुंजी और खाते के प्रबंधक या स्वामी की भूमिका चाहिए। [Markdown](/hi/docs/api/authentication.md) ## कुंजी कैसे भेजें हर अनुरोध में API कुंजी HTTP हेडर में भेजें। उदाहरण ``` X-API-Key: orb_0f3c… (68 वर्ण: orb_ के बाद 64 हेक्साडेसिमल अंक) ``` अनुरोध का प्रमाणीकरण कुंजी से ही होता है। OAuth या टोकन का आदान-प्रदान आवश्यक नहीं है। कुंजी अपने सर्वर पर रखें। उसे ब्राउज़र या मोबाइल ऐप में न भेजें। ## कुंजी कैसे पाएँ पैनल में “API और वेबहुक” खोलें और “नई कुंजी” चुनें। Pro और Agency प्लान में हर व्यक्ति 5 सक्रिय कुंजियाँ रख सकता है। नई कुंजी बनते ही कॉपी करें। वह एक बार दिखती है और सर्वर केवल उसका SHA-256 हैश रखता है। खोने पर उसे रद्द करके नई कुंजी बनाएँ। ## कुंजी की अनुमतियाँ | अनुमति | इसे कैसे प्राप्त करें | क्या यह अनुमति देता है | | --- | --- | --- | | **पढ़ाई** | हर कुंजी | अभियान, आंकड़े, रूपांतरण, कार्य, लक्ष्य कोड, वेबहाउस, हमें रूपांतरित भेजने | | **अभियानों का प्रबंधन** | जब आप कुंजी बनाते हैं तो **अभियानों का प्रबंधन करने की अनुमति** टैप करें, या बाद में कुंजी कार्ड पर इसे स्विच करें | सब कुछ में पढ़ें, प्लस बनाएं, संपादित करें, ब्रेक / रिज़्यूम करें, बजट, कॉपी करें, बड़े पैमाने पर कार्रवाई करें, हटा दें, मीडिया अपलोड करें | केवल पढ़ने वाली कुंजी से बदलाव करने पर `403 READ_ONLY_KEY` मिलता है। रिपोर्ट और डैशबोर्ड के लिए ऐसी कुंजी रखें। प्रबंधन की अनुमति केवल भरोसेमंद अभियान प्रोग्राम को दें। दोनों प्रकार की कुंजी से बजट सिर्फ खाते के बैलेंस और उसके अभियानों के बीच भेजा जा सकता है। धन निकालना संभव नहीं है। बदलाव के समय Pro या Agency प्लान सक्रिय होना चाहिए। संबंधित सुविधा के लिए पैनल जैसी ही अनुमतियाँ लागू होती हैं। प्लान में सुविधा न होने पर `403 FEATURE_NOT_AVAILABLE` मिलता है। ## कुंजी से उपलब्ध खाते कुंजी बनाते समय चुनें कि वह किन खातों तक पहुँच सकती है। | दायरा | कुंजी पहुंचें | | --- | --- | | मेरे सभी कैबिनेट (डिफ़ॉल्ट) | प्रत्येक कैबिनेट आप पैनल में खोल सकते हैं, जिसमें बाद में जोड़े गए शामिल हैं | | कई | कैबिनेट जिसे आपने चुकाया है | | एक विज्ञापन खाता | केवल कैबिनेट | केवल कभी का स्पेस **नारियल** जो आप पैनल में खोल सकते हैं - यह कभी नहीं उतारता है। यह प्रत्येक अनुरोध पर फिर से जांच की जाती है: जब आप एक विज्ञापन खाते तक पहुंच खो देते हैं, तो आपकी कुंजी इसे एक ही समय में खो देती है। `GET /v1/account/info` यह अभी तक कुंजी को क्या मिल रहा है, यह सब लिखता है। यदि कुंजी को कई खातों तक पहुँच है, तो किसी एक खाते पर काम करते समय `account_id` दें। इसके बिना `400 ACCOUNT_ID_REQUIRED` मिलता है। ## एजेंसी और टीम की पहुँच API एक्सेस आपके पास पैनल, कैबिनेट में उपलब्ध एक्सेस का पालन करता है: | कौन है आप | कैबिनेट आपकी कुंजी पहुंचें | अभियानों का प्रबंधन कर सकते हैं | | --- | --- | --- | | अकाउंट मालिक (सामान्य उपयोगकर्ता) | अपने कैबिनेट | उन सभी के | | Agency मालिक | आपके व्यक्तिगत और एजेंसी कार्यालय | उन सभी के | | Agency टीम सदस्य | आपके साथ साझा किए गए कार्यालय | **प्रबंधक** एक्सेस के साथ साझा कैबिनेट; **विज़ुअल** कैबिनेट केवल पढ़ने के लिए रहते हैं | - टीम के सदस्य अपने स्वयं के **API Webhooks के बारे में** पृष्ठ पर अपनी कुंजी बनाते हैं. एजेंसी की योजना उन्हें कवर करती है. - एजेंसी के मालिक **API Webhooks के लिए टीम कुंजी** के तहत बनाई गई टीम की प्रत्येक कुंजी को देखता है - जिसका यह है, क्या यह अभियानों का प्रबंधन कर सकता है, कितने कार्यालयों तक पहुंचता है, जब यह आखिरी बार इस्तेमाल किया गया था - और उनमें से किसी एक को रद्द कर सकता है। - `GET /v1/account/info` लौटें `access_level` प्रत्येक विज्ञापन के लिए: `owner`, `manager` या `viewer`. एक को लिखने के लिए एक `viewer` विज्ञापन खाता वापस आ रहा है `403 VIEW_ONLY_ACCESS`. - यदि मालिक एक सदस्य को हटा देता है, उन्हें विज़ुअर्स में डाउनलोड करता है, या एजेंसी योजना समाप्त हो जाती है, तो सदस्य की कुंजी तुरंत अनुसरण करती है - हाथ से रद्द करने के लिए कुछ भी नहीं है। पैनल में भूमिकाओं का क्या मतलब है: **प्रबंधक** - उस कैबिनेट में पूर्ण अभियान प्रबंधन; **विज़ुअल** - केवल अभियान और आंकड़े. मालिक भी एक सदस्य को कैबिनेट जोड़ने, टीम सहयोगियों को आमंत्रित करने या अपने स्वयं के कैबिनेट को साझा करने की अनुमति दे सकता है (अपने स्वयं के स्तर से ऊपर कभी नहीं)। ## कुंजियाँ रद्द करना और बदलना - **वापसी** पैनल में अपने कार्ड पर एक कुंजी है. यह तुरंत काम करना बंद कर देता है. - **रोटेट** = एक नया कुंजी बनाएं, इसे तैनात करें, फिर पुराने को रद्द करें. दो कुंजी एक ही समय में सक्रिय हो सकती हैं, इसलिए कोई निलंबन समय नहीं है. - **Webhook रहता है** (सत्यापन के लिए [Webhooks के बारे में](/hi/docs/api/webhooks/)) कुंजी से अलग है और इसे स्वयं घुमाया जा सकता है। ## कुंजियों का सुरक्षित भंडारण - एक कुंजी प्रति एकीकरण, इसलिए आप दूसरे को तोड़ने के बिना एक को रद्द कर सकते हैं। - पर्यावरण परिवर्तनों या एक गुप्त प्रबंधक में कुंजी संग्रहीत करें. कभी भी उन्हें प्रतिबद्ध न करें, कभी भी उन्हें चैट या टिकट में डालें. - केवल पढ़ने की कुंजी को पसंद करें; **अभियानों का प्रबंधन** को केवल उस जगह जोड़ें जहां कोड बदलता है अभियान। - एकीकरण की जरूरत के लिए कार्यालयों के दायरे को संकीर्ण करें। - यदि कोई कुंजी लीक हो सकती है, तो इसे पहले रद्द करें और दूसरा जांच करें. API के माध्यम से किए गए किसी भी परिवर्तन को **🔌 API** चिह्नित पैनल में अभियान के इतिहास में दिखाई देता है. ## प्रमाणीकरण त्रुटियाँ | HTTP | `code` | अर्थ | | --- | --- | --- | | 401 | `API_KEY_MISSING` | `X-API-Key` शीर्षक | | 401 | `API_KEY_INVALID` | गलत, रद्द या समाप्त कुंजी | | 401 | `NO_ACCOUNTS` | कुंजी अभी तक कोई सक्रिय कैबिनेट नहीं पहुंचती है | | 403 | `READ_ONLY_KEY` | एक कुंजी के साथ एक लेखन जिसमें कोई प्रबंधन अभियान नहीं है | | 403 | `VIEW_ONLY_ACCESS` | एक कैबिनेट के लिए लिखें जिसे आप के साथ साझा किया गया है जैसे कि दृश्यकर्ता | | 403 | `FEATURE_NOT_AVAILABLE` | इस योजना में इस कार्य को शामिल नहीं किया गया है। | | 403 | `WRITE_NOT_ALLOWED` | इस प्रकार की कुंजी (साझेदारों के लिए Orbito Ads द्वारा जारी) लिखने में सक्षम नहीं है | सभी कोड के लिए “API त्रुटियाँ” देखें। [त्रुटियां](/hi/docs/api/errors/) पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## कार्यान्वयन संबंधी नोट्स ## वर्कस्पेस जोड़ना पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## कुंजी और अकाउंट अनुमतियाँ X-API-Key सर्वर पर रखें। रिपोर्ट के लिए पढ़ने की अनुमति काफ़ी है। बदलाव के लिए अभियान प्रबंधन, चुने अकाउंट पर मालिक या मैनेजर भूमिका और संबंधित सक्रिय प्लान अधिकार चाहिए। अनुरोध परिणाम और उत्तर फ़ील्ड | API | HTTP | अर्थ | | --- | --- | --- | | API_KEY_MISSING | 401 | कुंजी X-API-Key हेडर में भेजें। | | API_KEY_INVALID | 401 | कुंजी अमान्य, समाप्त या रद्द है। | | NO_ACCOUNTS | 401 | इस कुंजी के लिए कोई सक्रिय विज्ञापन खाता उपलब्ध नहीं है। | | READ_ONLY_KEY | 403 | कुंजी पढ़ने की अनुमति देती है। लिखने के लिए अभियान प्रबंधन की अनुमति चाहिए। | | VIEW_ONLY_ACCESS | 403 | Viewer खाता देख सकता है। बदलाव के लिए खाते पर लिखने की अनुमति चाहिए। | | FEATURE_NOT_AVAILABLE | 403 | यह कार्रवाई मौजूदा योजना में शामिल नहीं है। | | WRITE_NOT_ALLOWED | 403 | प्रदाता की ओर से भागीदारों को जारी इस प्रकार की कुंजी से लिखने की अनुमति नहीं है। | [API त्रुटियाँ समझना](/hi/docs/api/errors/) ## दायरा और निरस्तीकरण प्रदाता कुंजी एक, चुने हुए या सभी अधिकृत अकाउंट कवर कर सकती है। हर कॉल पर दायरा जाँचा जाता है। पात्र प्लान में प्रति व्यक्ति पाँच सक्रिय कुंजियाँ हैं। खोई कुंजी निरस्त करें, webhook सीक्रेट अलग बदलें। ## कार्रवाइयाँ और फ़ील्ड X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## अनुरोध का उदाहरण GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · कुंजियाँ और खाता अनुमतियाँ | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/authentication/) ## Cabinet | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [डेवलपर दस्तावेज़](/hi/docs/)[API की शुरुआत](/hi/docs/api/)[AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**API की शुरुआत**](/hi/docs/api/)[अगला विषय**AI असिस्टेंट के लिए API संदर्भ**](/hi/docs/api/ai-assistants/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # अभियान की जानकारी देखना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/campaigns/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) स्थिति और गंतव्य से फ़िल्टर करें या एक अभियान और उसका इतिहास लें। अलग खातों में विज्ञापन ID दोहर सकता है, इसलिए account_id और ad_id साथ रखें। [Markdown](/hi/docs/api/campaigns.md) API में हर अभियान एक Telegram विज्ञापन है। पहचान के लिए `(account_id, ad_id)` रखें। अलग-अलग खातों में एक ही `ad_id` हो सकता है। ## अभियान ऑब्जेक्ट के फ़ील्ड `GET /v1/campaigns/{ad_id}` वापस आते हैं: उदाहरण ``` { "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" } ``` | फ़ील्ड | अर्थ | | --- | --- | | `title` | विज्ञापन के लिए आपका आंतरिक नाम। | | `text` | विज्ञापन लोग देखते हैं। | | `status` | क्या Telegram विज्ञापन के साथ कर रहा है — देखें [स्थिति](/hi/docs/api/campaigns/#doc-note-statuses) । | | `active` | क्या आप पूछते हैं: `true` = चलना चाहिए. `active: true` और `Stopped` की स्थिति के साथ एक अभियान फिर से शुरू होता है जैसे ही उसके पास बजट है। | | `promote_url` / `tme_path` | क्या विज्ञापन के लिए नेतृत्व करता है: एक वेबसाइट URL , या एक `t.me/` लिंक (चैनल, बॉट, मिनी-एप्लिकेशन, पोस्ट)। | | `target_type` | `channels`, `bots`, `search` या `users` – देखें [अभियान बनाएं](/hi/docs/api/create-campaigns/) । | | `targets` | उपयोगकर्ता नाम विज्ञापन लक्ष्यों (चैनलों या बॉटों), जब ज्ञात है। | | `cpm` | 1000 दृश्यों के लिए, कैबिनेट की मुद्रा में। | | `budget` | पैसे **बाएं** अभियान पर. `budget + spent` यह सब दिया गया था। | | `spent` | अब तक का पैसा खर्च हुआ है। | | `daily_budget` | दैनिक खर्च कवर, यदि एक सेट किया गया है। | | `views`, `clicks`, `actions`, `opens` | `actions` प्लेटफॉर्म कार्रवाई हैं (जन्म, बोट शुरू होता है) - आपके रूपांतरण नहीं; उन लोगों के लिए देखें [रूपांतरण](/hi/docs/api/conversions/) . | | `ctr`, `cvr` | प्रतिशत: `"1.15"` 1.15% का मतलब है। | | `cpc`, `cpa` | एक क्लिक और एक कार्रवाई के लिए लागत। | | `views_per_user` | एक व्यक्ति विज्ञापन को कितनी बार देख सकता है (1–4)। | | `schedule` | सप्ताह के दिनों और घंटों में विज्ञापन दिखाया जाता है, या `null` — यह घड़ी के चारों ओर चलता है. देखें [कार्यक्रम](/hi/docs/api/manage-campaigns/#doc-note-schedule) . | | `group_id` | कार्यक्रम के समूह में, यदि कोई है। | | `auto_cpm_enabled` | Orbito Ads 's ऑटो CPM प्रस्ताव का प्रबंधन करता है। | | `date` | जब विज्ञापन बनाया गया था: यूनिक्स सेकंड, एक पंक्ति के रूप में। | | `status_changed_at` | आखिरी स्थिति परिवर्तन. आंकड़ों के अद्यतन से छूने के लिए नहीं — "इसके बाद क्या बदल गया है" के लिए अच्छा है। | | `synced_at` | जब विज्ञापन के स्वयं के सेटिंग्स - `schedule`, `text`, `views_per_user`, लक्ष्य - Telegram से आखिरी बार पढ़े गए थे. देखें [ताजा](/hi/docs/api/campaigns/#doc-heading-freshness) . | **पैसे के क्षेत्र दसवीं तार हैं** ( `cpm` , `budget` , `spent` , `ctr` , `cvr` , `cpc` , `cpa` ) इसलिए दशकों सटीक रहते हैं. काउंटर ( `views` , `clicks` , `actions` , `opens` ) संख्याएं हैं. सभी पैसा कैबिनेट की मुद्रा में है (देखें [विज्ञापन खाता](/hi/docs/api/accounts/)) । ## स्थितियाँ | स्थिति | अर्थ | आप क्या कर सकते हैं | | --- | --- | --- | | `Active` | चलना है। | आराम करें, बदलें प्रस्ताव, बजट जोड़ें। | | `In Review` | Telegram की समीक्षा के लिए इंतजार कर रहे हैं; अभी तक दिखाया नहीं गया है। | इंतजार करें - एक वेबहॉक आपको बताता है जब यह बदल जाता है। | | `Declined` | Telegram ने विज्ञापन को अस्वीकार कर दिया। | पाठ या लिंक को संपादित करें (रिसेबमिट्स), या एक नया बनाएं। | | `On Hold` | स्विच किया गया - आप या एक स्वचालन नियम द्वारा। | संदर्भ | | `Stopped` | बजट का इस्तेमाल किया जाता है। | बजट जोड़ें; यह फिर से चलता है यदि `active` `true` है। | | `Paused` | पूरे कैबिनेट के लिए Telegram पर रुक गया (अजीब)। | [@orbitoads](https://t.me/orbitoads) से संपर्क करें। | | `Deleted` | इतिहास में कटा हुआ, सूची से छिपा हुआ। | — | ## GET /v1/campaigns प्रत्येक कैबिनेट के अभियान कुंजी पहुंचता है। उदाहरण ``` 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" ``` | पैरामीटर | डिफ़ॉल्ट | अर्थ | | --- | --- | --- | | `account_id` | — | केवल यह कैबिनेट. ( `accountId` भी काम करता है.) | | `status` | सभी को हटा दिया गया | एक स्थिति या कई, कॉम्मा-अलग। | | `title` | — | शीर्षक में इस लेख को शामिल किया गया है। | | `bot_username` | — | एक बॉट या चैनल के विज्ञापन: `tme_path` में उपयोगकर्ता नाम से मेल खाता है, मामला संवेदनशील, नंबर `@` . `foo` `foobar` से मेल नहीं खाता है। | | `promote_domain` | — | `example.com` या एक पूर्ण URL; `www.` , योजना, मार्ग और बंदरगाह को अनदेखा किया जाता है। | | `promote_domain_mode` | `exact` | `suffix` भी उप-डोमेन ( `x.example.com`) के साथ मेल खाता है। | | `type` | — | `bot` (बॉट्स और मिनी-एप्लिकेशन), `channel` (चैनलों, समूहों, पोस्ट) या `site` (बाहरी वेबसाइटों)। | | `limit` | 100 | 1–500. | | `cursor` | — | पृष्ठ - देखें [पृष्ठभूमि](/hi/docs/api/pagination/) . अनुशंसित। | | `offset`, `sortBy`, `sortOrder` | — | ऑफ़सेट पेजिंग (कैबिनेट के लिए ≤ 500) | फ़िल्टर और के साथ संयोजन। एक अज्ञात बॉट या डोमेन एक खाली सूची वापस करता है, एक त्रुटि नहीं। उदाहरण ``` { "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 /v1/campaigns/{ad_id}` - उपरोक्त पूरे वस्तु, लक्ष्य, रचनात्मक फ़ील्ड और `schedule` सहित (लिस्ट के अंत बिंदु को जल्दी रहने के लिए छोड़ देता है) हटाए गए अभियान भी वापस आते हैं, `status: "Deleted"` के साथ। उदाहरण ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id` केवल तब आवश्यक है जब एक ही `ad_id` आपके कई कार्यालयों में मौजूद है (`400 ACCOUNT_ID_REQUIRED` आपको बताता है)। ### ताजा विज्ञापन के स्वयं के सेटिंग्स - `schedule`, `text`, `views_per_user`, लक्ष्य - विज्ञापन स्वयं को पढ़ने से आते हैं, इसलिए: - `GET /v1/campaigns/{ad_id}` Telegram से विज्ञापन को फिर से पढ़ता है जब हमारी प्रति **5 मिनट** से पुराना है, जवाब देने से पहले. Telegram के विज्ञापन इंटरफ़ेस में किसी ने सीधे किए गए परिवर्तन इस विंडो के भीतर दिखाई देते हैं. - चलने वाली अभियानों ( `Active`, `In Review`, `On Hold`) को भी पृष्ठभूमि में लगभग हर 3 घंटे में फिर से पढ़ा जाता है। - Orbito Ads के माध्यम से किए गए परिवर्तन - पैनल या यह API - एक बार में कॉपी में हैं। यदि Telegram समय पर जवाब नहीं देता है, तो आपको संग्रहीत प्रति मिलती है; `synced_at` आपको बताता है कि यह कितना पुराना है। ## GET /v1/campaigns/{ad_id}/history एक अभियान की कुल संख्या एक अवधि के दौरान - एक एकीकृत, घंटे के बिंदु नहीं। उदाहरण ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "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` (अनुकूलित रूप से ) `7d`, `30d` या `custom` साथ में `startDate` / `endDate` (`YYYY-MM-DD`, UTC(और वैकल्पिक `startHour` / `endHour` (0–23). अवधि के लिए कोई डेटा नहीं `404 NOT_FOUND`. ## स्थानीय प्रति सिंक करना 1. पृष्ठ `GET /v1/campaigns?cursor=` के माध्यम से और `(account_id, ad_id)` के माध्यम से उल्टा। 2. प्रति मिनट पूछताछ के बजाय स्थिति परिवर्तन और घंटे के आंकड़ों के लिए [Webhooks के बारे में](/hi/docs/api/webhooks/) के लिए साइन अप करें। 3. एक दिन में एक बार पूरी तरह से पुन: सिंक्रनाइज़ करें ताकि किसी भी Webhook को पकड़ लिया जा सके। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## GET `/api/v1/campaigns` फ़िल्टर और पृष्ठों के साथ अभियान सूची पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `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` | हाँ | 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}` एक अभियान के लक्ष्यीकरण, सामग्री और शेड्यूल पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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` एक अभियान के तय तारीख या घंटे के कुल आँकड़े पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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" } } ``` ## कार्यान्वयन संबंधी नोट्स ## अकाउंट और अभियान ID account_id और ad_id साथ रखें। अलग अकाउंट में वही ad_id हो सकता है। कई अकाउंट वाले कुंजी अनुरोध में सही रिकॉर्ड के लिए account_id दें। ## फ़िल्टर और स्थिति फ़िल्टर AND से मिलते हैं। status अल्पविराम से कई मान लेता है। सूची सामान्यतः Deleted छोड़ती है, विवरण इसे लौटा सकता है। active वांछित प्रदर्शन और status प्लेटफ़ॉर्म निर्णय है। ## कार्रवाइयाँ और फ़ील्ड 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 ## अनुरोध का उदाहरण GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · अभियान की जानकारी देखना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/)[अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/)[मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/)[अभियान और खाते के आँकड़े](/hi/docs/api/stats/)[टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**उपलब्ध विज्ञापन खाते**](/hi/docs/api/accounts/)[अगला विषय**अभियान और मीडिया बनाना**](/hi/docs/api/create-campaigns/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API संस्करण और बदलाव [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/changelog/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) संस्करण API पथ में है। क्लाइंट को नए फ़ील्ड और एनम मान स्वीकारने चाहिए। अक्टूबर 2026 की प्रविष्टियों में समय-सारणी, प्रबंधन और अवधि के कुल हैं। [Markdown](/hi/docs/api/changelog.md) ## API संस्करण संस्करण रास्ते में है: `/api/v1` . `v1` के भीतर हम केवल **additive के बारे में** परिवर्तन करते हैं: | अतिरिक्त (किसी भी समय हो सकता है) | विस्फोट (केवल एक नए संस्करण में) | | --- | --- | | नए अंत बिंदु | एक अंतिम बिंदु या फ़ील्ड को हटाने या पुनर्निर्देशित करने के लिए | | नए वैकल्पिक अनुरोध फ़ील्ड | एक नया आवश्यक क्षेत्र | | नई प्रतिक्रिया क्षेत्र | एक फ़ील्ड के प्रकार या अर्थ को बदलना | | नए मूल्य ( `status` , त्रुटि `code` ) | एक Enum मूल्य को हटाना | | नए त्रुटि कोड | एक वैध अनुरोध को अमान्य बनाना | तो ग्राहकों को लिखें कि **उन क्षेत्रों को अनदेखा करें जिन्हें वे नहीं पता** और **अज्ञात ईएनयू मूल्य और त्रुटि कोड का प्रबंधन करें** दयालुता से. एक टूटी हुई बदलाव `/api/v2` के रूप में भेज दिया जाएगा, जो पहले यहां घोषित किया गया था, `v1` इसके बगल में चल रहा था। ## बदलावों का इतिहास ### 2026-10-26 — अवधि कुल - **नए :** [`GET /v1/stats/analytics`](/hi/docs/api/stats/#doc-note-get-v1statsanalytics) की प्रत्येक `topCampaigns` पंक्ति `cpm` ले जाती है - अवधि के दौरान 1,000 दृश्यों के लिए खर्च किया जाता है - `cpc` और `cpa` के बगल में। - **ठीक करें :** एक या दो दिन का एक खिड़की अब एक ही दिन के रूप में पूछे जाने वाले समान दिनों को जोड़ती है. आधी रात के बाद पहली मिनट ( UTC ) इस तरह के खिड़की से बाहर निकलने के लिए इस्तेमाल किया गया था, इसलिए एक दिन वापस आ गया 1-2% कम; तीन दिन और अधिक की रेंज पहले से ही सही थी और नहीं बदलती थी. - **ठीक करें :** एक दो दिन तक का खिड़की जो 29 दिनों से अधिक समय पहले शुरू होती है, ज़ेर वापस आती है; यह अब उस दिन की संख्या को वापस लाती है। ### 2026-10-08 — विज्ञापन कार्यक्रम - **नए : `schedule`** - केवल चुने हुए सप्ताह के दिनों और घंटों पर एक अभियान दिखाएं। इसे बनाए रखें, `PATCH /v1/campaigns/{ad_id}`, कॉपी, या बड़े पैमाने पर कार्रवाई के साथ एक ही समय में कई अभियान **`set_schedule`** ; `null` इसे हटा दें। `GET /v1/campaigns/{ad_id}` इसे वापस कर दे। फ़ॉर्मेट : [कार्यक्रम](/hi/docs/api/manage-campaigns/#doc-note-schedule). यह अभियान को चालू या बंद नहीं करता है। - एक अभियान को स्थगित करना, पुनरावृत्ति करना और संपादित करना अपने कार्यक्रम को बनाए रखता है; प्रतिलिपि और पुनर्जीवित अभियान इसे विरासत में रखते हैं। - **ठीक करें :** `PATCH /v1/campaigns/{ad_id}` केवल `cpm` , `active` और / या `schedule` के साथ अभियान को Telegram 's समीक्षा में वापस भेजा. ये अब Telegram 's स्वयं की पेशकश और स्थिति फॉर्म के माध्यम से जाते हैं और कभी भी एक समीक्षा शुरू नहीं करते हैं; अन्य फ़ील्ड अभी भी करते हैं ( Telegram 's नियम) - देखें [Edit के लिए](/hi/docs/api/manage-campaigns/#doc-note-edit) . - **ठीक करें :** एक बजट के बिना एक अभियान पर एक कार्यक्रम स्थापित करने के लिए इसे पुनर्विचार के लिए भेज सकता है. इस तरह के अभियान अब `400` के साथ उत्तर देता है और `param: "schedule"` के साथ अनदेखा किया जाता है - पहले बजट जोड़ें, फिर कार्यक्रम सेट करें. - **`GET /v1/campaigns/{ad_id}` अब वर्तमान में:** यह टेलीग्राम से विज्ञापन को फिर से पढ़ता है जब हमारे प्रति 5 मिनट से अधिक पुराना है, इसलिए `schedule`, `text` और `views_per_user` सीधे टेलीग्राम में किए गए परिवर्तनों को प्रतिबिंबित करें। नए क्षेत्र **`synced_at`** यह कहता है कि जब विज्ञापन आखिरी बार पढ़ा गया था। देखें [ताजा](/hi/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08 — अभियान प्रबंधन - **नई: लिखने के लिए पहुंच।** कुंजी अब **अभियानों का प्रबंधन** : `POST /v1/campaigns` (संपादित करें, कॉल के लिए 100 तक), `PATCH /v1/campaigns/{ad_id}` , `POST …/pause` , `…/resume` , `…/budget` , `…/copy` , `POST /v1/campaigns/bulk` , `DELETE /v1/campaigns/{ad_id}` , `POST /v1/media` ले जा सकते हैं। - **नए लेख पढ़ते हैं:** `GET /v1/campaigns/{ad_id}` (एक लक्ष्य के साथ अभियान), `GET /v1/tasks/{id}`, `GET /v1/groups`, `GET /v1/targeting`। - **एजेंसी टीम के सदस्य** कुंजी बना सकते हैं; एक कुंजी सदस्य के साथ साझा किए गए कार्यालयों तक पहुंचती है, उनके एक्सेस स्तर पर. एजेंसी के मालिक सभी टीम कुंजी ( API & Webhooks → टीम कुंबी) देखते हैं और उन्हें रद्द कर सकते हैं. - **Idempotency-Key** बनाने, कॉपी करने, बड़े पैमाने पर और बजट के लिए आवश्यक है। - **अलग लिखित दर सीमा:** 30 अनुरोध प्रति मिनट, 60 पढ़ने के अलावा। - **`GET /v1/account/info`** `access_level` , `currency` , `balance` , `balance_updated_at` , `min_budget` , `features` को जोड़ता है। - **त्रुटियां** `code` और `request_id` को अनगिनत `error` पाठ के बगल में जोड़ता है. एक `500` अब आंतरिक त्रुटि पाठ शामिल नहीं करता है. - `account_id` हर जगह स्वीकार किया जाता है `accountId` था (दोनों काम)। - **ठीक करें :** `GET /v1/stats?period=all` प्रति क्लिक `cpa` के रूप में भुगतान करता है; यह अब किसी भी अन्य अवधि की तरह प्रति शेयर लागत है। ### 2026-10-04 - URL फ़िल्टर दोनों वेबहाउस के लिए लागू होते हैं; `status_change` केवल कुंजी तक पहुंचता है, जिसके मालिक कैबिनेट को देख सकते हैं। ### 2026-09-18 - रूपांतरण अपने स्वयं के बजट (20 घटनाओं / सेकंड) को पढ़ने की सीमा से बाहर लेते हैं; 1,000 घटनाओं तक के बैट्स। ### 2026-06-30 - इनपुट रूपांतरण: `POST /v1/postback` , `GET /v1/ingest/{token}` , `GET /v1/conversions` । ### पहले - `GET /v1/campaigns` कोर्स पेजिंग के साथ और `bot_username`, `promote_domain` और `type` फ़िल्टर; आंकड़ों के अंत बिंदु; `status_change` और `hourly_digest` वेबहाउस। पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## कार्यान्वयन संबंधी नोट्स ## पथ में वर्शन वर्तमान अनुबंध /api/v1 उपयोग करता है। संगत जोड़ वैकल्पिक फ़ील्ड, क्रियाएँ, एनम मान और त्रुटि कोड जोड़ सकते हैं। अनजान स्थिति संभालें, अनुपयोगी उत्तर फ़ील्ड अनदेखे करें। ## किन बदलावों पर ध्यान दें वर्तमान स्कीमा में साप्ताहिक शेड्यूल, अकाउंट-सीमित लेखन और topCampaigns में CPM है। प्रकार बदलना, फ़ील्ड हटाना या नया अनिवार्य इनपुट नई API वर्शन माँगता है। ## कार्रवाइयाँ और फ़ील्ड /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 ## अनुरोध का उदाहरण GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · API संस्करण और बदलाव | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/changelog/) ## संबंधित गाइड [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/)[पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) संदर्भ अपडेट की तारीख 2026-10-26 [पिछला विषय**पुष्ट रूपांतरण भेजना**](/hi/docs/api/conversions/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # पुष्ट रूपांतरण भेजना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/conversions/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) सर्वर या ट्रैकर से अभियान संदर्भ या आमंत्रण लिंक, इवेंट प्रकार और अलग लेनदेन ID भेजें। वैकल्पिक राशि और मुद्रा आय को खर्च से जोड़ती हैं। [Markdown](/hi/docs/api/conversions.md) Telegram इम्प्रेशन, क्लिक और जुड़ने की संख्या गिनता है। लीड, जमा या बिक्री जैसे अगले नतीजे आपके सर्वर या ट्रैकर को मिलते हैं। ये इवेंट Orbito Ads को भेजें ताकि पैनल, रिपोर्ट और ऑटोमेशन नियमों में हर अभियान के कन्वर्ज़न और आय मिल सकें। ## कन्वर्ज़न ट्रैकिंग चालू करना पैनल में कुंजी कार्ड पर, **Postback प्राप्त करें** पर स्विच करें. इसके बिना, वापसी भेजने के लिए `403 INGEST_DISABLED` . ट्रैकर के लिए, **ट्रैकर URL** पर भी दबाएं - आपको एक लिखित-केवल URL (एक बार दिखाया गया) मिलता है जो रूपांतरण पोस्ट कर सकता है लेकिन कुछ भी नहीं पढ़ सकता है. ## कन्वर्ज़न को अभियान से कैसे जोड़ें प्रत्येक विज्ञापन आपको नियंत्रित एक पहचानकर्ता के साथ कहीं लिंक करता है: - एक बॉट या मिनी ऐप: `t.me/yourbot?start=REF` या `?startapp=REF` - एक वेबसाइट: आपके ट्रैकर के क्लिक आईडी या लिंक में उप आईडी, e.g . `https://site.com/?subid=REF` जब आप एक रूपांतरण भेजते हैं, तो उस `REF` को `ref` के रूप में शामिल करें. Orbito Ads उस अभियान को ढूंढता है जिसका लिंक इसे ले जाता है, कैबिनेट में कुंजी पहुंचती है. यदि एक कैबिनेट के कई अभियान एक ही `ref` साझा करते हैं, तो रूपांतरन उनमें से प्रत्येक के लिए गिनती करता है. ## अपने सर्वर से · POST /v1/postback उदाहरण ``` 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" }' ``` उदाहरण ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` एक बार में 1,000 घटनाओं तक: `{ "events": [ {…}, {…} ] }` (या एक बार-बार रैली) जवाब प्रत्येक रिपोर्ट करता है - `{ "accepted": 998, "failed": 2, "results": [ … ] }` - इसलिए एक बुरा घटना कभी भी बैच को नष्ट नहीं करती है। ## ट्रैकर से · GET /v1/ingest/{token} ट्रैकर URL को अपने ट्रैकर के पोस्टबैक सेटिंग्स में डालें, इसके मैक्रो के साथ: उदाहरण ``` # 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} ``` जवाब स्पष्ट पाठ है: `OK` , `OK (deduped)` , या इसकी HTTP स्थिति के साथ एक त्रुटि संदेश (4xx - वापस मत करो, 5xx - वापसी)। ## फ़ील्ड | फ़ील्ड | यह भी स्वीकार किया गया है कि | आवश्यक | अर्थ | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | 1 ईसा | विज्ञापन के लिंक से पहचानकर्ता. 512 अक्षरों तक. | | `invite_link` | `invitelink`, `link` | 1 ईसा | चैनल विज्ञापनों के लिए: अद्वितीय निमंत्रण लिंक Orbito Ads बनाया गया है। | | `event` | `event_type`, `type`, `goal`, `cnv_status` | हाँ | `lead` , `conversion` या `purchase` हो जाते हैं (उदाहरण के लिए, `signup`, `ftd` , `deposit` , `sale` जैसे शब्द समझ में आते हैं) अज्ञात शब्दों को अस्वीकार कर दिया जाता है। | | `txid` | `tid` , `transaction_id` , `order_id` , `rdtk_event_id` , शीर्षक `X-Idempotency-Key` | हाँ | इस घटना के लिए आपका आईडी. एक ही `txid` को फिर से अपडेट करने के बजाय इसे दो बार गिनती करने के लिए भेजें. 128 वर्ण तक. | | `amount` | `payout`, `sum`, `revenue`, `value` | नहीं | नकारात्मक संख्या; चार्जिंग बैग के लिए नकारात्मक। | | `currency` | `cur`, `cnv_currency` | नहीं | ISO 4217 कोड. एक के बिना, एक राशि USD के रूप में रिकॉर्ड की जाती है । | | `status` | — | नहीं | आपके नेटवर्क के अपने स्वयं के स्टेटस शब्द (अनुमोदित, लंबे समय तक ...), जैसा है, संग्रहीत किया गया है। | | `event_time` | `timestamp`, `date` | नहीं | ISO या यूनिक्स समय; पिछले 90 दिनों के भीतर रखा गया है। | | `account_id` | `accountId` | कभी-कभी | जरूरी है जब एक ही `ref` आपके कई कार्यालयों में मौजूद है ( `409` अन्यथा)। | | `meta` | — | नहीं | अपने स्वयं के JSON वस्तु, 4 KB तक। | 1 `ref` या `invite_link`। ## सीमाएँ और पुनः प्रयास 20 घटनाओं प्रति सेकंड प्रति कुंजी, 1000 तक के विस्फोटों के साथ - पढ़ने और लिखने के बजट से अलग. `429` पर `Retry-After` का इंतजार करें; सेवानिवृत्ति हमेशा सुरक्षित है क्योंकि `txid` दोगुना हो जाता है. ## GET /v1/conversions कुल प्रति अभियान, घटना के लिए एक बार गिनती: उदाहरण ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | पैरामीटर | अर्थ | | --- | --- | | `adId` | एक अभियान | | `days` | केवल पिछले 1–365 दिनों में प्राप्त घटनाएं। | - `revenue` एक मुद्रा के लिए है - राशि कभी परिवर्तित नहीं की जाती है। - `ad_id` `null` है, जो एक `ref` के अनुरूप घटनाओं के लिए है जो कई अभियानों द्वारा साझा की जाती है। - आपके द्वारा भेजे गए राशि आपकी खुद की रिपोर्ट है. वे बिल नहीं करते हैं और आप भुगतान करते हैं कि कुछ भी नहीं बदलते हैं Orbito Ads . ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## POST `/api/v1/postback` एक रूपांतरण या अधिकतम 1,000 घटनाओं का बैच भेजें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | हाँ | 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 } } ``` ### अनुरोध की संरचना 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}` केवल लिखने वाले URL से ट्रैकर रूपांतरण भेजें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `token` | path | `string` | हाँ | | `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` रूपांतरण गिनती और मूल मुद्रा में आय पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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 } } ] } ``` ## कार्यान्वयन संबंधी नोट्स ## घटना को विज्ञापन से जोड़ना प्रदाता कुंजी पर postback स्वीकारना चालू करें। ref या invite_link, event और स्थिर txid भेजें। मानक घटनाएँ lead, conversion और purchase हैं। कई अकाउंट में मिलान पर account_id दें। अनुरोध परिणाम और उत्तर फ़ील्ड | API | अर्थ | | --- | --- | | account_id / accountId | account_id के लिए accountId भी स्वीकार होता है। समान ref कई खातों में हो तो खाता बताएँ। अस्पष्ट मिलान पर HTTP 409 मिलता है। | ## डुप्लिकेट हटाना और मुद्रा वही txid घटना अपडेट करता है। बैच आंशिक सफल हो सकता है। आय की ISO मुद्रा दें, डिफ़ॉल्ट USD है। ऋणात्मक राशि भुगतान वापसी बताती है। ट्रैकर URL केवल लिखता है और पाठ OK या OK (deduped) देता है। ## कार्रवाइयाँ और फ़ील्ड 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 ## अनुरोध का उदाहरण GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · पुष्ट रूपांतरण भेजना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/)[API संस्करण और बदलाव](/hi/docs/api/changelog/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**अभियान के इवेंट प्राप्त करना**](/hi/docs/api/webhooks/)[अगला विषय**API संस्करण और बदलाव**](/hi/docs/api/changelog/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # अभियान और मीडिया बनाना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/create-campaigns/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) एक अनुरोध एक खाते में 100 अभियान स्वीकार करता है। चैनल, बॉट, खोज या दर्शक चुनें, नई ऑपरेशन कुंजी दें और टास्क देखें। आवश्यक मीडिया पहले अपलोड करें। [Markdown](/hi/docs/api/create-campaigns.md) `POST /v1/campaigns` एक खाते में अभियान बनाता है। अभियान प्रबंधन की अनुमति वाली कुंजी और `Idempotency-Key` हेडर चाहिए। `202` जवाब में टास्क मिलता है। उसके पूरा होने पर अभियान दिखते हैं। [कार्य](/hi/docs/api/tasks/) ## अभियान बनाने का उदाहरण उदाहरण ``` 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"] }' ``` उदाहरण ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## एक साथ कई अभियान बनाना अभियानों को शामिल करें `campaigns` (और 100 तक) `account_id` और समूह के क्षेत्र शीर्ष स्तर पर रहते हैं और उन सभी के लिए लागू होते हैं। उदाहरण ``` { "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"] } ] } ``` अभियानों को एक-एक करके बनाया जाता है. यदि पहला विफल हो जाता है, तो कार्य बंद हो जाता है — उसी त्रुटि को 100 बार दोहराने के बजाय इनपुट को ठीक करें. प्रत्येक विफलता आपके क्रम में `index` के साथ `errors` में सूचीबद्ध होती है. ## फ़ील्ड | फ़ील्ड | आवश्यक | अर्थ | | --- | --- | --- | | `title` | हाँ | आंतरिक नाम, पैनल में दिखाया गया है। | | `text` | हाँ | विज्ञापन पाठ लोग देखते हैं. Telegram के अपने लंबाई और सामग्री नियम लागू होते हैं — एक अस्वीकृति कार्य के `errors` में वापस आती है. | | `promote_url` | हाँ | क्या विज्ञापन खुलता है: `https://t.me/channel`, `t.me/bot?start=ref`, `@channel` या एक वेबसाइट URL । | | `cpm` | हाँ | कैबिनेट की मुद्रा में 1,000 दृश्यों के लिए योगदान, 0. लक्ष्य के लिए बहुत कम → Telegram 's न्यूनतम त्रुटि में वापस आता है। | | `budget` | हाँ | पैसे कैबिनेट के संतुलन से अभियान में स्थानांतरित किए गए हैं: `0` , या कम से कम कैबिनेट का `min_budget` ( [विज्ञापन खाता](/hi/docs/api/accounts/) ). `0` के साथ विज्ञापन बनाया जाता है लेकिन बजट जोड़ने तक चला नहीं जा सकता है। | | `target_type` | हाँ | `channels`, `bots`, `search` या `users` – नीचे देखें। | | `active` | नहीं | `false` इसे स्विच कर देता है डिफ़ॉल्ट `true` । | | `daily_budget` | नहीं | दैनिक भुगतान कैप्सूल | | `views_per_user` | नहीं | एक व्यक्ति विज्ञापन को कितनी बार देख सकता है, 1-4। | | `media` | नहीं | [`POST /v1/media`](/hi/docs/api/create-campaigns/#doc-note-upload-media) से छवि या वीडियो टोकन। | | `picture` | नहीं | `true` विज्ञापन में प्रोत्साहित किए गए चैनल के एवाटर को दिखाता है। | | `button` | नहीं | Ad के नीचे बटन: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request`. जहां विज्ञापन का खाता है `features.ad_button` है `true`. | | `website_name` | नहीं | ब्रांड नाम एक वेबसाइट विज्ञापन के ऊपर दिखाया गया है। | | `schedule` | नहीं | विज्ञापन केवल चुने हुए सप्ताह के दिनों और घंटों पर दिखाएं, e.g . सप्ताह के दिन 9:00-18:00. प्रारूप: [कार्यक्रम](/hi/docs/api/manage-campaigns/#doc-note-schedule) . इसके बिना विज्ञापन घड़ी के चारों ओर चलता है। | शीर्ष स्तर केवल: `account_id` (कुछ कैबिनेट तक पहुंचने पर आवश्यक), `group_id` (एक मौजूदा [समूह](/hi/docs/api/targeting/#doc-note-groups)) या `new_group_name` (समूह बनाता है, या उस नाम के साथ एक को फिर से उपयोग करता है)। `400 VALIDATION_ERROR` के साथ अज्ञात फ़ील्डों को अस्वीकार कर दिया जाता है और फ़ील्ड नाम `param` में होता है - एक टाइप कभी भी चुपचाप एक सेटिंग नहीं छोड़ता है। ## टार्गेटिंग ### `channels` — विशिष्ट चैनलों में विज्ञापन दिखाएं उदाहरण ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | फ़ील्ड | अर्थ | | --- | --- | | `channels` | 1-100 सार्वजनिक चैनलों: `@name`, `name` या `t.me/name`। | | `languages`, `topics`, `exclude_topics` | चैनल भाषा और विषय के अनुसार संकीर्ण ( [कोड](/hi/docs/api/targeting/) )। | | `add_similar_channels` | इसके साथ ही इसी तरह के चैनलों को भी जोड़ें। | ### `bots` — बॉट में विज्ञापन दिखाएं उदाहरण ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots` : 1-100 सार्वजनिक बॉट। ### `search` — Telegram खोज प्रश्नों के लिए विज्ञापन दिखाएं उदाहरण ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords` : 1-100 वाक्यांश, 64 अक्षरों तक प्रत्येक। ### `users` - एक दर्शक को विज्ञापन दिखाएं उदाहरण ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | फ़ील्ड | अर्थ | | --- | --- | | `countries` | ISO देश कोड। | | `languages` | भाषा कोड | | `topics`, `exclude_topics` | विषय ID के बारे में टिप्पणियाँ | | `audience_channels` | जो लोग इन चैनलों को पढ़ते हैं। | इनमें से कम से कम एक आवश्यक है. कोड: [लक्ष्य कोड](/hi/docs/api/targeting/) . चैनलों, बोटों और कीवर्डों को Telegram के स्वयं के आईडी के लिए हल किया जाता है जब कार्य चलता है. Telegram नहीं मिलता है कि कटौती कर रहे हैं; यदि कोई नहीं मिलता, तो यह अभियान विफल हो जाता है - `No targets found: …` चैनलों और बोटों के लिए, `No valid search queries found` कीवर्ड के लिए - और कार्य के `errors` कहते हैं। ## अभियान बनाने के बाद 1. पॉल [`GET /v1/tasks/{id}`](/hi/docs/api/tasks/) से `completed` तक . `ad_ids` नए अभियानों को पकड़ता है। 2. Telegram हर नए विज्ञापन की समीक्षा करता है: यह शुरू होता है `In Review`फिर बनने के लिए `Active` (और `Declined`). A [Webhook के बारे में](/hi/docs/api/webhooks/) आपको बताते हैं कब। 3. उन्हें [अभियानों का प्रबंधन](/hi/docs/api/manage-campaigns/) के साथ बदलें, धन या रुकें। ## मीडिया अपलोड करना `POST /v1/media` एक कैबिनेट में एक छवि या वीडियो अपलोड करता है और `POST /v1/campaigns` , `PATCH` और प्रति के लिए एक `media` टोकन वापस करता है। उदाहरण ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` उदाहरण ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG, PNG, GIF, WEBP या MP4, 10 MB तक, फ़ील्ड `file` में `multipart/form-data` के रूप में भेजा गया। - कुछ कैबिनेट केवल 16:9 छवियों को स्वीकार करते हैं कम से कम 640 पीएक्स चौड़ा; यदि एक फ़ाइल फिट नहीं है, तो Telegram का कारण `error` में वापस आता है। ## त्रुटियाँ | कोड | जब | | --- | --- | | `VALIDATION_ERROR` | एक फ़ील्ड गलत प्रकार की अनुपस्थित है, अज्ञात है, या इस `target_type` - `param` में शामिल नहीं है जो कहता है। | | `IDEMPOTENCY_KEY_REQUIRED` | `Idempotency-Key` के बारे में | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | बताओ कि कौन सा कैबिनेट / यह कैबिनेट उपलब्ध नहीं है। | | `VIEW_ONLY_ACCESS` | आपके पास इस कैबिनेट के लिए Viewer एक्सेस है। | | `QUEUE_FULL` | 5 पहले से ही इस विज्ञापन खाते में क्यूएड बनाते हैं। | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | वर्तमान में मैन्युअल परिवर्तन नहीं किए जा सकते हैं। | व्यक्तिगत अभियान विफलताओं (Telegram एक पाठ, एक प्रस्ताव, एक लिंक को अस्वीकार कर दिया) अनुरोध विफल नहीं होता है - वे कार्य के `errors` में दिखाई देते हैं। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## POST `/api/v1/campaigns` एक अकाउंट में एक या अधिकतम 100 अभियान बनाने का काम कतार में डालें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | हाँ | | `X-API-Key` | header | `string` | हाँ | 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": [] } } ``` ### अनुरोध की संरचना 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" } ] } ``` अनुरोध परिणाम और उत्तर फ़ील्ड | API | HTTP | अर्थ | | --- | --- | --- | | VALIDATION_ERROR | 400 | दोबारा भेजने से पहले फ़ील्ड जाँचें और अमान्य मान ठीक करें। | | IDEMPOTENCY_KEY_REQUIRED | 400 | लिखने के अनुरोध में आवश्यक Idempotency-Key हेडर भेजें। | | VIEW_ONLY_ACCESS | 403 | Viewer खाता देख सकता है। बदलाव के लिए खाते पर लिखने की अनुमति चाहिए। | | QUEUE_FULL | 429 | इस खाते की कतार में पाँच निर्माण कार्य हैं। जगह खाली होने की प्रतीक्षा करें। | [API त्रुटियाँ समझना](/hi/docs/api/errors/) ## POST `/api/v1/media` मीडिया अपलोड कर चुने हुए अकाउंट का फ़ाइल टोकन लें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | | `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 } } ``` ### अनुरोध की संरचना JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` उदाहरण · 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" ] } ] } ``` ## कार्यान्वयन संबंधी नोट्स ## एक अभियान या बैच एकल अनुरोध में title, text, promote_url, cpm, budget और target_type मूल में दें। बैच में campaigns के 1–100 आइटम और मूल में साझा अकाउंट व समूह दें। बजट शून्य या कम से कम min_budget रखें। ## लक्ष्यीकरण और फ़ाइल channels, bots, search या users चुनें। चैनल, बॉट और खोज में 1–100 प्रविष्टियाँ, हर खोज वाक्य अधिकतम 64 अक्षर। ऑडियंस को एक फ़िल्टर चाहिए। अधिकतम 10 MB JPG, PNG, GIF, WebP और MP4 अपलोड वाले अकाउंट से बँधे हैं। ## स्वीकृति और पूर्णता बनाने, कॉपी और बल्क अनुरोध HTTP 202 तथा काम का id देते हैं। Retry-After के अनुसार GET /api/v1/tasks/{id} जाँचें। completed पर भी failed और errors पढ़ें। ## कार्रवाइयाँ और फ़ील्ड POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## अनुरोध का उदाहरण GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## दर्शक परीक्षण सेटिंग अभियान स्कीमा चार टार्गेटिंग मोड अलग करता है। चैनल channels में, बॉट नाम bots में और खोज शब्द search_keywords में जाते हैं। देश, भाषा और विषय उपयोगकर्ता दर्शक समूह को बताते हैं। परीक्षण से पहले खाते की क्षमताएँ देखें। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · अभियान और मीडिया बनाना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/)[अभियान की जानकारी देखना](/hi/docs/api/campaigns/)[मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/)[अभियान और खाते के आँकड़े](/hi/docs/api/stats/)[टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**अभियान की जानकारी देखना**](/hi/docs/api/campaigns/)[अगला विषय**मौजूदा अभियान बदलना**](/hi/docs/api/manage-campaigns/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API त्रुटियाँ समझना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/errors/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) HTTP स्थिति और त्रुटि कोड साथ पढ़ें। कुंजी के बिना 401 मिलता है। लिखने का अनुरोध दोहराने से पहले फ़ील्ड ठीक करें और दर सीमा पर बताए समय तक रुकें। [Markdown](/hi/docs/api/errors.md) ## जवाब का प्रारूप हर गलती एक ही आकार में होती है: उदाहरण ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | फ़ील्ड | हर बार | अर्थ | | --- | --- | --- | | `error` | हाँ | एक वाक्यांश एक व्यक्ति पढ़ सकता है. इसे दिखाएं; इसे न छोड़ें – वर्णन में सुधार हो सकता है. | | `code` | सभी V1 त्रुटियों पर हाँ | मशीन-पढ़ने के लिए स्थिर. इस पर शाखा। | | `param` | इनपुट गलतियां | फ़ील्ड जो गलत था, एक मार्ग के रूप में: `cpm`, `campaigns[2].channels[0]`, `account_id` । | | `request_id` | अधिकांश गलतियां | `X-Request-Id` प्रतिक्रिया शीर्षक के समान. इसे समर्थन के लिए उद्धृत करें. | कुछ त्रुटियां संदर्भ में जोड़ती हैं: `min_cpm` और `currency` जब Telegram एक प्रस्ताव को बहुत कम से अस्वीकार करता है, `missing` `UNKNOWN_AD_IDS` के साथ, `limit` `QUEUE_FULL` के साथ। ## HTTP स्टेटस कोड | स्थिति | अर्थ | रिटर्न ? | | --- | --- | --- | | 200 | डोन | — | | 202 | अनुमोदित, पृष्ठभूमि में चल रहा है — [कार्य](/hi/docs/api/tasks/) पर सर्वेक्षण करें | — | | 400 | अनुरोध गलत है (पृथ्वी, मूल्य, अनुपस्थिति `account_id`) — या Telegram ने परिवर्तन से इनकार कर दिया | नहीं - अनुरोध को ठीक करें | | 401 | कोई कुंजी, बुरा कुंजी या कुंजी कोई कैबिनेट तक नहीं पहुंचती है | नहीं | | 403 | कुंजी या योजना ऐसा करने की अनुमति नहीं है | नहीं | | 404 | इन कैबिनेटों में यह कुंजी पहुंच नहीं पाई गई | नहीं | | 409 | वर्तमान स्थिति के साथ संघर्ष (कैबिनेट बंद, Telegram सत्र समाप्त हो गया, उसी अनुरोध में प्रगति) | कभी-कभी - कोड देखें | | 413 | फ़ाइल बहुत बड़ा है | नहीं | | 422 | `Idempotency-Key` एक अलग अनुरोध के लिए पुन: उपयोग किया गया | नहीं - एक नया कुंजी का उपयोग करें | | 429 | दर सीमा या क्यूई पूर्ण | हाँ, `Retry-After` सेकंड बाद | | 500 | हमारा बग - पहले से ही लॉग इन किया गया है | पहले राज्य को पढ़ें, फिर बैककोफ के साथ वापस जाएं | | 503 | अस्थायी रूप से उपलब्ध नहीं | `Retry-After` के बाद | ## त्रुटि कोड ### प्रमाणीकरण और पहुंच | कोड | HTTP | क्या करना है | | --- | --- | --- | | `API_KEY_MISSING` | 401 | `X-API-Key` को भेजें। | | `API_KEY_INVALID` | 401 | कुंजी गलत है, रद्द या समाप्त हो गया है. एक नया बनाएं. | | `NO_ACCOUNTS` | 401 | कुंजी अभी तक कोई सक्रिय कैबिनेट नहीं पहुंचती है (कैबिनेट निष्क्रिय, एक्सेस हटा दिया गया)। | | `FORBIDDEN` | 403 | यह कुंजी प्रकार अपने मालिक के लिए अनुमति नहीं है। | | `READ_ONLY_KEY` | 403 | पैनल में कुंजी के लिए **अभियानों का प्रबंधन** पर स्विच करें। | | `WRITE_NOT_ALLOWED` | 403 | यह कुंजी प्रकार (साथी के लिए Orbito Ads द्वारा जारी) कभी नहीं लिखता है। | | `VIEW_ONLY_ACCESS` | 403 | इस कार्यालय में आपकी पहुंच Viewer है. एजेंसी के मालिक से प्रबंधक के लिए पूछें. | | `FEATURE_NOT_AVAILABLE` | 403 | योजना में इस कार्रवाई को शामिल नहीं किया गया है (प्रश्न का नाम `feature` है)। | | `SUBSCRIPTION_REQUIRED` | 403 | कैबिनेट के मालिक के पास कोई सक्रिय सदस्यता नहीं है। | | `ACCOUNT_INACTIVE` | 403 | कार्यालय को निष्क्रिय कर दिया गया है। | ### चीजों की खोज | कोड | HTTP | क्या करना है | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | कुंजी कई कैबिनेट तक पहुंचती है (या यह `ad_id` कई में मौजूद है) — पास `account_id` । | | `ACCOUNT_NOT_FOUND` | 404 | यह `account_id` इस कुंजी के साथ नहीं पहुंच सकता है. देखें `GET /v1/account/info` . | | `CAMPAIGN_NOT_FOUND` | 404 | कुंजी के कार्यालयों में ऐसी कोई अभियान नहीं है (या यह हटा दिया गया है)। | | `TASK_NOT_FOUND` | 404 | इस कुंजी के मालिक के लिए ऐसा कोई कार्य नहीं है। | | `NOT_FOUND` | 404 | इस अभियान और अवधि के लिए कोई आंकड़ा नहीं है। | | `UNKNOWN_AD_IDS` | 400 | कुछ `ad_ids` एक बड़े पैमाने पर कॉल में उन कैबिनेट के अभियान नहीं हैं; `missing` उन्हें सूचीबद्ध करता है। | ### प्रवेश | कोड | HTTP | क्या करना है | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` फ़ील्ड का नाम; `error` कहता है कि क्या गलत है. अज्ञात फ़ील्डों को भी अस्वीकार कर दिया जाता है — चेक स्पिलिंग। | | `UNSUPPORTED_MEDIA` | 400 | JPG, PNG, GIF, WEBP या MP4 को `file` फ़ील्ड में अपलोड करें। | | `FILE_TOO_LARGE` | 413 | एक छोटा फ़ाइल अपलोड करें (10 MB अधिकतम)। | ### Telegram और कैबिनेट राज्य | कोड | HTTP | क्या करना है | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram ने बदलाव से इनकार कर दिया; `error` अपने कारण को ले जाता है. एक कम प्रस्ताव के साथ आप `param: "cpm"`, `min_cpm` और `currency` भी प्राप्त करते हैं. | | `BUDGET_UNCHANGED` | 400 | Telegram ने शीर्ष-अप को स्वीकार किया लेकिन अभियान का बजट नहीं चल रहा था. कैबिनेट संतुलन ( `GET /v1/account/info` ) की जांच करें. | | `INSUFFICIENT_AD_BALANCE` | 400 | आप अभियान से अधिक निकालने के लिए पूछते हैं. कम निकालने, या `withdraw_all` का उपयोग करें. | | `CABINET_AUTH_EXPIRED` | 409 | कैबिनेट की Telegram सत्र समाप्त हो गया. मालिक इसे पैनल में फिर से कनेक्ट करता है; फिर वापस लेता है. | | `CABINET_LOCKED` | 409 | कैबिनेट स्वचालित रूप से प्रबंधित है; मैन्युअल परिवर्तनों को अवरुद्ध किया जाता है। | ### सीमाएं और रिटर्न | कोड | HTTP | क्या करना है | | --- | --- | --- | | `RATE_LIMITED` | 429 | इंतजार करें `Retry-After` सेकंड. देखें [दर सीमा](/hi/docs/api/rate-limits/) . | | `QUEUE_FULL` | 429 | कैबिनेट के पास पहले से ही 5 ऑपरेशन हैं. एक कार्य को पूरा करने के लिए इंतजार करें, फिर रिटर्न करें (समान `Idempotency-Key` ठीक है)। | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | एक `Idempotency-Key` शीर्षक जोड़ें। | | `IDEMPOTENCY_KEY_INVALID` | 400 | 8-255 वर्णों का उपयोग करें; एक UUID आदर्श है। | | `IDEMPOTENCY_KEY_REUSED` | 422 | उस कुंजी का उपयोग एक अलग अनुरोध के लिए किया गया था - नया ऑपरेशन, नया कुंजी। | | `IDEMPOTENCY_IN_PROGRESS` | 409 | इस कुंजी के साथ पहला अनुरोध अभी भी चल रहा है. कुछ सेकंड में वापसी. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | कुछ भी नहीं किया गया. एक ही कुंजी के साथ वापस लौटें. | | `INGEST_DISABLED` | 403 | कुंजी के लिए **Postback प्राप्त करें** पर स्विच करें ( [रूपांतरण](/hi/docs/api/conversions/)) । | | `INTERNAL_ERROR` | 500 | हमारे पक्ष में। राज्य की जांच करें A GET एक लेख लिखने से पहले; संपर्क [@orbitoads](https://t.me/orbitoads) के साथ `request_id` अगर यह जारी रहता है। | ## अनुरोध कब दोहराएँ - **4X के लिए** - अपरिवर्तित वापसी न करें; अनुरोध को ठीक करें. (एक 4xx कभी भी आपके `Idempotency-Key` का उपभोग नहीं करता है, इसलिए आप एक ही कुंजी के साथ निश्चित अनुरोध को वापस कर सकते हैं.) - **429 / 503** - `Retry-After` के बाद वापसी। - **5x के बाद एक लेखन** - परिवर्तन Telegram तक पहुंच सकता है या नहीं हो सकता है. **एक ही** `Idempotency-Key` के साथ वापसी एक ही 5xx (डिजाइन के अनुसार - यह एक डबल कार्रवाई को रोकता है) वापस आती है. `GET` अभियान देखने के लिए क्या हुआ, फिर निर्णय; यदि आप वापस आते हैं, तो एक नया कुंजी का उपयोग करें. - **एक लेखन पर नेटवर्क टाइमआउट** - **एक ही** `Idempotency-Key` के साथ वापसी . यदि पहला प्रयास पारित किया तो आप इसका परिणाम प्राप्त करते हैं; यदि ऐसा नहीं हुआ, तो ऑपरेशन अब चल रहा है. ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। उदाहरण · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | कोड | 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 | ## कार्यान्वयन संबंधी नोट्स ## त्रुटि उत्तर पढ़ना विफलता में success=false और error होते हैं। क्लाइंट में code, सहायता हेतु request_id लें। param अमान्य फ़ील्ड, missing अज्ञात ad ID और min_cpm तथा currency अस्वीकृत बोली बता सकते हैं। ## स्थिति के अनुसार पुनः प्रयास 400 पर इनपुट, 401 पर कुंजी, 403 पर अनुमति सुधारें। 404 पर अकाउंट और विज्ञापन ID जाँचें। 409 को code से संभालें। कोटे और अस्थायी विफलता पर Retry-After मानें। 422 पर वाकई नई क्रिया के लिए नई पहचान चाहिए। ## कार्रवाइयाँ और फ़ील्ड error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## अनुरोध का उदाहरण GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · API त्रुटियाँ समझना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/errors/) ## Error | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/)[एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/)[कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/)[अभियान के पेज पढ़ना](/hi/docs/api/pagination/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**AI असिस्टेंट के लिए API संदर्भ**](/hi/docs/api/ai-assistants/)[अगला विषय**अनुरोध और इवेंट सीमाएँ**](/hi/docs/api/rate-limits/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # एक ही कार्रवाई दोहराना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/idempotency/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) हर निर्माण, प्रतिलिपि, बैच या बजट बदलाव को नया Idempotency-Key दें। दोबारा कोशिश में कुंजी और अनुरोध एक जैसे रखें। दूसरी कार्रवाई में वही कुंजी देने पर त्रुटि आती है। [Markdown](/hi/docs/api/idempotency.md) कभी सर्वर को अनुरोध मिल जाता है लेकिन जवाब आप तक पहुँचने से पहले कनेक्शन टूट जाता है। बिना सुरक्षा के दोहराने पर दो बार राशि जुड़ सकती है या एक ही अभियान दो बार बन सकता है। `Idempotency-Key` से सर्वर पहचानता है कि आप उसी कार्रवाई की पुनः कोशिश कर रहे हैं। ## आइडेम्पोटेंसी कुंजी कब चाहिए | अंत बिंदु | शीर्षक | | --- | --- | | `POST /v1/campaigns` | आवश्यक | | `POST /v1/campaigns/{ad_id}/copy` | आवश्यक | | `POST /v1/campaigns/bulk` | आवश्यक | | `POST /v1/campaigns/{ad_id}/budget` | आवश्यक | | अन्य लेख ( `PATCH` , ब्रेक / रिज़्यूम, `DELETE` , मीडिया) | वैकल्पिक - वे खुद को दोहराने के लिए सुरक्षित हैं | बिना शीर्षक इन वापसी `400 IDEMPOTENCY_KEY_REQUIRED` । ## आइडेम्पोटेंसी कुंजी कैसे भेजें एक नया यादृच्छिक मूल्य उत्पन्न करें - एक UUID - **प्रत्येक ऑपरेशन के लिए** , और जब भी आप उस ऑपरेशन को वापस करते हैं तो **एक ही** मूल्य भेजें। उदाहरण ``` 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 ``` उदाहरण ``` 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 ``` ## दोहराए गए अनुरोध का जवाब | स्थिति | जवाब | | --- | --- | | इस कुंजी के साथ प्रथम अनुरोध | सामान्य रूप से चलता है। | | एक ही कुंजी, एक ही अनुरोध, पहले एक समाप्त | **भंडारण** जवाब, अपरिवर्तित, शीर्षक `Idempotent-Replayed: true` के साथ . कुछ भी फिर से नहीं चलता है। | | एक ही कुंजी, एक ही अनुरोध, पहला अभी भी चल रहा है | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After` . थोड़ी देर के लिए वापस। | | एक ही कुंजी, अलग शरीर या अंत बिंदु | `422 IDEMPOTENCY_KEY_REUSED` . एक नई ऑपरेशन को एक नया कुंजी की आवश्यकता होती है। | | पहला अनुरोध एक 4xx में समाप्त होता है (खराब इनपुट, योजना, क्यूई पूर्ण...) | कुंजी जारी की जाती है: अनुरोध को ठीक करें और इसे **एक ही** कुंजी के साथ भेजें। | | पहली मांग 5xx में समाप्त हुई | 5xx संग्रहीत और पुन: खेला जाता है - परिवर्तन Telegram तक पहुंच सकता है, और कुंजी मौजूद है इसे दो बार चलाने से रोकने के लिए. `GET` के साथ अभियान की जांच करें, फिर एक नया कुंजी का उपयोग करें यदि आप अभी भी कार्य करना चाहते हैं. | "एक ही अनुरोध" का अर्थ है एक ही विधि, मार्ग और JSON शरीर (कुंजी आदेश कोई फर्क नहीं पड़ता)। ## कुंजी संसाधित करने के नियम - कुंजी आपके API कुंजी पर फेंक दी जाती है - दो एकीकरण टकराने में सक्षम नहीं हैं। - कुंजी 24 घंटे के लिए रखा जाता है. इसके बाद एक ही मूल्य एक नया ऑपरेशन शुरू होता है. - 8-255 वर्णों की किसी भी पंक्ति काम करती है; एक UUID सही डिफ़ॉल्ट है। - यदि हम कुंजी को रिकॉर्ड नहीं कर सकते हैं, तो ऑपरेशन नहीं चलता है और आपको `503 IDEMPOTENCY_UNAVAILABLE` मिलता है - एक ही कुंजी के साथ वापसी। पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## कार्यान्वयन संबंधी नोट्स ## प्रति क्रिया एक पहचान बनाने, कॉपी, बल्क और बजट हेतु Idempotency-Key अनिवार्य है। हर क्रिया का 8–255 वर्णों का नया यादृच्छिक मान पुनः प्रयास पर दोहराएँ। 24 घंटे तक API कुंजी, विधि, पथ और JSON से बँधा है। ## समवर्ती या बदले पुनः प्रयास पूरी कॉल Idempotent-Replayed: true के साथ दोहरती है। चल रही डुप्लिकेट 409 व Retry-After और बदली अनुरोध 422 देती है। 4xx जाँच त्रुटि कुंजी छोड़ती है। संग्रहित 5xx के बाद नई क्रिया से पहले रिकॉर्ड पढ़ें। ## कार्रवाइयाँ और फ़ील्ड Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## अनुरोध का उदाहरण GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · एक ही कार्रवाई दोहराना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/idempotency/) ## संबंधित गाइड [API त्रुटियाँ समझना](/hi/docs/api/errors/)[अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/)[कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/)[अभियान के पेज पढ़ना](/hi/docs/api/pagination/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**अनुरोध और इवेंट सीमाएँ**](/hi/docs/api/rate-limits/)[अगला विषय**कतारबद्ध कार्रवाई की निगरानी**](/hi/docs/api/tasks/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # मौजूदा अभियान बदलना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/manage-campaigns/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) टेक्स्ट, लिंक, बोली, दैनिक सीमा, समय, बजट और डिलीवरी बदलें। बैच में अधिकतम 1,000 अभियान आते हैं। टास्क में आंशिक विफलता जाँचें। [Markdown](/hi/docs/api/manage-campaigns.md) सभी कॉल यहाँ **अभियानों का प्रबंधन** और मैनेजर (या मालिक) के साथ एक कुंजी की आवश्यकता होती है कार्यालय तक पहुंच. वे एक अभियान पर कार्य करते हैं, `(account_id, ad_id)` : शरीर में `account_id` पारित करते हैं या पूछताछ करते हैं जब कुंजी कई कार्यालयों तक पहुंचती है. प्रत्येक परिवर्तन अभियान के इतिहास में दिखाई देता है पैनल में चिह्नित **🔌 API** । | कॉल | क्या करता है | जवाब | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | पाठ, लिंक, bid, cap, schedule, on/off | तुरंत | | `POST /v1/campaigns/{ad_id}/pause` | स्विच करें | तुरंत | | `POST /v1/campaigns/{ad_id}/resume` | स्विच पर | तुरंत | | `POST /v1/campaigns/{ad_id}/budget` | बजट जोड़ना या निकालना | तुरंत | | `DELETE /v1/campaigns/{ad_id}` | हटाए | तुरंत | | `POST /v1/campaigns/{ad_id}/copy` | 1 - 100 प्रतियां | 202 + [कार्य](/hi/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | 1000 से अधिक अभियानों पर एक कार्रवाई | 202 + कार्य | सीधे जवाब `data` में अपडेट किए गए [अभियान के उद्देश्य](/hi/docs/api/campaigns/#doc-note-the-campaign-object) को वापस करते हैं। ## संपादन `PATCH /v1/campaigns/{ad_id}` - केवल परिवर्तन भेजें। उदाहरण ``` 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." }' ``` | फ़ील्ड | अर्थ | | --- | --- | | `title`, `text`, `promote_url` | रचनात्मक और लिंक। | | `cpm` | नई बिक्री, 0 से अधिक है। | | `daily_budget` | दैनिक कैप | | `views_per_user` | 1–4. | | `active` | `true` / `false` - पुनरावृत्ति / ब्रेक के समान। | | `schedule` | विज्ञापन दिखाने के लिए दिन और घंटे; `null` इसे हटाता है — देखें [कार्यक्रम](/hi/docs/api/manage-campaigns/#doc-note-schedule) । | | `media`, `picture`, `button`, `website_name` | [बनाए](/hi/docs/api/create-campaigns/#doc-note-fields) के रूप में। | **Telegram की समीक्षा के बारे में क्या है?** बदलाव `cpm`, `active` या `schedule` नहीं - वे एक बार में लागू होते हैं और अभियान चल रहा है। अन्य क्षेत्रों में (`title`, `text`, `promote_url`, `media`, `picture`, `button`, `website_name`, `views_per_user`, `daily_budget`) Telegram के पूर्ण विज्ञापन फॉर्म के माध्यम से संग्रहीत किया जाता है, और Telegram फिर से विज्ञापन की समीक्षा करता है: यह दिखाता है `In Review` अनुमोदित होने तक प्रस्ताव भेजें, ऑन/ऑफ़ और अपने स्वयं के कार्यक्रम परिवर्तन, उन क्षेत्रों के साथ नहीं। लक्ष्य ( `channels`, `countries`, ...) एक मौजूदा विज्ञापन पर परिवर्तन नहीं कर सकता - Telegram इसे अनुमति नहीं देता. नए लक्ष्य के साथ एक नई अभियान बनाएं, या [कॉपी](/hi/docs/api/manage-campaigns/#doc-note-copy) और समायोजित करें. `meta` में जवाब में: | फ़ील्ड | अर्थ | | --- | --- | | `status_warning` | फ़ील्ड बचाए गए थे, लेकिन Telegram ने स्विच को लागू नहीं किया (उदाहरण के लिए, कोई बजट नहीं)। | | `status_intent_only` | आपका ऑन/ऑफ़ विकल्प संग्रहीत किया जाता है और जब Telegram कर सकता है तब लागू होता है (अनुसंधान में, कोई बजट नहीं)। | | `status_already_set` | अभियान पहले से ही उस राज्य में था जिसके लिए आप पूछ रहे थे। | इस लक्ष्य के लिए Telegram के निचले न्यूनतम के लिए एक प्रस्ताव `400 PLATFORM_REJECTED` `param: "cpm"`, `min_cpm` और `currency` के साथ वापस आता है। ## रोकना और फिर शुरू करना उदाहरण ``` 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` का मतलब है कि Telegram अभी तक इस पर कार्रवाई नहीं कर सकता - अभियान की समीक्षा में है, कम हो गया है, या बजट से बाहर है - और आपका विकल्प संग्रहीत है: यह जितनी जल्दी हो सके चलता है. जब स्थिति वास्तव में बदल जाती है, तो आपका [Webhook के बारे में](/hi/docs/api/webhooks/) आग लगती है. ## विज्ञापन दिखाने का समय केवल चुने हुए सप्ताह के दिनों और घंटों पर एक अभियान प्रदर्शित करें - उदाहरण के लिए, सप्ताह के दिन 9:00-18:00, या केवल शाम. उन घंटों के बाहर Telegram विज्ञापन नहीं दिखाता. सेटिंग, परिवर्तन या एक कार्यक्रम को हटाने से अभियान को बंद या बंद नहीं किया जाता है - `status` और `active` रहते हैं जैसा कि वे हैं. यह प्रत्येक कैबिनेट प्रकार पर काम करता है. उदाहरण ``` 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" } }' ``` | फ़ील्ड | अर्थ | | --- | --- | | `days` | `mon` , `tue` , `wed` , `thu` , `fri` , `sat` , `sun` - प्रत्येक घंटों (0-23) को पकड़ता है विज्ञापन उस दिन चलता है. `9` का मतलब 09:00–09:59, इसलिए `[9, …, 17]` 9:00–18:00 है. एक दिन आप बाहर निकलते हैं, या `[]` के रूप में भेजते हैं, नहीं चलता. कम से कम कुल में एक घंटे। | | `timezone` | जिस घड़ी के घंटे अनुसरण करते हैं. `"viewer"` - प्रत्येक दर्शक का अपना स्थानीय समय; केवल दर्शकों को लक्षित करने के लिए ( `target_type: "users"` ) अन्यथा एक UTC छूट: `"+03:00"` , `"-05:00"` , `"+05:30"` . Telegram छूट प्रदान करता है: `-12:00` से `+14:00` , प्लस `-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"` और `"+3"` के बीच पूरे घंटे भी स्वीकार किए जाते हैं। | `"schedule": null` अनुसूची को हटा देता है - विज्ञापन फिर से घड़ी के चारों ओर चलता है। **कोई बजट के बिना एक अभियान एक कार्यक्रम नहीं ले सकता है।** Telegram केवल एक अभियान पर एक अनुसूची स्वीकार करता है जो चल सकता है, इसलिए `Stopped` अभियान के साथ कुछ भी नहीं छोड़ता आप `400 PLATFORM_REJECTED` के साथ `param: "schedule"` प्राप्त करते हैं और कुछ भी नहीं बदलता है - पहले बजट जोड़ें, फिर अनुसूची सेट करें. एक रुक ( `On Hold` ) अभियान इसे ठीक करता है. अभियान ऑब्जेक्ट एक ही रूप में कार्यक्रम वापस करता है, हमेशा सभी सात दिनों के साथ और `"+03:00"` के रूप में लिखित छूट - इसलिए आप इसे पढ़ सकते हैं, एक दिन बदल सकते हैं और इसे वापस भेज सकते हैं. `GET /v1/campaigns/{ad_id}` वर्तमान कार्यक्रम देता है, भले ही यह सीधे Telegram में बदल गया हो - देखें [ताजा](/hi/docs/api/campaigns/#doc-heading-freshness) . घंटे बाहर 0-23, एक अज्ञात दिन, एक खाली कार्यक्रम, एक चैनल / बॉट / खोज विज्ञापन पर `"viewer"` या एक छूट Telegram `param` (उदाहरण के लिए, `schedule.days.mon`) में सटीक क्षेत्र के साथ `400 VALIDATION_ERROR` नहीं प्रदान करता है । [कॉपी](/hi/docs/api/manage-campaigns/#doc-note-copy) और पुनर्जीवित अभियान उन अभियानों के कार्यक्रम को बनाए रखते हैं जिनसे वे आते हैं. कई अभियानों पर एक ही समय में एक कार्यक्रम डालने के लिए, बड़े पैमाने पर कार्रवाई `set_schedule` का उपयोग करें. ## अभियान का बजट `POST /v1/campaigns/{ad_id}/budget` कैबिनेट संतुलन और अभियान के बीच पैसा स्थानांतरित करता है. `Idempotency-Key` की आवश्यकता होती है. उदाहरण ``` 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` | प्रभाव | | --- | --- | --- | | `add` | आवश्यक | कैबिनेट संतुलन अभियान | | `withdraw` | आवश्यक | अभियान → कैबिनेट संतुलन. अभियान की तुलना में अधिक है → `400 INSUFFICIENT_AD_BALANCE`. | | `withdraw_all` | — | अभियान में सब कुछ बाकी है – कैबिनेट संतुलन। | `meta.moved` वह है जो वास्तव में स्थानांतरित किया गया है; `meta.partial` `true` है जब मांग की तुलना में कम वापस ले जाया जा सकता है. पैसा कभी भी API के माध्यम से कैबिनेट नहीं छोड़ता है. ## अभियान की प्रतिलिपि `POST /v1/campaigns/{ad_id}/copy` एक ही लक्ष्य के साथ प्रतियां बनाता है; जो कुछ भी आप भेजते हैं वह मूल से अधिक होता है. `Idempotency-Key` की आवश्यकता होती है. एक कार्य वापस करता है जिसका `ad_ids` प्रतियां हैं. उदाहरण ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | फ़ील्ड | अर्थ | | --- | --- | | `copies` | 1–100, डिफ़ॉल्ट 1। | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | `budget` : `0` या कम से कम कैबिनेट के `min_budget` के लिए अतिरिक्त। | | `schedule` | कॉपी मूल के [कार्यक्रम](/hi/docs/api/manage-campaigns/#doc-note-schedule) को रखते हैं; इसे प्रतिस्थापित करने के लिए एक भेजें, या `null` किसी के लिए नहीं। | | `group_id` / `new_group_name` | कॉपी को एक समूह में रखें। | ## हटाना उदाहरण ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` एक हटाए गए अभियान जिसके पास दृश्य हैं, आपके आंकड़ों में `status: "Deleted"` के साथ रहता है; एक जो कभी नहीं चला जाता है, हटा दिया जाता है. फिर से हटाना `404 CAMPAIGN_NOT_FOUND` लौटता है. ## सामूहिक कार्रवाइयाँ `POST /v1/campaigns/bulk` एक कैबिनेट के 1,000 अभियानों तक एक कार्रवाई लागू करता है. `Idempotency-Key` की आवश्यकता होती है. एक कार्य वापस करता है. उदाहरण ``` 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` | अतिरिक्त क्षेत्र | प्रभाव | | --- | --- | --- | | `pause` | — | स्विच करें | | `resume` | — | स्विच पर | | `add_budget` | `amount` | प्रत्येक अभियान में शामिल करें | | `withdraw_budget` | `amount` | हर अभियान से बाहर निकलना | | `withdraw_all_budget` | — | हर अभियान से सब कुछ निकालना | | `set_cpm` | `cpm` | प्रत्येक पर एक ही प्रस्ताव लगाएं | | `set_schedule` | `schedule` | प्रत्येक पर एक ही [कार्यक्रम](/hi/docs/api/manage-campaigns/#doc-note-schedule) सेट करें; `"schedule": null` इसे हटा देता है | | `delete` | — | हर को हटा दें | प्रत्येक `ad_id` उस कैबिनेट का एक लाइव अभियान होना चाहिए; अन्यथा कुछ भी नहीं है और आप `missing` में अपराधियों के साथ `400 UNKNOWN_AD_IDS` प्राप्त करते हैं. डुप्लिकेट को अनदेखा किया जाता है. कार्य के `errors` सूची Telegram अभियानों को अस्वीकार कर दिया जाता है - `set_schedule` के साथ, बिना बजट के भी अभियान और अभियान जहां `"timezone": "viewer"` आवेदन नहीं कर सकते क्योंकि वे एक दर्शक को लक्षित नहीं करते हैं. ## प्रति कार्रवाई अधिक लागत वाले अभियान रोकना उदाहरण ``` 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 संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## PATCH `/api/v1/campaigns/{ad_id}` अभियान की दी गई सेटिंग बदलें और बाकी फ़ील्ड सुरक्षित रखें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | | `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" } } ``` ### अनुरोध की संरचना 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" } ``` अनुरोध परिणाम और उत्तर फ़ील्ड | API | अर्थ | | --- | --- | | status_warning | फ़ील्ड सहेजे गए, पर डिलीवरी चालू या बंद नहीं हो सकी, जैसे बजट कम होने पर। | | status_intent_only | माँगी गई स्थिति दर्ज है। समीक्षा या बजट की शर्त पूरी होने पर लागू हो सकती है। | | status_already_set | अभियान पहले ही उसी स्थिति में था। | [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` अभियान के प्रदर्शन को रोकने का अनुरोध करें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | | `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` क्षमता उपलब्ध होने पर अभियान फिर शुरू करने का अनुरोध करें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | | `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` अकाउंट बैलेंस और एक अभियान के बीच बजट स्थानांतरित करें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | हाँ | | `X-API-Key` | header | `string` | हाँ | 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 } } ``` ### अनुरोध की संरचना 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` विरासत में मिले लक्ष्यीकरण और वैकल्पिक बदलावों वाली अधिकतम 100 प्रतियाँ कतार में डालें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | हाँ | | `X-API-Key` | header | `string` | हाँ | 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": [] } } ``` ### अनुरोध की संरचना 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` एक अकाउंट के अधिकतम 1,000 अभियानों पर एक क्रिया कतार में डालें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | हाँ | | `X-API-Key` | header | `string` | हाँ | 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": [] } } ``` ### अनुरोध की संरचना 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}` अभियान हटाएँ और उपलब्ध ऐतिहासिक प्रदर्शन आँकड़े सुरक्षित रखें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `ad_id` | path | `integer` | हाँ | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | | `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 } } ``` ## कार्यान्वयन संबंधी नोट्स ## बदलने योग्य फ़ील्ड और समय cpm, active या schedule बदलने पर नई सामग्री समीक्षा नहीं होती। सामग्री बदलने पर हो सकती है। मौजूदा लक्ष्यीकरण स्थिर है। सप्ताह दिवस, 0–23 घंटे व UTC ऑफ़सेट दें। users हेतु viewer है, null शेड्यूल हटाता है। ## अकाउंट के अंदर बजट आवंटन add राशि अभियान में लाता है। withdraw माँगी रकम और withdraw_all बचा बजट अकाउंट में लौटाता है। meta.moved व meta.partial जाँचें। बाहरी टॉप-अप, इनवॉइस और रिफ़ंड बिलिंग में हैं। ## स्वीकृति और पूर्णता बनाने, कॉपी और बल्क अनुरोध HTTP 202 तथा काम का id देते हैं। Retry-After के अनुसार GET /api/v1/tasks/{id} जाँचें। completed पर भी failed और errors पढ़ें। ## कार्रवाइयाँ और फ़ील्ड 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 ## अनुरोध का उदाहरण GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · मौजूदा अभियान बदलना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | days | object | | timezone | string | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/)[अभियान की जानकारी देखना](/hi/docs/api/campaigns/)[अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/)[अभियान और खाते के आँकड़े](/hi/docs/api/stats/)[टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**अभियान और मीडिया बनाना**](/hi/docs/api/create-campaigns/)[अगला विषय**अभियान और खाते के आँकड़े**](/hi/docs/api/stats/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # अभियान के पेज पढ़ना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/pagination/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) खाली cursor से शुरू करें। फ़िल्टर बदले बिना meta.next_cursor को null आने तक इस्तेमाल करें। एक पेज में अधिकतम 500 अभियान हैं। [Markdown](/hi/docs/api/pagination.md) केवल `GET /v1/campaigns` की सूची में पृष्ठांकन होता है। इसके दो तरीके हैं। ## कर्सर आधारित पेजिनेशन पहले अनुरोध में `cursor=` खाली भेजें। उसके बाद `meta.next_cursor` के मान से आगे बढ़ें, जब तक `null` न मिले। उदाहरण ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` उदाहरण ``` 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 ``` - क्यूसर को अंधेरे के रूप में व्यवहार करें. यह केवल एक ही फ़िल्टर के साथ वैध है. - आदेश निश्चित है (कैबिनेट, फिर नवीनतम `ad_id` पहले), इसलिए पृष्ठ स्थिर रहते हैं जबकि अभियानों को जोड़ा जाता है। - कोई ऊपरी सीमा नहीं - यह है कि आप 100,000 अभियानों के साथ एक कैबिनेट पढ़ते हैं। - फ़िल्टर `bot_username`, `promote_domain` और `type` हमेशा क्यूसर मोड का उपयोग करते हैं। - पाठ्यक्रम मोड कुछ भारी फ़ील्ड छोड़ देता है (टर्मिंग सारांश, मीडिया, अंतिम कार्रवाई) एक अभियान के पूर्ण रिकॉर्ड के लिए [`GET /v1/campaigns/{ad_id}`](/hi/docs/api/campaigns/#doc-note-get-one-campaign) का उपयोग करें। ## छोटे खातों के लिए ऑफ़सेट पेजिनेशन `cursor` के बिना, `limit` और `offset` के साथ अंतिम बिंदु पृष्ठों को वर्गीकृत किया जा सकता है ( `sortBy`, `sortOrder` ). यह अधिकतम **500 विज्ञापनों के लिए प्रति अभियान** पर पढ़ता है : पिछले कि `meta.truncated` `true` और `meta.next_step` आपको क्यूसर मोड में स्विच करने के लिए कहता है। उदाहरण ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## पृष्ठ का आकार `limit` से प्रति पृष्ठ 1–500 परिणाम माँग सकते हैं। डिफ़ॉल्ट 100 है। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। उदाहरण · 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' ``` उदाहरण · 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' ``` ## कार्यान्वयन संबंधी नोट्स ## बड़ी सूची पढ़ना GET /api/v1/campaigns में cursor= और फ़िल्टर दें। अगली बार वही फ़िल्टर और ज्यों का त्यों meta.next_cursor दें। null पर रुकें। limit 1–500, डिफ़ॉल्ट 100 है। ## क्रम और ऑफ़सेट सीमा कर्सर अकाउंट और घटते ad_id से क्रम बनाता है। bot_username, promote_domain, type यह मोड चुनते हैं। ऑफ़सेट में sortBy, sortOrder और प्रति अकाउंट 500 अभियान तक हैं। meta.truncated पर कर्सर लें। ## कार्रवाइयाँ और फ़ील्ड GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## अनुरोध का उदाहरण GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · अभियान के पेज पढ़ना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [API त्रुटियाँ समझना](/hi/docs/api/errors/)[अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/)[एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/)[कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**कतारबद्ध कार्रवाई की निगरानी**](/hi/docs/api/tasks/)[अगला विषय**उपलब्ध विज्ञापन खाते**](/hi/docs/api/accounts/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # अनुरोध और इवेंट सीमाएँ [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/rate-limits/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) हर कुंजी में पढ़ने, लिखने और घटनाओं की अलग सीमा है। प्रकाशित सीमा 60 रीड और 30 राइट प्रति मिनट तथा 20 रूपांतरण प्रति सेकंड है। खाते की कतार भी सीमित है। [Markdown](/hi/docs/api/rate-limits.md) हर कुंजी के लिए पढ़ने, लिखने और कन्वर्ज़न भेजने के अलग कोटे हैं। आँकड़े बार-बार पढ़ने से अभियान रोकने की सुविधा बाधित नहीं होती। ट्रैकर से एक साथ कई घटनाएँ आने पर भी बाकी कोटे उपलब्ध रहते हैं। | बजट | अनुपालन के लिए | सीमा | | --- | --- | --- | | **पढ़ाई** | हर `GET` | 60 अनुरोध प्रति मिनट | | **लिखें** | `POST` , `PATCH` , `DELETE` में से प्रत्येक, रूपांतरण के अलावा | 30 अनुरोध प्रति मिनट | | **में परिवर्तन** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 20 घटनाओं प्रति सेकंड, 1000 तक उड़ान | कोटा लगातार भरता रहता है। थोड़े समय में पूरे मिनट की उपलब्ध सीमा इस्तेमाल की जा सकती है। अभियान, आँकड़े और कुल योग सिंक करने में आम तौर पर 3–4 रीड अनुरोध लगते हैं। एक विशिष्ट एकीकरण के लिए और अधिक की जरूरत है? [@orbitoads](https://t.me/orbitoads) पूछें - प्रति कुंजी सीमाओं को बढ़ाया जा सकता है। ## HTTP हेडर हर जवाब के हेडर मौजूदा सीमा और बचा हुआ कोटा बताते हैं। उदाहरण ``` 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 ``` ## कम अनुरोधों में अधिक काम - **ब्लोब के बजाय गेंदबाजी** ब्रेक 300 अभियानों में से एक है `POST /v1/campaigns/bulk` , 300 ब्रेक कॉल नहीं. देखें [अभियानों का प्रबंधन](/hi/docs/api/manage-campaigns/#doc-note-bulk) . - **बैच में बनाया जाता है।** `POST /v1/campaigns` 100 अभियानों तक लेता है। - **सर्वेक्षण के बजाय वेबहाउस।** स्थिति परिवर्तन तब आते हैं जब वे होते हैं; घंटे के आंकड़े स्वयं आते हैं. देखें [Webhooks के बारे में](/hi/docs/api/webhooks/) . - **बैच रूपांतरण** `POST /v1/postback` अनुरोध पर 1,000 घटनाओं तक स्वीकार करता है (प्रत्येक घटना अभी भी घटना बजट के विपरीत गिनती करती है - बैचिंग गोल यात्राओं को बचाती है, क्यूटा नहीं)। ## अन्य सीमाएँ | क्या | सीमा | | --- | --- | | कैबिनेट के आधार पर ऑपरेशन या निष्पादित करें | 5 बनाता है + 5 अन्य ऑपरेशन (कोपी, बड़े पैमाने पर) 6वीं वापसी `429 QUEUE_FULL`. | | अनुरोध के आधार पर अभियान | 100 | | प्रतिलिपि अनुरोध पर कॉपी | 100 | | बड़े पैमाने पर अनुरोध के लिए अभियान | 1,000 | | अपलोड फ़ाइल | 10 एमबी | | पृष्ठ आकार के लिए `GET /v1/campaigns` | 500 | ## पुनः प्रयास से पहले प्रतीक्षा 429 के बाद `Retry-After` में दिए सेकंड तक प्रतीक्षा करें। स्वचालित प्रक्रियाओं में थोड़ा यादृच्छिक विलंब जोड़ें ताकि सभी वर्कर एक साथ दोबारा अनुरोध न भेजें। उदाहरण ``` 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); } ``` पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## कार्यान्वयन संबंधी नोट्स ## प्रति कुंजी अलग कोटे प्रति कुंजी 60 रीड/मिनट और 30 राइट/मिनट हैं। रूपांतरण में 20 घटना/सेकंड, बर्स्ट 1,000 तक। बैच का हर आइटम गिना जाता है। X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset देखें। ## कतार और पुनः प्रयास प्रति अकाउंट पाँच क्रिएट और पाँच अन्य काम कतार या प्रगति में हो सकते हैं। हर प्रकार से एक साथ एक चलता है। 429 पर Retry-After सेकंड रुकें। ## कार्रवाइयाँ और फ़ील्ड 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## अनुरोध का उदाहरण GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## रिपोर्ट आयाम API एक अनुरोध में 100 अभियान बना सकती है, एक कॉपी अनुरोध में 100 प्रतिलिपियाँ और एक बैच में 1,000 मौजूदा अभियान स्वीकार करती है। 202 प्रतिक्रिया कतार के कार्य की पहचान देती है। अगला समूह बदलने से पहले failed और errors देखें। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · अनुरोध और इवेंट सीमाएँ | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/rate-limits/) ## संबंधित गाइड [API त्रुटियाँ समझना](/hi/docs/api/errors/)[एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/)[कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/)[अभियान के पेज पढ़ना](/hi/docs/api/pagination/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**API त्रुटियाँ समझना**](/hi/docs/api/errors/)[अगला विषय**एक ही कार्रवाई दोहराना**](/hi/docs/api/idempotency/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # अभियान और खाते के आँकड़े [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/stats/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) अलग अभियान की पंक्तियाँ, खाते के कुल या मुद्रा अनुसार रैंकिंग चुनें। रोलिंग अवधि या अपनी तारीख और घंटे रखें। निर्यात में अवधि भी दर्ज करें। [Markdown](/hi/docs/api/stats.md) आँकड़ों के लिए अलग-अलग विस्तार वाले तीन तरीके हैं। हर तरीका कुंजी की पहुँच वाले सभी खातों के आँकड़े खाते के अनुसार लौटाता है। | अंत बिंदु | लौटें | | --- | --- | | `GET /v1/stats` | प्रत्येक अवधि के लिए अभियानों की संख्या | | `GET /v1/stats/total` | प्रत्येक कैबिनेट के कुल प्लस चार्ट अंक | | `GET /v1/stats/analytics` | कुल मुद्रा, चार्ट, शीर्ष अभियानों द्वारा विभाजित | किसी एक अभियान की अवधि-विशेष की जानकारी के लिए `GET /v1/campaigns/{ad_id}/history` उपयोग करें। [`GET /v1/campaigns/{ad_id}/history`](/hi/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## रिपोर्ट की अवधियाँ | `period` | खिड़की | | --- | --- | | `1d` | पिछले 24 घंटे (आधारित `/stats` और `/stats/total` के लिए) | | `7d` | पिछले 7 दिनों में | | `30d` | पिछले 30 दिनों (आधारित `/stats/analytics` के लिए) | | `all` | हर समय | | `custom` | `startDate` और `endDate` ( `YYYY-MM-DD` ), वैकल्पिक रूप से `startHour` और `endHour` (0–23) | किसी भी `h` या `d` भी काम करता है ( `6h` , `14d` , 365 दिनों तक) एक अज्ञात मूल्य पिछले 24 घंटे के रूप में पढ़ा जाता है - यह एक त्रुटि वापस नहीं करता है, इसलिए अपने स्क्रैपिंग की जांच करें. सभी समय UTC हैं. उदाहरण ``` # 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 प्रत्येक अभियान के लिए, कैबिनेट द्वारा नाजुक: `data[account_id][ad_id]` । उदाहरण ``` { "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" } } ``` कुंजी तार हैं; यहां मूल्यों **संख्याएँ** (कंपनी वस्तु के विपरीत) हैं. `cpa` प्रति कार्रवाई खर्च किया जाता है; `ctr` एक प्रतिशत है. ## GET /v1/stats/total डैशबोर्ड अंत बिंदु: कुल और प्रत्येक कैबिनेट के लिए एक चार्ट। उदाहरण ``` { "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` अंक घंटे या दिन के आधार पर अवधि के आधार पर हैं. `cabinetType` मुद्रा देता है ( `euro` → EUR , `ton` → TON , `stars` → सितारे)। ## GET /v1/stats/analytics `/stats/total` के रूप में, प्लस मुद्रा और शीर्ष अभियानों द्वारा विभाजित खर्च करते हैं। उदाहरण ``` { "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" } } ``` ## टिप्पणियाँ - राज्य Telegram के स्वयं के गिनती का अनुसरण करते हैं, जो नियमित रूप से Orbito Ads के लिए सिंथेटिक हो जाता है; नवीनतम घंटे सिंथिक के आगमन के बाद भर जाता है। - अलग-अलग मुद्राओं के साथ कैबिनेटों के माध्यम से `spent` को कभी नहीं जोड़ें। - रूपांतरण के लिए आप खुद को ट्रैक करते हैं (लिड्स, जमा, बिक्री) देखें [रूपांतरण](/hi/docs/api/conversions/) - Telegram 's `actions` में शामिल हो जाते हैं और बॉट शुरू होता है, न कि आपके रूपांतरित। - [Webhook के लिए घंटे का भोजन](/hi/docs/api/webhooks/#doc-heading-hourly_digest) को हर कुछ मिनटों में सर्वेक्षण के आंकड़ों से अधिक पसंद करें। ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## GET `/api/v1/stats` अकाउंट और अभियान के अनुसार अवधि के आँकड़े पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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` चुनी अवधि के अकाउंट कुल और चार्ट बिंदु पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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` मुद्रा विभाजन, चार्ट और अभियान रैंकिंग प्राप्त करें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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" } } ``` ## कार्यान्वयन संबंधी नोट्स ## बैलेंस और मुद्राएँ हर अकाउंट में currency, balance_updated_at और min_budget देखें। अभियान में राशि व दर दशमलव स्ट्रिंग या null हो सकती हैं। रिपोर्ट योग संख्याएँ हैं। EUR, TON और Stars अलग रखें। ## अवधि और UTC घंटे period में 1d, 7d, 30d, all, custom या 365 दिन तक Nh/Nd दें। custom में startDate, endDate अनिवार्य और startHour/endHour 0–23 UTC वैकल्पिक हैं। stats और total डिफ़ॉल्ट 1d, analytics 30d है। ## एक्शन की व्याख्या actions चैनल से जुड़ना या बॉट आरंभ जैसी प्लेटफ़ॉर्म घटनाएँ है। ट्रैकर की लीड, खरीद व आय हेतु conversions देखें। /stats/analytics प्रति अकाउंट चार्ट, कुल और topCampaigns देता है। ## कार्रवाइयाँ और फ़ील्ड 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 ## अनुरोध का उदाहरण GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · अभियान और खाते के आँकड़े | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/stats/) ## StatsNumbers | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/)[अभियान की जानकारी देखना](/hi/docs/api/campaigns/)[अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/)[मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/)[टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) संदर्भ अपडेट की तारीख 2026-10-26 [पिछला विषय**मौजूदा अभियान बदलना**](/hi/docs/api/manage-campaigns/)[अगला विषय**टार्गेटिंग शब्दकोश और समूह**](/hi/docs/api/targeting/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # टार्गेटिंग शब्दकोश और समूह [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/targeting/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) अनुरोध बनाने से पहले देश, भाषा और विषय के कोड लें। सहेजे गए अभियान फ़ोल्डर के लिए समूह देखें। शब्दकोश कैश करें और विकल्प बदलने पर अपडेट करें। [Markdown](/hi/docs/api/targeting.md) ## GET /v1/targeting [`POST /v1/campaigns`](/hi/docs/api/create-campaigns/) कोड स्वीकार करते हैं. सूची वे हैं जो Orbito Ads बनाने फॉर्म का उपयोग करते हैं, इसलिए यहां से एक कोड कभी अज्ञात के रूप में अस्वीकार नहीं किया जाता है. उदाहरण ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "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" ] } } ``` | सूची | में इस्तेमाल किया | नोट्स | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 दो-लिखित कोड, प्लस Telegram के अपने `FT` (नाम संख्याएं)। | | `languages[].code` | `languages` | Telegram की भाषा कुंजी - e.g . `pt-br` और `pt-pt` , `pt` नहीं। | | `topics[].id` | `topics`, `exclude_topics` | संख्याएं; आईडी लगातार नहीं हैं। | | `buttons` | `button` | केवल उन कार्यालयों में जिनमें से `features.ad_button` `true` है। | ये सूचियाँ कम बदलती हैं। इन्हें एक बार लेकर एक दिन के लिए कैश करें। ## टार्गेटिंग समूह समूह पैनल में अभियानों के लिए फ़ोल्डर हैं. नए अभियानों या प्रतियों को `group_id` (अस्तित्व में) या `new_group_name` (निर्मित, या फिर से उपयोग किया जाता है यदि नाम मौजूद है) के साथ एक में डालें. ### GET /v1 समूह उदाहरण ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` उदाहरण ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` `account_id` के बिना आप प्रत्येक कार्यालय के समूह प्राप्त करते हैं जो कुंजी पहुंचता है. एक समूह एक कार्यालय से संबंधित है — `group_id` दूसरे कार्यालय से अस्वीकार कर दिया जाता है. ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## GET `/api/v1/targeting` समर्थित देश, भाषा, विषय और बटन मान पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | हाँ | 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` अभियान समूह सूचीबद्ध करें, चाहें तो एक अकाउंट तक सीमित करें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | हाँ | 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" } ] } ``` ## कार्यान्वयन संबंधी नोट्स ## फ़ॉर्म के मान लौटे हुए देश व भाषा कोड, संख्यात्मक विषय ID और बटन मान ही दें। pt-br और pt-pt अलग क्षेत्रीय कोड हैं। button हेतु अकाउंट समर्थन चाहिए। ## समूह स्वामित्व हर समूह एक अकाउंट का है। बनाते या कॉपी करते समय उसी का group_id या new_group_name दें। मौजूदा समान नाम वाला समूह दोबारा इस्तेमाल हो सकता है। ## कार्रवाइयाँ और फ़ील्ड GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## अनुरोध का उदाहरण GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## दर्शक परीक्षण सेटिंग अभियान स्कीमा चार टार्गेटिंग मोड अलग करता है। चैनल channels में, बॉट नाम bots में और खोज शब्द search_keywords में जाते हैं। देश, भाषा और विषय उपयोगकर्ता दर्शक समूह को बताते हैं। परीक्षण से पहले खाते की क्षमताएँ देखें। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · टार्गेटिंग शब्दकोश और समूह | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/targeting/) ## Targeting | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## Group | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/)[अभियान की जानकारी देखना](/hi/docs/api/campaigns/)[अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/)[मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/)[अभियान और खाते के आँकड़े](/hi/docs/api/stats/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**अभियान और खाते के आँकड़े**](/hi/docs/api/stats/)[अगला विषय**अभियान के इवेंट प्राप्त करना**](/hi/docs/api/webhooks/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # कतारबद्ध कार्रवाई की निगरानी [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/tasks/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) निर्माण, कॉपी या बैच बदलाव 202 और टास्क ID लौटा सकते हैं। प्रगति, कुल और अलग त्रुटियों के लिए टास्क देखें। प्रभावित अभियानों के ID सहेजें। [Markdown](/hi/docs/api/tasks.md) कुछ ऑपरेशन प्रति अभियान में एक बार Telegram पर बात करते हैं, इसलिए वे HTTP अनुरोध की तुलना में अधिक समय ले सकते हैं. ये अंतिम परिणाम के बजाय **कार्य** के साथ `202 Accepted` वापस आते हैं: - `POST /v1/campaigns` - बनाया गया - `POST /v1/campaigns/{ad_id}/copy` - प्रतिलिपि - `POST /v1/campaigns/bulk` — ब्रेक, पुनरावृत्ति, बजट, CPM या कई को हटा दें एकल-कंपनी परिवर्तन ( `PATCH` , ब्रेक, पुनरावृत्ति, बजट, हटाएँ) सीधे जवाब – कोई कार्य नहीं। ## HTTP 202 जवाब उदाहरण ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` उदाहरण ``` { "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} उदाहरण ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` `status` अंतिम होने तक इसे पॉल करें; जबकि एक कार्य `pending` या `running` है, जवाब `Retry-After: 2` ले जाता है - सर्वेक्षणों के बीच लंबे समय तक इंतजार करें. एक ही मालिक का कोई भी कुंजी कार्य पढ़ सकता है. | फ़ील्ड | अर्थ | | --- | --- | | `type` | `create` , `copy` , `status` (बल्क ब्रेक / रिकॉर्ड), `budget` , `cpm` , `delete` | | `status` | नीचे देखें | | `progress` / `total` | अब तक के कार्यों को पूरा किया गया है / कुल मिलाकर | | `succeeded` / `failed` | एक बार पता चला, एक बार पता चल गया | | `ad_ids` | कार्यों को बनाया (संपादित करें, कॉपी करें) या परिवर्तित करें (बल्क) | | `errors[]` | 50 तक की विफलताएं: `{ ad_id, index, error }` - `index` आपके `campaigns` क्रम में स्थिति है। | | `paused_reason` | क्यों एक कार्य इंतजार करना बंद कर दिया, e.g . कार्यालय संतुलन से बाहर चला गया | | `error` | क्यों पूरा कार्य विफल हो गया | ### स्थिति | स्थिति | अर्थ | अंतिम ? | | --- | --- | --- | | `pending` | Queued - कैबिनेट एक ही समय में एक बनाता है और दूसरा ऑपरेशन करता है | नहीं | | `running` | प्रगति में | नहीं | | `paused` | इंतजार करने के लिए रुक गया - आमतौर पर कैबिनेट संतुलन मध्य रास्ते से बाहर चला गया. कैबिनेट को ऊपर उठाएं; इसे पैनल से पुनर्स्थापित करें | नहीं | | `completed` | `failed` और `errors` की जांच करें – एक पूरा कार्य में व्यक्तिगत विफलताएं हो सकती हैं | हाँ | | `failed` | कुल मिलाकर कार्य विफल हो गया — देखें `error` | हाँ | | `cancelled` | पैनल से रद्द | हाँ | ## अभियान बनाने का काम कैसे पूरा होता है - नई अभियान आईडी `ad_ids` में दिखाई देते हैं जब कार्य पूरा हो जाता है (वे अंतिम अभियान के निर्माण के बाद कैबिनेट को सिंक्रनाइज़ करके पाए जाते हैं)। - यदि एक बैच के **पहले** अभियान विफल हो जाता है, तो कार्य 100 बार एक ही त्रुटि को दोहराने के बजाय वहां रुक जाता है. इनपुट को ठीक करें और फिर से भेजें. - यदि Telegram किसी अभियान के चैनलों या बोटों में से किसी को हल नहीं कर सकता है, तो यह अभियान उनमें से `No targets found: …` को सूचीबद्ध करके विफल हो जाता है। - Telegram हर नए विज्ञापन की समीक्षा करता है। आमतौर पर एक प्रोजेक्ट शुरू होता है `In Review`A : A [Webhook के बारे में](/hi/docs/api/webhooks/) यह आपको बताता है कि जब यह बदल जाता है। ## स्थिति जाँचने का लूप उदाहरण ``` 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)); } } ``` उदाहरण ``` 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 संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। ## GET `/api/v1/tasks/{id}` काम की प्रगति, विज्ञापन ID और प्रति आइटम विफलता पढ़ें। | पैरामीटर | स्थान | प्रारूप | अनिवार्य | | --- | --- | --- | --- | | `id` | path | `integer` | हाँ | | `X-API-Key` | header | `string` | हाँ | 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" } } ``` ## कार्यान्वयन संबंधी नोट्स ## स्वीकृति और पूर्णता बनाने, कॉपी और बल्क अनुरोध HTTP 202 तथा काम का id देते हैं। Retry-After के अनुसार GET /api/v1/tasks/{id} जाँचें। completed पर भी failed और errors पढ़ें। ## काम के नतीजे pending, running, paused बीच की स्थितियाँ हैं। completed, failed, cancelled अंतिम हैं। progress, total, ad_ids और 50 तक आइटम त्रुटियाँ देखें। paused_reason पैनल में हल की जाने वाली बजट कमी बता सकता है। ## कार्रवाइयाँ और फ़ील्ड 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 ## अनुरोध का उदाहरण GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## रिपोर्ट आयाम API एक अनुरोध में 100 अभियान बना सकती है, एक कॉपी अनुरोध में 100 प्रतिलिपियाँ और एक बैच में 1,000 मौजूदा अभियान स्वीकार करती है। 202 प्रतिक्रिया कतार के कार्य की पहचान देती है। अगला समूह बदलने से पहले failed और errors देखें। ## प्रोटोकॉल संदर्भ | मेथड | पथ | पैरामीटर | अनुरोध सामग्री | उत्तर कोड | | --- | --- | --- | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## स्कीमा फ़ील्ड और सीमाएँ · कतारबद्ध कार्रवाई की निगरानी | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/tasks/) ## Task | फ़ील्ड | फ़ील्ड प्रकार | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/openapi.yaml) ## संबंधित गाइड [API त्रुटियाँ समझना](/hi/docs/api/errors/)[अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/)[एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/)[अभियान के पेज पढ़ना](/hi/docs/api/pagination/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**एक ही कार्रवाई दोहराना**](/hi/docs/api/idempotency/)[अगला विषय**अभियान के पेज पढ़ना**](/hi/docs/api/pagination/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # अभियान के इवेंट प्राप्त करना [Orbito Ads · हिन्दी · HTML](https://orbitoads.pro/hi/docs/api/webhooks/) स्रोत जाँच की तिथि · 2026-11-27 ### दस्तावेज़ों के विषय [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [सभी दस्तावेज़](/hi/docs/) शुरुआत करें - [API की शुरुआत](/hi/docs/api/) - [कुंजियाँ और खाता अनुमतियाँ](/hi/docs/api/authentication/) - [AI असिस्टेंट के लिए API संदर्भ](/hi/docs/api/ai-assistants/) मूल बातें - [API त्रुटियाँ समझना](/hi/docs/api/errors/) - [अनुरोध और इवेंट सीमाएँ](/hi/docs/api/rate-limits/) - [एक ही कार्रवाई दोहराना](/hi/docs/api/idempotency/) - [कतारबद्ध कार्रवाई की निगरानी](/hi/docs/api/tasks/) - [अभियान के पेज पढ़ना](/hi/docs/api/pagination/) API संदर्भ - [उपलब्ध विज्ञापन खाते](/hi/docs/api/accounts/) - [अभियान की जानकारी देखना](/hi/docs/api/campaigns/) - [अभियान और मीडिया बनाना](/hi/docs/api/create-campaigns/) - [मौजूदा अभियान बदलना](/hi/docs/api/manage-campaigns/) - [अभियान और खाते के आँकड़े](/hi/docs/api/stats/) - [टार्गेटिंग शब्दकोश और समूह](/hi/docs/api/targeting/) एकीकरण - [अभियान के इवेंट प्राप्त करना](/hi/docs/api/webhooks/) - [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/) - [API संस्करण और बदलाव](/hi/docs/api/changelog/) फ़ाइलें और स्कीमा - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/hi/docs/llms.txt) - [llms-full.txt](/hi/docs/llms-full.txt) [Orbito Ads](/hi/) [दस्तावेज़](/hi/docs/) [API](/hi/docs/api/) संदर्भ में status_change, hourly_digest और परीक्षण ping हैं। HTTPS पर लें, मूल बॉडी से हस्ताक्षर जाँचें और दोहराए गए इवेंट हटाएँ। [Markdown](/hi/docs/api/webhooks.md) API को बार-बार जाँचने के बजाय “API और वेबहुक” में कुंजी के कार्ड पर Postback URL सेट करें। Orbito Ads उस कुंजी की पहुँच वाले खातों की घटनाएँ POST से भेजता है। हर डिलीवरी पर वेबहुक के सीक्रेट से हस्ताक्षर होता है। ## इवेंट | घटना | जब | | --- | --- | | `status_change` | एक अभियान की स्थिति बदल गई है (अवलोकन → सक्रिय, सक्रिय → रोक दिया ...) प्रत्येक सिंक्रनाइज़ेशन के बाद भेजा गया है, और तुरंत जब अभियानों को पैनल में या API के माध्यम से स्विच किया जाता है या बंद कर दिया जाता है। | | `hourly_digest` | 5 मिनट हर घंटे से गुजरते हैं, जिसके साथ घंटे की संख्या जो अभी बंद हो गई है - एक POST प्रति कैबिनेट. बिना दृश्यों के घंटे, क्लिक या खर्च किए जाते हैं। | | `ping` | जब आप कुंजी पर **परीक्षण** दबाते हैं। | ### status_change उदाहरण ``` { "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 उदाहरण ``` { "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` में सबसे ज़्यादा खर्च वाले अधिकतम 200 अभियान आते हैं। और अभियानों में बदलाव हुआ हो तो `truncated` छूटे हुए अभियानों की संख्या बताता है। `totals` में सभी अभियान शामिल हैं। रकम खाते की मुद्रा में है। ## HTTP हेडर उदाहरण ``` 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= ``` ## हस्ताक्षर का सत्यापन `X-Orbito-Timestamp`, एक डॉट और अनुरोध के मूल बाइट्स जोड़ें। कुंजी बनाते या वेबहुक सीक्रेट बदलते समय दिखे सीक्रेट से HMAC-SHA256 निकालें। JSON पार्स करने से पहले हस्ताक्षर जाँचें। दोबारा सीरियलाइज़ करने पर बाइट्स बदलते हैं। पाँच मिनट से पुराने अनुरोध अस्वीकार करें। ### Node.js (एक्सप्रेस) उदाहरण ``` 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 (फ्लैश) उदाहरण ``` 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 ``` ## इवेंट की डिलीवरी - आपका अंतिम बिंदु सार्वजनिक होना चाहिए **HTTPS** . `http://` , स्थानीय मेजबान और निजी पते अस्वीकार किए जाते हैं। - **10 सेकंड** के भीतर किसी भी `2xx` के साथ जवाब दें. जवाब देने के बाद धीरे-धीरे काम करें. - एक नेटवर्क त्रुटि या एक `5xx` वापस लौटें **एक बार** , 750 एमएस बाद में, एक ही के साथ `X-Orbito-Delivery`. A `4xx` नहीं पेंशन किया गया। - रीसाइक्लिंग का अनुसरण नहीं किया जाता है। - पैनल में कुंजी कार्ड अंतिम वितरण का समय, स्थिति और त्रुटि दिखाता है। ## वेबहुक से जुड़े खाते कुंजी को केवल उन्हीं खातों के इवेंट मिलते हैं जिनकी उसे पहुँच है। एजेंसी सदस्य को उसके साथ साझा किए गए खातों के इवेंट मिलते हैं। पहुँच हटते ही उन खातों की डिलीवरी बंद हो जाती है। [कुंजी और पहुंच](/hi/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## परीक्षण इवेंट भेजना कुंजी के कार्ड में “टेस्ट” दबाएँ। आपको असली घटनाओं जैसी हस्ताक्षर प्रक्रिया वाला `ping` इवेंट मिलेगा। उदाहरण ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## API संदर्भ पूर्ण विज्ञापन अनुबंध के लिए इस वर्कस्पेस का समर्पित प्रदाता क्रेडेंशियल चाहिए। क्लाइंट कॉल में अपनी Orbito API कुंजी दें। अकाउंट ऑर्डर, जारी करना और बाहरी बिलिंग अलग प्रक्रियाएँ हैं। उदाहरण · 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" } ] } ``` ## कार्यान्वयन संबंधी नोट्स ## घटनाएँ और कॉलबैक सेटअप प्रदाता कुंजी सेटिंग में सार्वजनिक HTTPS कॉलबैक दें। status_change स्थिति बदलाव, hourly_digest मिनट 05 पर सक्रिय अकाउंट की पिछले घंटे की रिपोर्ट और ping परीक्षण देता है। सेटअप इस संदर्भ की 22 HTTP क्रियाओं से अलग है। ## हस्ताक्षर और दोबारा वितरण timestamp, एक बिंदु और मूल अनुरोध बाइट पर webhook सीक्रेट से HMAC-SHA256 सत्यापित करें। पाँच मिनट से पुराने अनुरोध अस्वीकारें। दस सेकंड में 2xx दें। नेटवर्क त्रुटि या 5xx पर 750 ms बाद उसी ID से एक प्रयास होता है। ## कार्रवाइयाँ और फ़ील्ड 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} ## स्कीमा फ़ील्ड और सीमाएँ तालिका सार्वजनिक v1 अनुबंध पर आधारित है। फ़ील्ड और पैरामीटर नाम केस-संवेदी हैं। HTTP कोड हर ऑपरेशन में सफलता, इनपुट सत्यापन और पहुँच जाँच अलग करते हैं। लिंक किए गए विनिर्देश में पूरे अनुरोध और प्रतिक्रिया की बनावट है। ## समय अवधि · hourly_digest hourly_digest वेबहुक अभी समाप्त हुए घंटे को समेटता है और ट्रैफ़िक वाले हर खाते के लिए अगले घंटे के पाँचवें मिनट में भेजा जाता है। अवधि, खाता आईडी और डिलीवरी आईडी रखें। इवेंट और सर्वर पर प्राप्ति का समय अलग रखें। ## स्कीमा फ़ील्ड और सीमाएँ · अभियान के इवेंट प्राप्त करना | फ़ील्ड | दस्तावेज़ में मान | | --- | --- | | 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 | स्रोत · [डेटा स्रोत](https://adsly.pro/docs/api/webhooks/) ## संबंधित गाइड [पुष्ट रूपांतरण भेजना](/hi/docs/api/conversions/)[API संस्करण और बदलाव](/hi/docs/api/changelog/) संदर्भ अपडेट की तारीख 2026-10-08 [पिछला विषय**टार्गेटिंग शब्दकोश और समूह**](/hi/docs/api/targeting/)[अगला विषय**पुष्ट रूपांतरण भेजना**](/hi/docs/api/conversions/) ## स्रोत और डेटा - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # ڈیولپر گائیڈ [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) دستاویزات دستاویزات میں اکاؤنٹس، مہم کا انتظام، شماریات اور واقعات کی ترسیل شامل ہیں۔ پہلے صرف پڑھنے والی کلید سے دستیاب اکاؤنٹس کی فہرست لیں۔ [دستاویزات کا اشاریہ دیکھیں](/ur/docs/llms.txt) [API کلیدیں](/api-keys?lang=en) یہ دستاویز بتاتی ہے کہ اپنی ایپ سے Orbito Ads کیسے چلائیں۔ API سے اعدادوشمار پڑھیں، مہم بنائیں، بولی اور اشتہار کا متن بدلیں، مہم روکیں یا بحال کریں اور بجٹ منتقل کریں۔ تمام اکاؤنٹس میں ایک ہی API کلید اور طریقے کام کرتے ہیں۔ ## API - [**تیزی سے شروع** کلید، پہلا درخواست اور آپ کی پہلی مہم کے ذریعے API تقریبا پانچ منٹ کے بارے میں](/ur/docs/api/) - [**کلید اور رسائی** پڑھنے کے لئے اور کمپنیاں مینجمنٹ کلید، جس میں اشتہارات ایک اہم نقطہ نظر ہے، ایجنسی ٹیموں.](/ur/docs/api/authentication/) - [**کمپنیاں بنائیں** چینل، بٹ، تلاش اور مخاطبان کی توجہ، ایک یا ایک سو کال کی مہمیں.](/ur/docs/api/create-campaigns/) - [**کمپنیاں کا انتظام** ترمیم، روکیں اور دوبارہ، بجٹ منتقل کریں، کاپی کریں، حذف کریں — ایک کمپنیاں یا ایک ہزار.](/ur/docs/api/manage-campaigns/) - [**Webhooks کے** حقیقی وقت میں دستخط کی حالت میں تبدیلی اور ایک گھنٹے کے اعداد و شمار کی گندگی.](/ur/docs/api/webhooks/) - [**ایک AI مددگار کے ساتھ تعمیر** ان دستاویزات کو کلود کوڈ یا کسی دوسرے کوڈنگ ایجنٹ کو ہٹا دیں اور اسے انضمام لکھنے کی اجازت دیں.](/ur/docs/api/ai-assistants/) ## بنیادی URL اور توثیق مثال ``` https://orbitoads.pro/api/v1 X-API-Key: orbito_… ``` پینل میں کلید بنائیں: [API Webhooks کے مترادف](/api-keys?lang=en) (پرو اور ایجنسی کے منصوبے) سوالات کے بارے میں - [@orbitoads](https://t.me/orbitoads). ## مشین کے لیے قابلِ مطالعہ فارمیٹ - [OpenAPI 3.1 SPEC کے مترادف](/docs/api/openapi.yaml) - ہر انتہائی نقطہ، پیرامیٹر اور غلطی کوڈ. - [llms.txt](/docs/llms.txt) — اعداد و شمار AI ایجنٹ پڑھتے ہیں؛ [llms-full.txt](/docs/llms-full.txt) — ایک فائل میں تمام صفحات. - ہر صفحے میں ایک مارک ڈاؤن دوہرا ہے: اس کے راستے میں `.md` شامل کریں، e.g . [/docs/api.md](/docs/api.md) . مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## عملی نفاذ کے نوٹس ## ورک اسپیس منسلک کرنا مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ### ڈویلپر رہنما اور کھاتے تک رسائی **API کا ابتدائی تعارف** API کا ابتدائی تعارف — سرور کی کلید سے اکاؤنٹ فہرست لیں۔ ایک اکاؤنٹ منتخب کرکے مہمات پڑھیں۔ پہلی بار لکھتے وقت نئی idempotency کلید کے ساتھ موقوف مسودہ بنائیں اور واپس آنے والا ٹاسک دیکھیں۔ [**API کا ابتدائی تعارف**](/ur/docs/api/) **کلیدیں اور اکاؤنٹ کی اجازتیں** کلیدیں اور اکاؤنٹ کی اجازتیں — سرور سے X-API-Key ہیڈر میں کلید بھیجیں۔ ایک، متعدد یا تمام مجاز اکاؤنٹس چنیں۔ تحریر کے لیے مہم کے انتظام کی کلید اور اکاؤنٹ پر مالک یا منتظم کا کردار ضروری ہے۔ [**کلیدیں اور اکاؤنٹ کی اجازتیں**](/ur/docs/api/authentication/) **مہم بنانا اور میڈیا شامل کرنا** مہم بنانا اور میڈیا شامل کرنا — ایک درخواست ایک اکاؤنٹ کی 100 مہمات تک قبول کرتی ہے۔ چینل، بوٹ، تلاش یا سامعین منتخب کریں، منفرد کلید دیں اور ٹاسک دیکھیں۔ [**مہم بنانا اور میڈیا شامل کرنا**](/ur/docs/api/create-campaigns/) **موجودہ مہمات بدلنا** موجودہ مہمات بدلنا — متن، لنک، بولی، روزانہ حد، شیڈول، بجٹ اور نمائش بدلیں۔ ایک بیچ میں 1,000 تک مہمات آسکتی ہیں۔ ٹاسک میں جزوی ناکامیاں دیکھیں۔ [**موجودہ مہمات بدلنا**](/ur/docs/api/manage-campaigns/) **مہم کے واقعات وصول کرنا** مہم کے واقعات وصول کرنا — حوالے میں status_change، hourly_digest اور آزمائشی ping شامل ہیں۔ HTTPS پر وصول کریں، اصل متن سے دستخط کی تصدیق کریں اور دہرائے گئے واقعات الگ کریں۔ [**مہم کے واقعات وصول کرنا**](/ur/docs/api/webhooks/) **AI اسسٹنٹ کے لیے API حوالہ** AI اسسٹنٹ کے لیے API حوالہ — فیلڈز کے لیے OpenAPI اور رویے کے لیے Markdown پڑھیں۔ اصل کلیدیں سرور پر رکھیں۔ مہم بدلنے سے پہلے پڑھنے کی جانچ کریں۔ [**AI اسسٹنٹ کے لیے API حوالہ**](/ur/docs/api/ai-assistants/) [API کلیدیں اور ویب ہکس منظم کریں](/api-keys?lang=en) ## پہلی درخواست X-API-Key کے ساتھ GET /api/v1/account/info بھیجیں۔ data سے id لے کر اگلی درخواست میں account_id دیں۔ مثالوں کے تمام اعداد اور IDs فرضی ہیں۔ ## کارروائیاں اور فیلڈز /docs/api/openapi.yaml /docs/llms.txt /docs/llms-full.txt - /docs/api/openapi.yaml - /docs/llms.txt - /docs/llms-full.txt ## درخواست کی مثال GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ### مشین کے لیے قابل مطالعہ حوالہ جات [OpenAPI 3.1](/docs/api/openapi.yaml)[llms.txt](/docs/llms.txt)[llms-full.txt](/docs/llms-full.txt)[Markdown](/ur/docs/api.md) ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · ڈیولپر دستاویزات | فیلڈ | دستاویزی قدر | | --- | --- | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/llms.txt | Markdown | | /docs/llms-full.txt | Markdown | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/) ## Cabinet | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [API کا ابتدائی تعارف](/ur/docs/api/)[کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/)[مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/)[موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/)[مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) [اگلا موضوع**API کا ابتدائی تعارف**](/ur/docs/api/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API کا ابتدائی تعارف [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) API سرور کی کلید سے اکاؤنٹ فہرست لیں۔ ایک اکاؤنٹ منتخب کرکے مہمات پڑھیں۔ پہلی بار لکھتے وقت نئی idempotency کلید کے ساتھ موقوف مسودہ بنائیں اور واپس آنے والا ٹاسک دیکھیں۔ [Markdown](/ur/docs/api.md) Orbito Ads API سے آپ اپنی ایپ میں Telegram Ads اکاؤنٹس اسی طرح چلا سکتے ہیں جیسے پینل میں۔ Euro، TON اور Stars اکاؤنٹس کے لیے ایک ہی کلید، بنیادی پتا اور طریقے ہیں۔ | آپ چاہتے ہیں ... | استعمال کریں | | --- | --- | | ایک ڈش بورڈ یا BI میں کمپنیاں اور اعداد و شمار پول کریں | [کمپنیاں](/ur/docs/api/campaigns/), [ریاستیں](/ur/docs/api/stats/) | | ایک سکرپٹ، بٹ یا آپ کے CRM سے کمپنیاں شروع کریں | [کمپنیاں بنائیں](/ur/docs/api/create-campaigns/) | | اضافہ بوجھ، روکنے کے خسارے، اوپر جیتنے والے خود کار طریقے سے | [کمپنیاں کا انتظام](/ur/docs/api/manage-campaigns/) | | ایک کمپنیاں قبول کی جاتی ہیں، منسوخ کی جاتی ہیں یا بجٹ سے باہر چلتی ہیں | [Webhooks کے](/ur/docs/api/webhooks/) | | ہر کمپنیاں کے مقابلے میں آپ کے ٹریکر سے لیڈز اور فروخت کا حساب کریں | [تبدیل کرنے کے](/ur/docs/api/conversions/) | ## بنیادی URL مثال ``` https://orbitoads.pro/api/v1 ``` ہر درخواست `X-API-Key` ہیڈر میں آپ کی کلید لے جاتی ہے۔ درخواست اور جواب کے جسم JSON ہیں۔ تمام وقت UTC ہے۔ ## فوری آغاز ### 1۔ ایک کلید بنائیں پینل میں کھولیں **API Webhooks کے مترادف** → **+ نئے کلید** ( Pro اور Agency منصوبے). منتخب کریں کون سی کابینہ کلید تک پہنچتا ہے. تخلیق اور تبدیلی کی مہموں کے لئے، ٹکٹ **کمپنیاں چلانے کی اجازت** — اس کے بغیر کلید صرف پڑھتا ہے. مثال ``` export ORBITO_API_KEY="orb_…" ``` ### 2۔ کلید دیکھنے والے کمرے کی فہرست مثال ``` curl -s https://orbitoads.pro/api/v1/account/info \ -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "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` یہ ہے کہ `account_id` ہر ایک کال کا استعمال کرتا ہے. ایک اشتہارات کے اکاؤنٹ میں تمام پیسہ اس میں ہے `currency`. ### 3۔ پڑھنے کی کمپنیاں مثال ``` curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active&limit=50" \ -H "X-API-Key: $ORBITO_API_KEY" ``` ### 4۔ ایک کمپنیاں بنائیں (اس سے باہر سوئچ کریں، لہذا کچھ بھی خرچ نہیں کیا جاتا) مثال ``` 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"] }' ``` Telegram پر بات چیت بنائیں، لہذا یہ پس منظر میں چلتا ہے. آپ کو `202 Accepted` اور ایک کام ملتا ہے: مثال ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ### 5۔ کام کے لئے انتظار کریں مثال ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` جب `status` `completed` ہے، `ad_ids` نئے کمپنیاں کا ID رکھتا ہے اب آپ اسے سرمایہ کاری کر سکتے ہیں اور اسے تبدیل کر سکتے ہیں: مثال ``` 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" ``` ٹیلی گرام ہر نئے اشتہارات کو چلانے سے پہلے جائزہ لیتا ہے؛ کمپنیاں `status` یہ کہاں ہے (مزید دیکھیں) [حالات](/ur/docs/api/campaigns/#doc-note-statuses)). A کے [Webhook کے مترادف](/ur/docs/api/webhooks/) یہ آپ کو بتاتا ہے کہ وہ تبدیلی کا وقت ہے. ## انٹیگریشن کے پانچ اصول 1. **`ad_id` یہ صرف ایک اشتہارات کے اکاؤنٹ کے اندر اندر منفرد ہے.** Telegram کابینہوں کے درمیان اشتہارات IDs دوبارہ استعمال کرتا ہے. اسٹوریج اور `(account_id, ad_id)` جوڑے کی طرف سے کمپنیاں اپ لوڈ کریں، اور `account_id` پاس کریں جب ایک کلید ایک سے زیادہ کابینہ دیکھتا ہے. 2. **ایک بھیجیں `Idempotency-Key` کی تخلیق، کپی، بڑے پیمانے پر اور بجٹ کالز پر** - ایک تازہ UUID ہر آپریشن، اسی وقت جب آپ اسے واپس لے جاتے ہیں. ایک رٹری پھر کبھی بھی دوسری مہم نہیں بناتا یا پیسہ دو بار منتقل کرتا ہے. دیکھیں [بے صلاحیت](/ur/docs/api/idempotency/). 3. **تخلیق، کپی اور جمع ایک کام واپس کریں.** پول `GET /v1/tasks/{id}` جب تک کہ یہ ختم نہ ہو۔ دیکھیں [کاموں](/ur/docs/api/tasks/) . 4. **پیسہ کے میدانوں میں رینج ہیں** ( `"spent": "3.541000"` ) کو درست دسیمالوں کو برقرار رکھنے کے لئے. ان کو دسیمال کے طور پر تقسیم کرنے سے پہلے آرٹمیٹک. 5. **شاخ پر `code`دکھائی دیتا ہے `error`.** ہر غلطی میں ایک مستحکم مشین پڑھنے والا ہے `code` ایک انسانی حکم میں `error`. دیکھیں [غلطیوں](/ur/docs/api/errors/). ## جواب کی ساخت مثال ``` { "success": true, "data": { … }, "meta": { … } } { "success": false, "error": "Human-readable message", "code": "MACHINE_CODE", "request_id": "…" } ``` ## اگلے اقدامات - [کلید اور رسائی](/ur/docs/api/authentication/) - پڑھنے کے لئے صرف مقابلے میں مہم مینجمنٹ کلید، ایجنسی ٹیمیں. - [کلود اور دیگر AI مددگاروں کے ساتھ تعمیر](/ur/docs/api/ai-assistants/) - ایک کوڈنگ ایجنٹ کو انضمام لکھنے کی اجازت دیں. - [OpenAPI SPEC کے](/docs/api/openapi.yaml) - Postman، Insomnia یا ایک کلائنٹ جنریٹر میں درآمد. ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ مثال · cURL ``` curl -X GET https://orbitoads.pro/api/v1/account/info \ -H 'X-API-Key: YOUR_ORBITO_KEY' ``` مثال · 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 } } ] } ``` ## عملی نفاذ کے نوٹس ## پہلی درخواست X-API-Key کے ساتھ GET /api/v1/account/info بھیجیں۔ data سے id لے کر اگلی درخواست میں account_id دیں۔ مثالوں کے تمام اعداد اور IDs فرضی ہیں۔ ## اکاؤنٹ اور مہم کی شناخت account_id اور ad_id ساتھ رکھیں۔ الگ اکاؤنٹس میں ایک ہی ad_id ہو سکتا ہے۔ متعدد اکاؤنٹس والی کلید سے درست ریکارڈ کے لیے account_id دیں۔ ## قبولیت اور تکمیل بنانے، نقل اور اجتماعی درخواستوں پر HTTP 202 اور کام کا id ملتا ہے۔ Retry-After کے مطابق GET /api/v1/tasks/{id} دیکھیں۔ completed پر بھی failed اور errors پڑھیں۔ ## کارروائیاں اور فیلڈز 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} ## درخواست کی مثال GET /api/v1/campaigns?limit=10&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · API کا ابتدائی تعارف | فیلڈ | دستاویزی قدر | | --- | --- | | X-API-Key | HTTP header | | Content-Type | application/json | | 202 | Location, Retry-After | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/) ## CampaignStatus | فیلڈ | فیلڈ کی قسم | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [ڈیولپر دستاویزات](/ur/docs/)[کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/)[AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**ڈیولپر دستاویزات**](/ur/docs/)[اگلا موضوع**کلیدیں اور اکاؤنٹ کی اجازتیں**](/ur/docs/api/authentication/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # دستیاب اشتہاری اکاؤنٹس [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/accounts/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) فہرست ہر اکاؤنٹ کی کرنسی، بیلنس، رسائی اور دستیاب فیلڈز دکھاتی ہے۔ مہم کی شناخت کے ساتھ account_id محفوظ کریں۔ [Markdown](/ur/docs/api/accounts.md) Orbito کا ہر اکاؤنٹ Telegram Ads کا ایک اشتہاری اکاؤنٹ ہے۔ ہر مہم صرف ایک اکاؤنٹ سے وابستہ ہوتی ہے جس کی شناخت `account_id` سے کی جاتی ہے۔ ## GET /v1/account/info یہ طریقہ ان اکاؤنٹس کی فہرست دیتا ہے جن تک کلید کو اس وقت رسائی ہے۔ مثال ``` curl -s https://orbitoads.pro/api/v1/account/info -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "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 } } ] } ``` | میدان | معنی | | --- | --- | | `id` | `account_id` دوسرے کالوں کو منتقل کرنے کے لئے. | | `cabinet_type` | `euro`، `ton` یا `stars`۔ | | `currency` | `EUR`، `TON` یا `STARS` - اس دفتر میں **ہر ایک** پیسہ کے میدان کی کرنسی: توازن، بجٹ، خرچ، CPM . | | `access_level` | آپ کا رسائی: `owner`, `manager` (ایک ایجنسی کے رکن جو کمپنیاں تبدیل کر سکتے ہیں) یا `viewer` (مجھے صرف ایک ہی وقت میں پڑھنے کے لئے) لکھنے کی ضرورت ہے `owner` یا `manager`. | | `balance` | پیسہ اکاؤنٹ میں، جو اب تک کمپنیاں (دسمی لائن) کے لئے نہیں دیا گیا ہے. جب اشتہارات اکاؤنٹ سنکر ہے تو تجدید کیا جاتا ہے — دیکھیں `balance_updated_at`. | | `min_budget` | سب سے چھوٹا غیر صفر `budget` اس کابینہ میں ایک نئی مہم ہوسکتی ہے. | | `features.ad_button` | دفتر کے اشتہارات فارم میں ایک اپنی مرضی کے مطابق بٹن ( `button` فائل میں تخلیق / ترمیم) ہے. | | `features.crypto_filters` | کابینہ کے اشتہارات فارم میں کریپٹو چینل فلٹرز ہیں. | درست شدہ اعداد دکھانے والی خصوصی شراکت دار کلیدوں میں `balance` کی قدر `null` ہوتی ہے۔ ## نوٹس - `GET /v1/account/info` ایک پڑھنے کی درخواست کی قیمت ہے - اسٹارٹ اپ پر کال کریں اور جب ایک لکھنے کی واپسی `ACCOUNT_NOT_FOUND` ، ہر کال سے پہلے نہیں. - ایک کابینہ فہرست سے باہر نکل جاتا ہے جب یہ غیر فعال کیا جاتا ہے یا آپ کے اس تک رسائی ہٹا دیا جاتا ہے. - Orbito Ads پینل میں کابینہ شامل کیے جاتے ہیں؛ API ان کے اندر کی مہموں کو منظم کرتا ہے. ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## GET `/api/v1/account/info` کلید کے قابلِ رسائی اکاؤنٹس، کرنسیاں، حدود اور کردار دیکھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | ہاں | 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 } } ] } ``` ## عملی نفاذ کے نوٹس ## بیلنس اور کرنسیاں ہر اکاؤنٹ میں currency، balance_updated_at اور min_budget دیکھیں۔ مہم میں رقم اور شرح اعشاری متن یا null ہو سکتی ہے۔ رپورٹ کا مجموعہ عدد ہے۔ EUR، TON اور Stars الگ رکھیں۔ ## خصوصیات کی دستیابی features.ad_button حسبِ ضرورت بٹن اور features.crypto_filters کرپٹو چینل فلٹرز کی دستیابی بتاتا ہے۔ عمل دکھانے سے پہلے is_active اور access_level دیکھیں۔ ## کارروائیاں اور فیلڈز GET /api/v1/account/info account_id currency balance - GET /api/v1/account/info - account_id - currency - balance ## درخواست کی مثال GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · دستیاب اشتہاری اکاؤنٹس | فیلڈ | دستاویزی قدر | | --- | --- | | cabinet_type | euro, ton, stars | | currency | EUR, TON, STARS | | balance | decimal string \| null | | balance_updated_at | date-time | | features | ad_button, crypto_filters | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/accounts/) ## Cabinet | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## Money | فیلڈ | فیلڈ کی قسم | | --- | --- | | Money | string \| null | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/)[مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/)[موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/)[مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/)[ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**مہمات کے صفحات پڑھنا**](/ur/docs/api/pagination/)[اگلا موضوع**مہم کی تفصیل دیکھنا**](/ur/docs/api/campaigns/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # AI اسسٹنٹ کے لیے API حوالہ [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/ai-assistants/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) فیلڈز کے لیے OpenAPI اور رویے کے لیے Markdown پڑھیں۔ اصل کلیدیں سرور پر رکھیں۔ مہم بدلنے سے پہلے پڑھنے کی جانچ کریں۔ [Markdown](/ur/docs/api/ai-assistants.md) یہ صفحات ڈویلپرز اور کوڈنگ اسسٹنٹس دونوں کے لیے ہیں۔ ہر صفحہ Markdown میں ہے، مکمل دستاویز ایک فائل میں ملتی ہے اور API کی تفصیل OpenAPI میں دستیاب ہے۔ اسسٹنٹ کو اپنے کام سے متعلق لنکس دیں۔ ## اے آئی ایجنٹس کے لیے فائلیں | فائل | کیا ہے | جب استعمال کریں | | --- | --- | --- | | [`/docs/llms.txt`](/docs/llms.txt) | ہر صفحے کے اعداد و شمار، ایک لائن مجموعات کے ساتھ ( [txt کے مترادف](https://llmstxt.org/) ) | ایجنٹ کو وہ صفحات منتخب کرنے کی اجازت دیں جو اس کی ضرورت ہے | | [`/docs/llms-full.txt`](/docs/llms-full.txt) | ایک مارک ڈاؤن فائل میں تمام صفحات (تقریبا 80 KB ) | آلات جو ایک بڑا فائل پورے لوڈ کر سکتے ہیں؛ ویب فٹچ آلات اسے مختصر کر سکتے ہیں، لہذا ترجیح `llms.txt` + صفحات وہاں | | [`/docs/api/openapi.yaml`](/docs/api/openapi.yaml) | OpenAPI 3.1 spec: اختتام پوائنٹس، پیرامیٹرز، شرائط، غلطی کوڈ | منتخب کردہ گاہکوں، درخواست کی تصدیق، Postman | | `.md` | صفحہ کے طور پر مارک ڈاؤن، e.g . [/docs/api/create-campaigns.md](/docs/api/create-campaigns.md) | ایک ہی موضوع | ہر صفحہ کے اوپر **صفحہ کاپی کریں Markdown** ہے - اسے براہ راست ایک چیٹ میں شامل کریں. ## Claude Code کے ذریعے API انٹیگریشن کی ہدایت اس پروجیکٹ میں Claude Code (یا ایک اور کوڈنگ ایجنٹ) میں شامل کریں جو Orbito Ads سے بات کرنا چاہئے . مثال ``` اس پروجیکٹ میں Orbito Ads API شامل کریں۔ کوڈ لکھنے سے پہلے https://orbitoads.pro/ur/docs/llms.txt اور اس میں درج متعلقہ Markdown صفحات پڑھیں۔ مکمل دستاویز https://orbitoads.pro/ur/docs/llms-full.txt پر اور OpenAPI کی تفصیل https://orbitoads.pro/docs/api/openapi.yaml پر ملتی ہے۔ - بنیادی پتا https://orbitoads.pro/api/v1 اور ہیڈر X-API-Key استعمال کریں۔ کلید ماحولیاتی متغیر ORBITO_API_KEY سے پڑھیں۔ اسے کوڈ یا لاگ میں درج نہ کریں۔ - مہم کی شناخت (account_id, ad_id) کے جوڑے سے کریں۔ مختلف اکاؤنٹس میں ایک ہی ad_id آ سکتا ہے۔ - /campaigns، /campaigns/bulk، /campaigns/{id}/copy یا /campaigns/{id}/budget پر ہر نئی POST کارروائی میں Idempotency-Key کے لیے نیا UUID بھیجیں۔ اسی کارروائی کی دوبارہ کوشش میں وہی UUID بھیجیں۔ - تخلیق، نقل اور اجتماعی تبدیلیوں پر 202 کے ساتھ ایک ٹاسک ملتا ہے۔ Retry-After کا وقفہ ملحوظ رکھتے ہوئے GET /tasks/{id} کے ذریعے حالت معلوم کریں، یہاں تک کہ completed یا failed آ جائے۔ - رقم اعشاری عدد کی متنی صورت میں آتی ہے۔ موازنہ کرنے سے پہلے اسے اعشاری عدد میں بدلیں تاکہ درستگی برقرار رہے۔ - 429 ملنے پر Retry-After کے مطابق انتظار کریں۔ تبدیلی لکھتے وقت 5xx آئے تو نئی Idempotency-Key سے دوبارہ کوشش کرنے سے پہلے GET کے ذریعے مہم کی حالت دیکھیں۔ - پروگرام میں فیصلہ کرنے کے لیے code اور صارف کو پیغام دکھانے کے لیے error فیلڈ استعمال کریں۔ - اقسام کے ساتھ متعین طریقوں والا مختصر کلائنٹ اور فرضی HTTP جوابات استعمال کرنے والے ٹیسٹ لکھیں۔ مطلوبہ کام: <مثلاً ہر گھنٹے اکاؤنٹ 53 کی وہ مہمات روک دیں جن کی گزشتہ 24 گھنٹوں کی CPA، 4 EUR سے زیادہ ہو>۔ ``` ## چیٹ میں ایک بار کے کام کی ہدایت ایک سوال کے بجائے کوڈ بیس کی تبدیلی کے لئے ( Claude.ai ، ChatGPT یا کسی بھی ویب رسائی کے ساتھ چیٹ): مثال ``` https://orbitoads.pro/ur/docs/llms.txt اور اس میں درج مہمات اور اعدادوشمار کے صفحات پڑھیں۔ Orbito Ads API کی Python اسکرپٹ لکھیں جو میرے تمام اکاؤنٹس کی Active مہمات اور ہر مہم کا گزشتہ 7 دن کا خرچ دکھائے۔ فہرست خرچ کے حساب سے ترتیب دیں۔ کلید ORBITO_API_KEY سے پڑھیں۔ ``` ## پروجیکٹ کی CLAUDE.md فائل کے قواعد اگر آپ کے پروجیکٹ میں `CLAUDE.md` (Claude Code ہر سیشن کے آغاز میں یہ پڑھتا ہے) ہے تو، اس بلاک کو شامل کریں تاکہ ہر مستقبل میں انضمام میں تبدیلی اسی قواعد پر عمل کرے: مثال ``` ## Orbito Ads API کا انضمام - کسی کال میں تبدیلی سے پہلے https://orbitoads.pro/ur/docs/llms.txt، متعلقہ .md صفحہ اور https://orbitoads.pro/docs/api/openapi.yaml دیکھیں۔ اینڈپوائنٹ اور فیلڈ کے نام تفصیل سے لیں۔ - ORBITO_API_KEY ماحول سے پڑھیں۔ اسے کمٹ، ٹرمینل کے آؤٹ پٹ یا لاگ میں شامل نہ کریں۔ - مہم کی شناخت (account_id, ad_id) سے کریں۔ مہم بنانے یا رقم منتقل کرنے والی ہر POST میں Idempotency-Key بھیجیں۔ ہر کارروائی کا الگ UUID بنائیں اور دوبارہ کوشش میں وہی UUID استعمال کریں۔ - تخلیق، نقل اور اجتماعی کارروائیوں کے لیے GET /v1/tasks/{id} سے حالت دیکھیں۔ جاری مہم کے بجٹ، وقفے اور حذف کی تبدیلیاں ایک ہی آزمودہ ماڈیول کے ذریعے کریں۔ پروڈکشن میں یک وقتی اسکرپٹ چلانے سے پہلے اجازت لیں۔ ``` ## ایجنٹ کی اجازتیں اور حفاظت - **ایک پڑھنے کے لئے صرف کلید کے ساتھ ترقی.** ایجنٹ حقیقی اعداد و شمار کا جائزہ لیتا ہے اور کچھ بھی نہیں بدل سکتا. **کمپنیاں کا انتظام** کے ساتھ ایک کلید پر سوئچ صرف جب لکھنے کا کوڈ جائزہ لیا جاتا ہے. - **کی کمپنیاں بنانے کے لئے `"active": false` اور `"budget": 0` ٹیسٹ کے دوران** کچھ بھی نہیں چلتا اور کچھ بھی خرچ نہیں کیا جاتا۔ اس کے بعد اسے ہٹا دیں۔ - **کلید کے پیمانے پر کم کریں** ایک ٹیسٹ کابینہ میں جبکہ انضمام نیا ہے. - **اس کے علاوہ، ایجنٹ غلطیوں کو پڑھنے کی اجازت دیتا ہے.** ہر غلطی کہتی ہے کہ کیا ٹھیک کرنا ہے ( `error` ) اور ایک مستحکم `code` اور `param` لے جاتا ہے جو غلط تھا - ایجنٹوں کو ان سے اپنے مطالبات کو ٹھیک کرنے کے بغیر حدس کے بغیر. - تمام API تبدیلیاں پینل کی کمپنیاں کی تاریخ میں دکھائی دیتی ہیں **🔌 API** ، لہذا آپ اس بات کا جائزہ لے سکتے ہیں کہ ایجنٹ نے کیا کیا. ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ مثال · 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' ``` ## عملی نفاذ کے نوٹس ## کلید اور اکاؤنٹ اجازتیں X-API-Key سرور پر رکھیں۔ رپورٹ کے لیے پڑھنے کی اجازت کافی ہے۔ تبدیلی کے لیے مہم انتظام، متعلقہ اکاؤنٹ پر مالک یا مینیجر کا کردار اور فعال پلان کی اجازت چاہیے۔ ## قابلِ تکرار انضمام بریف مقامی OpenAPI، فرضی اکاؤنٹ id، عمل، مطلوبہ جواب اور دوبارہ کوشش کا ٹیسٹ دیں۔ اصلی کلید سرور رازوں کے ذخیرے سے پڑھے۔ رپورٹ اکاؤنٹ اور مہم فہرست سے شروع کریں۔ ## کارروائیاں اور فیلڈز /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 ## درخواست کی مثال GET /docs/api/openapi.yaml ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | GET | /api/v1/account/info | — | — | 200, 401, 429 | | GET | /api/v1/targeting | — | — | 200, 401 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · AI اسسٹنٹ کے لیے API حوالہ | فیلڈ | دستاویزی قدر | | --- | --- | | /docs/llms.txt | index | | /docs/llms-full.txt | Markdown | | /docs/api/openapi.yaml | OpenAPI 3.1 | | /docs/api/create-campaigns.md | Markdown | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/ai-assistants/) ## متعلقہ مطالعہ [ڈیولپر دستاویزات](/ur/docs/)[API کا ابتدائی تعارف](/ur/docs/api/)[کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**کلیدیں اور اکاؤنٹ کی اجازتیں**](/ur/docs/api/authentication/)[اگلا موضوع**API کی خرابیوں کو سمجھنا**](/ur/docs/api/errors/) ## ماخذ اور ڈیٹا - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # کلیدیں اور اکاؤنٹ کی اجازتیں [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/authentication/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) سرور سے X-API-Key ہیڈر میں کلید بھیجیں۔ ایک، متعدد یا تمام مجاز اکاؤنٹس چنیں۔ تحریر کے لیے مہم کے انتظام کی کلید اور اکاؤنٹ پر مالک یا منتظم کا کردار ضروری ہے۔ [Markdown](/ur/docs/api/authentication.md) ## کلید کیسے بھیجیں ہر درخواست میں API کلید HTTP ہیڈر میں بھیجیں۔ مثال ``` X-API-Key: orb_0f3c… (68 حروف: orb_ کے بعد 64 ہیکسا ڈیسیمل ہندسے) ``` درخواست کی توثیق خود کلید سے ہوتی ہے۔ OAuth یا ٹوکن کا تبادلہ درکار نہیں۔ کلید اپنے سرور پر رکھیں اور براؤزر یا موبائل ایپ میں شامل نہ کریں۔ ## کلید کیسے حاصل کریں پینل میں «API اور ویب ہکس» کھولیں اور «نئی کلید» منتخب کریں۔ Pro اور Agency پلان میں ہر فرد 5 فعال کلیدیں رکھ سکتا ہے۔ کلید بناتے وقت نقل کر لیں۔ یہ صرف ایک بار دکھائی جاتی ہے اور سرور صرف اس کا SHA-256 ہیش رکھتا ہے۔ گم ہو جائے تو اسے منسوخ کرکے نئی کلید بنائیں۔ ## کلید کی اجازتیں | اجازت | آپ اسے کیسے حاصل کریں | کیا اجازت دیتا ہے | | --- | --- | --- | | **پڑھنا** | ہر کلید | کمپنیاں، اعداد و شمار، تبدیل، کام، ہدف کوڈز، ویب ہاک، ہمیں تبدیل بھیجنے | | **کمپنیاں کا انتظام** | **کمپنیاں چلانے کی اجازت** پر کلک کریں جب آپ کلید بناتے ہیں، یا بعد میں کلید کے کارڈ پر اسے تبدیل کریں | سب کچھ میں پڑھنا، اس کے علاوہ، تخلیق، ترمیم، وقف / ریسوم، بجٹ، کاپی، بڑے پیمانے پر کارروائی، حذف، میڈیا اپ لوڈ | صرف پڑھنے والی کلید سے تبدیلی کی کوشش پر `403 READ_ONLY_KEY` ملتا ہے۔ رپورٹس اور ڈیش بورڈ کے لیے یہی کلید رکھیں۔ انتظامی اجازت صرف ان ایپس کو دیں جن پر مہمات بدلنے کا اعتماد ہو۔ دونوں اقسام کی کلید بجٹ صرف اکاؤنٹ کے بیلنس اور اس کی مہمات کے درمیان منتقل کرتی ہیں۔ رقم نکالی نہیں جا سکتی۔ تبدیلی لکھتے وقت Pro یا Agency پلان فعال ہونا چاہیے۔ متعلقہ سہولت پر پینل والی اجازتیں بھی لاگو ہوتی ہیں۔ پلان اجازت نہ دے تو `403 FEATURE_NOT_AVAILABLE` ملتا ہے۔ ## کلید کی رسائی میں شامل اکاؤنٹس کلید بناتے وقت منتخب کریں کہ اسے کن اکاؤنٹس تک رسائی ہوگی۔ | دائرۂ کار | کلید تک پہنچنے کے لئے | | --- | --- | | میرے تمام کمرے (معیاری) | ہر کابینہ آپ پینل میں کھول سکتے ہیں، اس کے بعد شامل | | کئی | آپ کے کمرے کو چمکتا ہے | | ایک اشتہارات اکاؤنٹ | یہ کابینہ صرف | کبھی کبھی صرف اس کی جگہ **تھوڑا** جو آپ پینل میں کھول سکتے ہیں - یہ کبھی نہیں پھینکتا ہے. یہ ہر درخواست پر دوبارہ چیک کیا جاتا ہے: جب آپ ایک اشتہارات اکاؤنٹ تک رسائی کھو دیتے ہیں تو آپ کی کلیدیں اسے ایک ہی وقت میں کھو دیتی ہیں. `GET /v1/account/info` ہمیشہ اس بات کی وضاحت کرتا ہے کہ کلید اب تک کیا حاصل کر رہا ہے. اگر کلید کو کئی اکاؤنٹس تک رسائی ہو تو کسی ایک پر کارروائی کرتے وقت `account_id` دیں۔ اس کے بغیر `400 ACCOUNT_ID_REQUIRED` ملتا ہے۔ ## ایجنسی اور ٹیم کی رسائی API تک رسائی آپ کے پاس پینل، کابینہ کی طرف سے دستیاب ہے: | آپ کون ہیں | کابینہ آپ کی کلید تک پہنچتا ہے | مندرجہ ذیل کمپنیاں کنٹرول کر سکتے ہیں | | --- | --- | --- | | اکاؤنٹ کے مالک (معیاری صارف) | آپ کے اپنے کابینہ | ان میں سے ہر ایک | | Agency کے مالک | آپ کے ذاتی اور ایجنسی کابینہ | ان میں سے ہر ایک | | Agency ٹیم کے ارکان | آپ کے ساتھ اشتراک کردہ ایجنسیوں کے دفتر | **رہنما** تک رسائی کے ساتھ اشتراک کردہ دفاتر؛ **ویئر** دفاتر صرف پڑھنے کے لئے رہتے ہیں | - ٹیم کے ارکان اپنے **API Webhooks کے مترادف** صفحے پر اپنی کلید بناتے ہیں۔ ایجنسی کی منصوبہ بندی ان کو پورا کرتی ہے۔ - ایجنسی کے مالک **API & Webhooks → ٹیم کلید** کے تحت پیدا ہونے والی ٹیم کی ہر کلید کو دیکھتا ہے - جس کا یہ ہے، کیا یہ کمپنیاں منظم کرسکتا ہے، کتنے کابینہ تک پہنچتا ہے، جب یہ آخری بار استعمال کیا گیا تھا - اور ان میں سے کسی کو منسوخ کر سکتے ہیں. - `GET /v1/account/info` ہر کابینہ کے لئے `access_level` واپس آتا ہے: `owner`، `manager` یا `viewer`۔ ایک `viewer` کابینہ میں لکھنے سے `403 VIEW_ONLY_ACCESS` واپس آتا ہے۔ - اگر مالک ایک رکن کو ہٹا دیتا ہے، اسے ویئر پر ڈاؤن لوڈ کرتا ہے، یا ایجنسی کی منصوبہ بندی ختم ہو جاتی ہے تو، رکن کی کلیدوں کو فوری طور پر پیروی کی جاتی ہے - ہاتھ سے کوئی واپسی نہیں ہے. پینل میں کرداروں کا کیا مطلب ہے: **رہنما** - اس کابینہ میں مکمل کمپنیاں مینجمنٹ؛ **ویئر** - صرف کمپنیاں اور اعداد و شمار. مالک بھی ایک رکن کو کابینہ شامل کرنے، ٹیم کے ساتھیوں کو مدعو کرنے یا اپنے کابینہ کا اشتراک کرنے کی اجازت دے سکتے ہیں (کوئی بھی ان کے اپنے سطح سے زیادہ نہیں). ## کلید منسوخ اور تبدیل کرنا - **رجوع کریں** پینل میں اس کارڈ پر ایک کلید. یہ فوری طور پر کام کرنے سے روکتا ہے. - **روٹنگ** = ایک نئی کلید بنائیں، اس کو ڈپازٹ کریں، پھر پرانے کو منسوخ کریں۔ دو کلید ایک ہی وقت میں فعال ہوسکتے ہیں، لہذا کوئی انکوائری نہیں ہے۔ - **Webhook کے بارے میں** ([Webhooks کے](/ur/docs/api/webhooks/) کی تصدیق کے لئے) کلید سے الگ ہے اور اپنے آپ کو گھوم سکتے ہیں. ## کلیدوں کی محفوظ نگہداشت - انضمام کے لئے ایک کلید، لہذا آپ دوسرے کو توڑنے کے بغیر ایک کو منسوخ کر سکتے ہیں. - ماحولیاتی متغیر یا ایک خفیہ مینیجر میں کلیدوں کو ذخیرہ کریں۔ کبھی ان پر عمل نہ کریں، کبھی ان کو چیٹ یا ٹکٹ میں شامل نہ کریں۔ - صرف پڑھنے کے لئے کلیدوں کو ترجیح دیتا ہے؛ **کمپنیاں کا انتظام** صرف اس جگہ شامل کریں جہاں کوڈ تبدیلی کی مہمیں. - انٹرویو کی ضروریات کے لئے کابینہوں کی پیمائش کو کم کریں. - اگر ایک کلید بھاگ گیا ہو تو اسے سب سے پہلے منسوخ کریں اور دوسری طرف تحقیق کریں۔ API کے ذریعے کی جانے والی ہر تبدیلی کمپنیاں کی تاریخ میں **🔌 API** پر نشانہ بنائی جاتی ہے۔ ## توثیق کی خرابیاں | HTTP | `code` | معنی | | --- | --- | --- | | 401 | `API_KEY_MISSING` | نمبر `X-API-Key` ہدایت | | 401 | `API_KEY_INVALID` | غلط، منسوخ یا ختم کردہ کلید | | 401 | `NO_ACCOUNTS` | کلید ابھی تک فعال کابینہ تک نہیں پہنچتا | | 403 | `READ_ONLY_KEY` | ایک کلید کے ساتھ لکھا ہے جس میں کوئی مینجمنٹ کمپنیاں نہیں ہیں | | 403 | `VIEW_ONLY_ACCESS` | ایک دفتر کے لئے لکھا ہے جو آپ کے ساتھ اشتراک کیا جاتا ہے ویئر کے طور پر | | 403 | `FEATURE_NOT_AVAILABLE` | منصوبہ اس عمل میں شامل نہیں ہے | | 403 | `WRITE_NOT_ALLOWED` | اس قسم کی کلید (شرکاء کے لئے Orbito Ads کی طرف سے جاری) لکھنے کے قابل نہیں ہے | تمام کوڈز کے لیے «API کی خرابیاں» دیکھیں۔ [غلطیوں](/ur/docs/api/errors/) مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## عملی نفاذ کے نوٹس ## ورک اسپیس منسلک کرنا مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## کلید اور اکاؤنٹ اجازتیں X-API-Key سرور پر رکھیں۔ رپورٹ کے لیے پڑھنے کی اجازت کافی ہے۔ تبدیلی کے لیے مہم انتظام، متعلقہ اکاؤنٹ پر مالک یا مینیجر کا کردار اور فعال پلان کی اجازت چاہیے۔ درخواست کے نتائج اور جواب کے فیلڈ | API | HTTP | مطلب | | --- | --- | --- | | API_KEY_MISSING | 401 | کلید X-API-Key ہیڈر میں بھیجیں۔ | | API_KEY_INVALID | 401 | کلید غلط، زائد المیعاد یا منسوخ ہے۔ | | NO_ACCOUNTS | 401 | اس کلید کو کسی فعال اشتہاری کھاتے تک رسائی نہیں۔ | | READ_ONLY_KEY | 403 | کلید پڑھنے کی اجازت دیتی ہے۔ تبدیلی کے لیے مہم انتظام کی اجازت چاہیے۔ | | VIEW_ONLY_ACCESS | 403 | Viewer کھاتا دیکھ سکتا ہے۔ تبدیلی کے لیے کھاتے کی تحریری اجازت درکار ہے۔ | | FEATURE_NOT_AVAILABLE | 403 | یہ عمل موجودہ منصوبے میں شامل نہیں۔ | | WRITE_NOT_ALLOWED | 403 | فراہم کنندہ کی طرف سے شراکت داروں کو دی گئی اس قسم کی کلید تبدیلی کی اجازت نہیں دیتی۔ | [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) ## دائرہ اور منسوخی فراہم کنندہ کلید ایک، منتخب یا تمام مجاز اکاؤنٹس تک محدود ہو سکتی ہے۔ ہر درخواست پر دائرہ جانچا جاتا ہے۔ اہل پلان میں فی فرد پانچ فعال کلیدیں ہیں۔ گم شدہ کلید منسوخ کریں اور webhook کا راز الگ بدلیں۔ ## کارروائیاں اور فیلڈز X-API-Key read manage campaigns account_id - X-API-Key - read - manage campaigns - account_id ## درخواست کی مثال GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · کلیدیں اور اکاؤنٹ کی اجازتیں | فیلڈ | دستاویزی قدر | | --- | --- | | X-API-Key | HTTP header | | account_id | integer | | access_level | owner \| manager \| viewer | | cabinet_type | euro \| ton \| stars | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/authentication/) ## Cabinet | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [ڈیولپر دستاویزات](/ur/docs/)[API کا ابتدائی تعارف](/ur/docs/api/)[AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**API کا ابتدائی تعارف**](/ur/docs/api/)[اگلا موضوع**AI اسسٹنٹ کے لیے API حوالہ**](/ur/docs/api/ai-assistants/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # مہم کی تفصیل دیکھنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/campaigns/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) حالت اور منزل کے فلٹر لگائیں یا ایک مہم اور اس کی تاریخ لیں۔ مختلف اکاؤنٹس میں اشتہار کی شناخت دہرائی جاسکتی ہے، اس لیے account_id اور ad_id ساتھ رکھیں۔ [Markdown](/ur/docs/api/campaigns.md) API میں ہر مہم Telegram کا ایک اشتہار ہے۔ شناخت کے لیے `(account_id, ad_id)` رکھیں۔ مختلف اکاؤنٹس میں ایک ہی `ad_id` آ سکتا ہے۔ ## مہم آبجیکٹ کے فیلڈز `GET /v1/campaigns/{ad_id}` واپس آتا ہے: مثال ``` { "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" } ``` | میدان | معنی | | --- | --- | | `title` | آپ کے اندرونی نام کے لئے ایڈ. | | `text` | آڈ ٹیکسٹ لوگ دیکھتے ہیں. | | `status` | Telegram کے ساتھ کیا کر رہا ہے — دیکھیں [حالات](/ur/docs/api/campaigns/#doc-note-statuses) . | | `active` | آپ نے کیا پوچھا: `true` = چلنا چاہئے. `active: true` اور `Stopped` کی حیثیت کے ساتھ ایک مہم دوبارہ شروع ہوتی ہے جب اس میں دوبارہ بجٹ ہے. | | `promote_url` / `tme_path` | کیا اشتہارات کی طرف جاتا ہے: ایک ویب سائٹ URL ، یا ایک `t.me/` لنک (چینل، بٹ، مینی ایپ، پوسٹ). | | `target_type` | `channels`، `bots`، `search` یا `users` — دیکھیں [کمپنیاں بنائیں](/ur/docs/api/create-campaigns/) . | | `targets` | صارفین کو ایڈجسٹمنٹ کے مقاصد (چینلز یا بٹ) کا نام دیا جاتا ہے، جب معلوم ہوتا ہے. | | `cpm` | 1000 تبصرے کے لئے ادائیگی، کابینہ کی کرنسی میں. | | `budget` | پیسہ **بائیں** کی مہم پر. `budget + spent` یہ سب کچھ دیا گیا ہے. | | `spent` | اب تک پیسہ خرچ کیا ہے. | | `daily_budget` | روزانہ خرچ کا کپ، اگر ایک مقرر کیا جاتا ہے. | | `views`, `clicks`, `actions`, `opens` | `actions` پلیٹ فارم عمل ہیں (جمع، بٹ شروع ہوتا ہے) - آپ کے تبدیل نہیں ہیں؛ ان کے لئے دیکھیں [تبدیل کرنے کے](/ur/docs/api/conversions/) . | | `ctr`, `cvr` | فیصد: `"1.15"` کا مطلب 1.15 فیصد ہے. | | `cpc`, `cpa` | ایک کلک اور ایک عمل کے لئے قیمت. | | `views_per_user` | کتنی دفعہ ایک شخص اشتہارات کو دیکھ سکتا ہے (1-4). | | `schedule` | ہفتے کے دن اور گھنٹوں میں ایڈجسٹ کیا جاتا ہے، یا `null` یہ گھڑی کے ارد گرد چلتا ہے. دیکھیں [پروگرام](/ur/docs/api/manage-campaigns/#doc-note-schedule). | | `group_id` | کمپنی کے گروپ میں پینل، اگر کوئی ہے. | | `auto_cpm_enabled` | Orbito Ads ’s آٹو CPM پیشکش کا انتظام کرتا ہے. | | `date` | جب ایڈجسٹ کیا گیا تھا: یونیکس سیکنڈ، ایک لائن کے طور پر. | | `status_changed_at` | حالیہ حالات میں تبدیلی۔ حالات کے اپ ڈیٹس کی طرف سے متاثر نہیں کیا گیا — اچھا "اس کے بعد سے کیا بدل گیا ہے" کے لئے. | | `synced_at` | جب ان کے اپنے اکاؤنٹ کو ڈھونڈنا ہے تو `schedule`, `text`, `views_per_user`, targeting — Telegram سے آخری پڑھائی تھی. دیکھیں [تازہ ترین](/ur/docs/api/campaigns/#doc-heading-freshness). | **پیسہ کے میدان دسواں لائن ہیں** (`cpm`, `budget`, `spent`, `ctr`, `cvr`, `cpc`, `cpa`(۱) دسواں دُنیا میں رہنا زینب (`views`, `clicks`, `actions`, `opens`اعداد و شمار ہیں تمام پیسہ اکاؤنٹ میں اشتہارات کے اکاؤنٹ کی کرنسی میں ہے (مزید دیکھیں) [اشتہارات اکاؤنٹ](/ur/docs/api/accounts/)). ## حالتیں | حالات | معنی | آپ کیا کر سکتے ہیں | | --- | --- | --- | | `Active` | چلنے کے لئے | ترمیم کریں، ترمیم کریں اور بجٹ میں اضافہ کریں۔ | | `In Review` | Telegram ’s کا جائزہ لینے کے لئے انتظار کر رہے ہیں؛ ابھی تک نہیں دکھایا گیا ہے. | انتظار کریں - ایک ویب ہاک آپ کو بتاتا ہے جب یہ تبدیل ہوتا ہے. | | `Declined` | Telegram نے ایڈجسٹ کرنے سے انکار کیا۔ | متن یا لنک کو ترمیم کریں (resubmits)، یا ایک نیا بنائیں. | | `On Hold` | تبدیل کر دیا گیا - آپ کی طرف سے یا ایک آٹومیشن قاعدہ. | ایک ریکارڈ | | `Stopped` | بجٹ کا استعمال کیا جاتا ہے | بجٹ شامل کریں؛ یہ دوبارہ چلتا ہے اگر `active` `true` ہے. | | `Paused` | پورے کابینہ کے لئے Telegram پر توجہ مرکوز کی جاتی ہے (نادر). | [@orbitoads](https://t.me/orbitoads) سے رابطہ کریں | | `Deleted` | تاریخ میں کپٹ، فہرستوں سے چھپایا. | — | ## GET /v1/campaigns ہر کابینہ کی کمپنیاں کلید تک پہنچ جاتا ہے. مثال ``` 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" ``` | پارامٹر | ڈفالٹ | معنی | | --- | --- | --- | | `account_id` | — | صرف یہ کابینہ. ( `accountId` بھی کام کرتا ہے.) | | `status` | تمام لیکن حذف | ایک یا کئی، comma-فصل. | | `title` | — | عنوان اس مضمون میں شامل ہے. | | `bot_username` | — | ایک بٹ یا چینل کے اشتہارات: `tme_path` میں صارف کا نام مطابقت رکھتا ہے، معاملہ غیر حساس، نمبر `@`۔ `foo` `foobar` سے مطابقت نہیں رکھتا۔ | | `promote_domain` | — | `example.com` یا ایک مکمل URL؛ `www.`، ڈیم، راستہ اور بندرگاہ کو نظر انداز کیا جاتا ہے. | | `promote_domain_mode` | `exact` | `suffix` بھی مندرجہ ذیل ڈومینوں کے ساتھ مطابقت رکھتا ہے ( `x.example.com` ). | | `type` | — | `bot` (بٹ اور مینی ایپلی کیشنز)، `channel` (چینلز، گروپوں، پیغامات) یا `site` (خارجی ویب سائٹس). | | `limit` | 100 | 1–500. | | `cursor` | — | صفحہ — دیکھیں [صفحات](/ur/docs/api/pagination/) . مشورہ دیا گیا. | | `offset`, `sortBy`, `sortOrder` | — | اوفسیٹ صفحہنگ ( ≤ 500 فی کابینہ) | فیلٹر اور کے ساتھ مل کر. ایک نامعلوم بٹ یا ڈومین ایک خالی فہرست واپس دیتا ہے، کوئی غلطی نہیں. مثال ``` { "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 /v1/campaigns/{ad_id}` - اوپر کے پورے اشیاء، ہدفنگ، تخلیقی میدانوں اور `schedule` سمیت (فہرست کے اختتام پوائنٹ ان کو باہر چھوڑ دیتا ہے جو تیزی سے رہنے کے لئے) حذف کردہ مہم بھی واپس آتے ہیں، `status: "Deleted"` کے ساتھ. مثال ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` `account_id` صرف اس وقت کی ضرورت ہوتی ہے جب ایک ہی `ad_id` آپ کے کئی دفاتر میں موجود ہے ( `400 ACCOUNT_ID_REQUIRED` آپ کو بتاتا ہے). ### تازہ ترین اکاؤنٹس اور حالات ہر کمپنیاں ہر گھنٹہ کے لئے تازہ کیا جاتا ہے. ایڈجسٹ کی اپنی ترتیبات - `schedule` ، `text` ، `views_per_user` ، ہدف - ایڈجسٹری خود پڑھنے سے آتا ہے، لہذا: - `GET /v1/campaigns/{ad_id}` ٹیلی گرام سے ایڈجسٹ دوبارہ پڑھتا ہے جب ہمارے کاپی پرانے ہے **5 منٹ** جواب دینے سے پہلے کسی کو براہ راست ٹیلی گرام کے اشتہارات کے انٹرفیس میں کیا گیا ہے ایک تبدیلی اس ونڈو کے اندر یہاں ظاہر ہوتا ہے. - چلنے والی مہمیں ( `Active` ، `In Review` ، `On Hold` ) تقریبا ہر 3 گھنٹوں میں پس منظر میں دوبارہ پڑھائی جاتی ہیں. - Orbito Ads کے ذریعے کیے گئے تبدیلیاں - پینل یا یہ API - ایک ہی وقت میں کپی میں ہیں. اگر Telegram وقت پر جواب نہیں دیتا تو، آپ کو محفوظ کپی ملے گی؛ `synced_at` آپ کو بتاتا ہے کہ یہ کتنا قدیم ہے. ## GET /v1/campaigns/{ad_id}/history ایک مدت کے دوران ایک کمپنیاں کی مجموعی تعداد - ایک واحد مجموعی، گھنٹے کے نقطہ نظر نہیں. مثال ``` curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "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` (ایک ڈپازٹ کے لئے) `7d`, `30d` یا `custom` کے ساتھ `startDate` / `endDate` (`YYYY-MM-DD`, UTC(۱) اور اختیاری طور پر `startHour` / `endHour` (0–23). تاریخ کے لئے کوئی اعداد و شمار نہیں `404 NOT_FOUND`. ## مقامی نقل کو سنک کرنا 1. صفحہ `GET /v1/campaigns?cursor=` کے ذریعے اور `(account_id, ad_id)` کے ذریعے اپ گریڈ کیا گیا ہے. 2. حالات کی تبدیلیوں اور گھڑی کے اعداد و شمار کے بجائے ہر منٹ کی درخواست کے لئے [Webhooks کے](/ur/docs/api/webhooks/) پر دستخط کریں. 3. مکمل طور پر ایک دن میں ایک بار دوبارہ سینک کریں جو کچھ بھی نہیں ملتا ہے. ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## GET `/api/v1/campaigns` فلٹر کے ساتھ مہموں کی فہرست صفحات میں پڑھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `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` | ہاں | 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}` ایک مہم کی ٹارگٹنگ، مواد اور شیڈول حاصل کریں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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` ایک مہم کے منتخب دنوں یا گھنٹوں کے مجموعی اعداد پڑھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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" } } ``` ## عملی نفاذ کے نوٹس ## اکاؤنٹ اور مہم کی شناخت account_id اور ad_id ساتھ رکھیں۔ الگ اکاؤنٹس میں ایک ہی ad_id ہو سکتا ہے۔ متعدد اکاؤنٹس والی کلید سے درست ریکارڈ کے لیے account_id دیں۔ ## فلٹر اور حالت فلٹر AND سے ملتے ہیں۔ status میں کاما سے متعدد قدریں دیں۔ فہرست عموماً Deleted چھوڑتی ہے، تفصیل اسے لوٹا سکتی ہے۔ active مطلوبہ نمائش اور status پلیٹ فارم کا فیصلہ ہے۔ ## کارروائیاں اور فیلڈز 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 ## درخواست کی مثال GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · مہم کی تفصیل دیکھنا | فیلڈ | دستاویزی قدر | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/campaigns/) ## CampaignListItem | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## Campaign | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## CampaignStatus | فیلڈ | فیلڈ کی قسم | | --- | --- | | CampaignStatus | Active \| In Review \| Declined \| On Hold \| Stopped \| Paused \| Deleted | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/)[مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/)[موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/)[مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/)[ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**دستیاب اشتہاری اکاؤنٹس**](/ur/docs/api/accounts/)[اگلا موضوع**مہم بنانا اور میڈیا شامل کرنا**](/ur/docs/api/create-campaigns/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API ورژن اور تبدیلیاں [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/changelog/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) ورژن API راستے میں ہے۔ کلائنٹ کو نئے فیلڈز اور enum اقدار سنبھالنی چاہئیں۔ اکتوبر 2026 میں شیڈول، مہم انتظام اور مدت کے مجموعے شامل ہوئے۔ [Markdown](/ur/docs/api/changelog.md) ## API ورژن ورژن راستے پر ہے: `/api/v1` . `v1` میں ہم صرف **اضافی** تبدیلیاں کرتے ہیں: | اضافی (کسی بھی وقت ہوسکتا ہے) | بریکنگ (صرف ایک نئی ورژن میں) | | --- | --- | | نئے نقطہ نظر | ایک انتہائی نقطہ یا میدان کو ہٹانے یا دوبارہ نام دینے کے لئے | | نئے اختیاری درخواست کے میدان | ایک نیا ضروری میدان | | نئے جوابات کے میدان | ایک میدان کی قسم یا معنی کو تبدیل کرنے کے لئے | | enums میں نئے معیار ( `status` ، غلطی `code` ) | ایک enum value کو دور کرنے کے لئے | | نئے خطا کوڈ | ایک قابل اعتماد درخواست ناممکن بنائیں | لہذا گاہکوں کو لکھیں کہ **وہ میدانوں کو نظر انداز کریں جو وہ نہیں جانتے** اور **نامعلوم انوم اور غلطی کوڈ کے ساتھ کام کریں** لطف اندوز. ایک توڑنے کی تبدیلی `/api/v2` کے طور پر بھیجیں گے، یہاں سب سے پہلے اعلان کیا گیا ہے، `v1` اس کے ساتھ چل رہا ہے. ## تبدیلیوں کی تاریخ ### 2026-10-26 — مدت کے مجموعے - **نئے ہیں:** [`GET /v1/stats/analytics`](/ur/docs/api/stats/#doc-note-get-v1statsanalytics) میں سے ہر `topCampaigns` رینج `cpm` لے جاتا ہے - مدت کے دوران 1000 ویڈیوز کے لئے خرچ کیا جاتا ہے - `cpc` اور `cpa` کے ساتھ. - **ٹائپ کریں :** ایک یا دو دن کا ایک ونڈو اب ایک رینج کے طور پر پوچھے جانے والے اسی دنوں میں بالکل اضافہ کرتا ہے. پہلی منٹ کے بعد آدھی رات ( UTC ) اس طرح کے ونڈو سے باہر نکلنے کے لئے استعمال کیا گیا تھا، لہذا ایک دن واپس آ گیا 1-2٪ کم؛ تین دن اور اس سے زیادہ رینج پہلے سے ہی صحیح تھے اور تبدیل نہیں ہوتے. - **ٹائپ کریں :** ایک دو دن تک کے ایک ونڈو جو 29 دن سے زیادہ شروع ہوتا ہے واپس زئوس؛ یہ اب اس دن کے اعداد و شمار کو واپس دیتا ہے. ### 2026-10-08 — اشتہارات کے پروگرام - **نئے ہیں: `schedule`** - صرف منتخب ہفتے کے دنوں اور گھنٹوں پر ایک مہم دکھائیں۔ اس پر ترتیب دیں، `PATCH /v1/campaigns/{ad_id}` ، کپی کریں، یا کئی مہموں کو ایک ہی وقت میں بڑے پیمانے پر عمل **set_schedule** کے ساتھ؛ `null` اسے ہٹا دیتا ہے۔ `GET /v1/campaigns/{ad_id}` اسے واپس دیتا ہے۔ فارمیٹ: [پروگرام](/ur/docs/api/manage-campaigns/#doc-note-schedule)۔ یہ مہم کو بند یا بند نہیں کرتا۔ - ایک مہم کو روکنے، دوبارہ شروع کرنے اور ترمیم کرنے کے لئے اس کی منصوبہ بندی کو برقرار رکھتا ہے؛ کاپی اور دوبارہ شروع کردہ مہمیں اسے وارث کرتی ہیں. - **ٹائپ کریں :** `PATCH /v1/campaigns/{ad_id}` کے ساتھ صرف `cpm`، `active` اور / یا `schedule` Telegram 's جائزہ لینے کے لئے واپس کی مہم بھیج دیا. یہ اب Telegram 's اپنے پیشکش اور حالات فارم کے ذریعے جا رہے ہیں اور کبھی بھی جائزہ لینے کی وجہ سے نہیں ہے; دیگر میدانوں اب بھی کر رہے ہیں ( Telegram 's قاعدہ) - دیکھیں [ایڈٹ](/ur/docs/api/manage-campaigns/#doc-note-edit) . - **ٹائپ کریں :** کوئی بجٹ کے بغیر ایک مہم پر ایک پروگرام قائم کرنے کے لئے اس کو دوبارہ نظر ثانی کرنے کے لئے بھیج سکتے ہیں. اس طرح کی مہم اب `400` کے ساتھ جواب دیتا ہے اور `param: "schedule"` کے ساتھ چھوڑ دیا گیا ہے - بجٹ سب سے پہلے شامل کریں، پھر پروگرام مقرر کریں. - **`GET /v1/campaigns/{ad_id}` اب موجود ہے:** یہ ٹیلی گرام سے اشتہارات کو دوبارہ پڑھتا ہے جب ہمارے کاپی 5 منٹ سے زیادہ پرانے ہے، لہذا `schedule`, `text` اور `views_per_user` براہ راست ٹیلی گرام میں کیے جانے والے تبدیلیوں کو ظاہر کریں. نئے میدان **`synced_at`** یہ کہتا ہے جب ایڈجسٹ آخری بار پڑھا گیا تھا. دیکھیں [تازہ ترین](/ur/docs/api/campaigns/#doc-heading-freshness). ### 2026-10-08 — کمپنیاں مینجمنٹ - **نئے: لکھنے تک رسائی.** کلید اب **کمپنیاں کا انتظام** : `POST /v1/campaigns` لے جا سکتے ہیں (خالق، 100 تک ہر کال)، `PATCH /v1/campaigns/{ad_id}` ، `POST …/pause` ، `…/resume` ، `…/budget` ، `…/copy` ، `POST /v1/campaigns/bulk` ، `DELETE /v1/campaigns/{ad_id}` ، `POST /v1/media` . موجودہ کلید صرف پڑھنے کے لئے رہیں جب تک آپ اسے تبدیل نہیں کریں. - **نئے پڑھتے ہیں:** `GET /v1/campaigns/{ad_id}` (ایک ہدف کے ساتھ ایک مہم)، `GET /v1/tasks/{id}`، `GET /v1/groups`، `GET /v1/targeting`۔ - **ایجنسی ٹیم کے ارکان** کلید پیدا کر سکتے ہیں؛ ایک کلید ان کے رسائی کی سطح پر رکن کے ساتھ اشتراک کردہ کابینہ تک پہنچ جاتا ہے. ایجنسی کے مالک تمام ٹیم کلید ( API & Webhooks → ٹیم کلید) دیکھتا ہے اور ان کو منسوخ کر سکتے ہیں. - **Idempotency-Key** تخلیق، کپی، مجموعی اور بجٹ کے لئے ضروری ہے. - **انفرادی لکھنے کی شرح محدود ہے:** 30 درخواستیں فی منٹ، 60 پڑھنے کے علاوہ. - **`GET /v1/account/info`** شامل `access_level` ، `currency` ، `balance` ، `balance_updated_at` ، `min_budget` ، `features` . - **غلطیوں** غیر متغیر `error` متن کے کنارے `code` اور `request_id` شامل کریں۔ ایک `500` اب اندرونی غلطی متن شامل نہیں ہے۔ - `account_id` ہر جگہ قبول کیا جاتا ہے `accountId` تھا (دونوں کام). - **ٹائپ کریں :** `GET /v1/stats?period=all` کی واپسی کی قیمت ایک کلک کے طور پر `cpa` ہے؛ یہ اب ہر عمل کی قیمت ہے، ہر دوسرے مدت کے طور پر. ### 2026-10-04 - URL فلٹر دونوں ویب ہاکز پر لاگو ہوتا ہے؛ `status_change` صرف کلید تک پہنچتا ہے جس کے مالک کمرے کو دیکھ سکتے ہیں. ### 2026-09-18 - ٹرانسمیشن اپنے اپنے بجٹ حاصل کریں (20 واقعات / سیکنڈ) پڑھنے کی حد سے باہر؛ 1000 واقعات تک کے بٹن. ### 2026-06-30 - داخلہ تبدیل: `POST /v1/postback` ، `GET /v1/ingest/{token}` ، `GET /v1/conversions` . ### پہلے سے - `GET /v1/campaigns` کے ساتھ کورسر صفحہنگ اور `bot_username`، `promote_domain` اور `type` فلٹرز؛ اعداد و شمار کے اختتام پوائنٹس؛ `status_change` اور `hourly_digest` ویب ہاک. مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## عملی نفاذ کے نوٹس ## راستے میں ورژن موجودہ معاہدہ /api/v1 استعمال کرتا ہے۔ ہم آہنگ اضافوں میں اختیاری فیلڈز، اعمال، enum قدریں اور خرابی کوڈ آ سکتے ہیں۔ نامعلوم حالتیں برقرار رکھیں اور غیر مستعمل فیلڈز چھوڑ دیں۔ ## کن تبدیلیوں پر نظر رکھیں موجودہ اسکیما میں ہفتہ وار شیڈول، اکاؤنٹ کی حد میں تحریر اور topCampaigns میں CPM ہے۔ قسم بدلنا، فیلڈ ہٹانا یا نیا لازمی ان پٹ نئی API ورژن مانگتا ہے۔ ## کارروائیاں اور فیلڈز /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 ## درخواست کی مثال GET /api/v1/stats/total?period=30d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · API ورژن اور تبدیلیاں | فیلڈ | دستاویزی قدر | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/changelog/) ## متعلقہ مطالعہ [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/)[تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) حوالے کی تازہ کاری 2026-10-26 [پچھلا موضوع**تصدیق شدہ تبدیلیاں بھیجنا**](/ur/docs/api/conversions/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # تصدیق شدہ تبدیلیاں بھیجنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/conversions/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) سرور یا ٹریکر سے مہم کا حوالہ یا دعوتی لنک، واقعے کی قسم اور منفرد لین دین ID بھیجیں۔ اختیاری آمدنی اور کرنسی نتائج کو خرچ سے ملاتے ہیں۔ [Markdown](/ur/docs/api/conversions.md) Telegram اشتہار دکھانے، کلک اور شمولیت کی تعداد گنتا ہے۔ اگلا نتیجہ، مثلاً لیڈ، ڈپازٹ یا فروخت، آپ کے سرور یا ٹریکر میں درج ہوتا ہے۔ یہ ایونٹس Orbito Ads کو بھیجیں تاکہ ہر مہم کی کنورژنز اور آمدنی پینل، رپورٹس اور خودکار قواعد میں دستیاب ہو۔ ## کنورژن ٹریکنگ فعال کرنا پینل میں کلید کارڈ پر، **Postbacks حاصل کریں** پر کلک کریں۔ اس کے بغیر، `403 INGEST_DISABLED` کی واپسی بھیجیں۔ ٹریکر کے لئے، **ٹریکر URL کے لئے** پر کلک کریں — آپ کو صرف URL (ایک بار دکھایا گیا) لکھا جاتا ہے جو تبدیل پوسٹ کر سکتا ہے لیکن کچھ بھی نہیں پڑھ سکتا۔ ## کنورژن کو مہم سے کیسے ملایا جاتا ہے ہر اشتہارات آپ کو کنٹرول کرنے والے ایک شناختی کے ساتھ کسی جگہ منسلک ہیں: - ایک بٹ یا مینی ایپ: `t.me/yourbot?start=REF` یا `?startapp=REF` - ایک ویب سائٹ: آپ کے ٹریکر کے کلک ID یا لنک میں sub ID، e.g . `https://site.com/?subid=REF` جب آپ ایک تبدیل بھیجتے ہیں تو `REF` کو `ref` کے طور پر شامل کریں۔ Orbito Ads اس کی مہم کو تلاش کرتا ہے جس کا لنک اسے لے جاتا ہے، دفتر میں کلید تک پہنچ جاتا ہے۔ اگر ایک دفتر کے کئی مہمیں ایک ہی `ref` کا اشتراک کرتی ہیں تو ان میں سے ہر ایک کے لئے تبدیل شمار ہوتا ہے۔ ## اپنے سرور سے · POST /v1/postback مثال ``` 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" }' ``` مثال ``` { "success": true, "data": { "id": 551203, "ad_id": 90412, "account_id": 53, "event_type": "purchase", "deduped": false } } ``` ایک بار میں 1000 تک واقعات: `{ "events": [ {…}, {…} ] }` (یا ایک برا رینج)۔ جواب ہر ایک کی رپورٹ کرتا ہے — `{ "accepted": 998, "failed": 2, "results": [ … ] }` — لہذا ایک برا واقعہ کبھی بھی رینج کو ہلکا نہیں کرتا. ## ٹریکر سے · GET /v1/ingest/{token} ٹریکر URL کو اپنے ٹریکر کے پیچھے کی ترتیبات میں شامل کریں، اس کے ماکرو کے ساتھ: مثال ``` # 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} ``` جواب صاف متن ہے: `OK` ، `OK (deduped)` ، یا اس کی HTTP حالت کے ساتھ ایک غلطی پیغام (4xx - نہ رجوع کریں، 5xx - رجوع کریں). ## فیلڈز | میدان | یہ بھی قبول کیا گیا ہے کہ | ضرورت ہے | معنی | | --- | --- | --- | --- | | `ref` | `subid`, `sub_id`, `clickid`, `click_id`, `cnv_id`, `cid` | یس 1 | اشتہارات کے لنک سے شناختی: 512 حروف تک. | | `invite_link` | `invitelink`, `link` | یس 1 | چینل اشتہارات کے لئے: ایک منفرد دعوت لنک Orbito Ads پیدا کیا گیا ہے. | | `event` | `event_type`, `type`, `goal`, `cnv_status` | جی ہاں | `lead`، `conversion` یا `purchase` ہو جاتا ہے (ایک لفظ جیسے `signup`، `ftd`، `deposit`، `sale` سمجھتے ہیں). | | `txid` | `tid` ، `transaction_id` ، `order_id` ، `rdtk_event_id` ، عنوان `X-Idempotency-Key` | جی ہاں | آپ کا ID اس واقعے کے لئے ہے. اسی طرح بھیجیں `txid` اس کے بجائے دوبارہ شمار کرنے کے بجائے ایک بار پھر اپ ڈیٹ کریں. 128 کے لئے ایک اعداد و شمار | | `amount` | `payout`, `sum`, `revenue`, `value` | نہیں | اعداد و شمار؛ شارٹ باکس کے لئے منفی. | | `currency` | `cur`, `cnv_currency` | نہیں | ISO 4217 کوڈ. ایک کے بغیر، ایک رقم USD کے طور پر ریکارڈ کیا جاتا ہے. | | `status` | — | نہیں | آپ کے نیٹ ورک کی اپنی حالت کا لفظ (موافقت، منتظر ...)، اس طرح محفوظ کیا گیا ہے. | | `event_time` | `timestamp`, `date` | نہیں | ISO یا یونیکس وقت؛ گزشتہ 90 دنوں کے اندر اندر رکھا جاتا ہے. | | `account_id` | `accountId` | کبھی کبھی | ضرورت ہے جب ایک ہی `ref` آپ کے کئی دفاتر میں موجود ہے ( `409` دوسری صورت میں). | | `meta` | — | نہیں | آپ کے اپنے JSON اشیاء، 4 KB تک. | 1 `ref` یا `invite_link` . ## حدود اور دوبارہ کوشش 20 واقعات فی سیکنڈ ایک کلید کے ساتھ، 1000 تک دھماکے کے ساتھ - پڑھنے اور لکھنے کے بجٹ سے الگ. `429` پر انتظار کریں `Retry-After`؛ ریٹائرمنٹ ہمیشہ محفوظ ہے کیونکہ `txid` deduplicates. ## GET /v1/conversions مجموعی طور پر، ہر واقعہ میں ایک بار شمار کیا جاتا ہے: مثال ``` curl -s "https://orbitoads.pro/api/v1/conversions?days=30" -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "success": true, "data": [ { "account_id": 53, "ad_id": 90412, "leads": 12, "conversions": 3, "purchases": 1, "revenue": { "USD": 49.9 } } ] } ``` | پارامٹر | معنی | | --- | --- | | `adId` | ایک کمپنیاں | | `days` | صرف 1–365 دنوں میں حاصل ہونے والے واقعات. | - `revenue` ایک کرنسی کے لئے ہے - رقم کبھی تبدیل نہیں کی جاتی ہے. - `ad_id` ایک `ref` کے ساتھ مطابقت رکھنے والے واقعات کے لئے `null` ہے جس میں کئی کمپنیاں حصہ لیتے ہیں. - آپ کو بھیجنے کی رقم آپ کی اپنی رپورٹ ہے. وہ فیکٹری نہیں ہیں اور کچھ بھی نہیں تبدیل کرتے ہیں جو آپ Orbito Ads ادا کرتے ہیں . ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## POST `/api/v1/postback` ایک کنورژن یا 1,000 تک ایونٹس کا بیچ بھیجیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | ہاں | 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 } } ``` ### درخواست کی ساخت 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}` صرف لکھنے والے URL سے ٹریکر کنورژن بھیجیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `token` | path | `string` | ہاں | | `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` کنورژنز کی تعداد اور اصل کرنسی کے مطابق آمدنی دیکھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `adId` | query | `integer` | — | | `days` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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 } } ] } ``` ## عملی نفاذ کے نوٹس ## ایونٹ کو اشتہار سے جوڑنا فراہم کنندہ کلید پر postbacks کی وصولی فعال کریں۔ ref یا invite_link، event اور مستقل txid دیں۔ بنیادی ایونٹس lead، conversion اور purchase ہیں۔ متعدد اکاؤنٹس میں مماثلت پر account_id دیں۔ درخواست کے نتائج اور جواب کے فیلڈ | API | مطلب | | --- | --- | | account_id / accountId | account_id کے لیے accountId بھی قبول ہوتا ہے۔ ایک ہی ref کئی کھاتوں میں ہو تو کھاتا بتائیں۔ غیر واضح مماثلت پر HTTP 409 ملتا ہے۔ | ## نقل کی شناخت اور کرنسی وہی txid ایونٹ کو اپ ڈیٹ کرتا ہے۔ بیچ جزوی کامیاب ہو سکتا ہے۔ آمدنی کی ISO کرنسی دیں، طے شدہ USD ہے۔ منفی رقم چارج بیک ہے۔ ٹریکر URL صرف لکھتا ہے اور متن OK یا OK (deduped) دیتا ہے۔ ## کارروائیاں اور فیلڈز 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 ## درخواست کی مثال GET /api/v1/conversions?days=7 HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · تصدیق شدہ تبدیلیاں بھیجنا | فیلڈ | دستاویزی قدر | | --- | --- | | ref \| invite_link | string | | event | lead \| conversion \| purchase | | txid | string | | amount | number | | currency | ISO 4217 | | GET conversions · days | 1 … 365 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/conversions/) ## ConversionEvent | فیلڈ | فیلڈ کی قسم | | --- | --- | | ref | string | | invite_link | string | | event | string | | txid | string | | amount | number | | currency | string | | status | string | | event_time | string \| integer | | account_id | integer | | meta | object | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## ConversionsRow | فیلڈ | فیلڈ کی قسم | | --- | --- | | account_id | integer | | ad_id | integer \| null | | leads | integer | | conversions | integer | | purchases | integer | | revenue | object | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/)[API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**مہم کے واقعات وصول کرنا**](/ur/docs/api/webhooks/)[اگلا موضوع**API ورژن اور تبدیلیاں**](/ur/docs/api/changelog/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # مہم بنانا اور میڈیا شامل کرنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/create-campaigns/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) ایک درخواست ایک اکاؤنٹ کی 100 مہمات تک قبول کرتی ہے۔ چینل، بوٹ، تلاش یا سامعین منتخب کریں، منفرد کلید دیں اور ٹاسک دیکھیں۔ مطلوبہ میڈیا پہلے اپ لوڈ کریں۔ [Markdown](/ur/docs/api/create-campaigns.md) `POST /v1/campaigns` ایک اکاؤنٹ میں مہمات بناتا ہے۔ مہمات سنبھالنے کی اجازت والی کلید اور `Idempotency-Key` ہیڈر درکار ہیں۔ `202` جواب میں ٹاسک ملتا ہے۔ مکمل ہونے پر مہمات ظاہر ہوتی ہیں۔ [کام](/ur/docs/api/tasks/) ## مہم بنانے کی مثال مثال ``` 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"] }' ``` مثال ``` { "success": true, "data": { "id": 81234, "type": "create", "status": "pending", "account_id": 53, "total": 1, "ad_ids": [] } } ``` ## ایک ساتھ کئی مہمات بنانا ان کی کمپنیاں داخل کریں `campaigns` (تقریبا 100 سے زیادہ) `account_id` اور گروپ کے میدان سب سے اوپر سطح پر رہتے ہیں اور ان میں سے تمام پر لاگو ہوتے ہیں. مثال ``` { "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"] } ] } ``` کمپنیاں ایک کے بعد پیدا کی جاتی ہیں۔ اگر پہلا ایک ناکام ہوتا ہے تو یہ کام روکتا ہے ۔ ایک ہی غلطی کو 100 مرتبہ دوبارہ کرنے کے بجائے انٹرویو کو درست کریں۔ ہر ناکامی `errors` اور `index` کے ساتھ آپ کی ترتیب میں درج کی جاتی ہے۔ ## فیلڈز | میدان | ضرورت ہے | معنی | | --- | --- | --- | | `title` | جی ہاں | اندرونی نام، پینل میں دکھایا گیا ہے. | | `text` | جی ہاں | Telegram ’ کی اپنی لمبائی اور مواد کے قوانین پر لاگو ہوتے ہیں — ایک رد عمل کے `errors` میں واپس آتا ہے. | | `promote_url` | جی ہاں | کیا اشتہارات کھولتا ہے: `https://t.me/channel` ، `t.me/bot?start=ref` ، `@channel` یا ویب سائٹ URL . | | `cpm` | جی ہاں | کاروباری ادارے کی کرنسی میں 1000 نقطہ نظر کے لئے ادائیگی، 0 سے زیادہ ہے، ہدف کے لئے بہت کم → Telegram ’s کم از کم غلطی میں واپس آتا ہے. | | `budget` | جی ہاں | پیسہ کابینہ کی توازن سے کمپنیاں میں منتقل کیا گیا ہے: `0` ، یا کم از کم کابینہ کی `min_budget` ( [اشتہارات اکاؤنٹ](/ur/docs/api/accounts/) ) ۔ `0` کے ساتھ اشتہارات پیدا کیے جاتے ہیں لیکن آپ بجٹ شامل کرنے تک چل سکتے ہیں. | | `target_type` | جی ہاں | `channels`، `bots`، `search` یا `users` — مندرجہ ذیل میں ملاحظہ کریں۔ | | `active` | نہیں | `false` اس کو تبدیل کر دیا گیا ہے. ڈیفالٹ `true` . | | `daily_budget` | نہیں | روزانہ خرچ کرنے کا طریقہ | | `views_per_user` | نہیں | کتنی دفعہ ایک شخص اشتہارات کو دیکھ سکتا ہے، 1-4۔ | | `media` | نہیں | تصویر یا ویڈیو ٹاکن سے [`POST /v1/media`](/ur/docs/api/create-campaigns/#doc-note-upload-media) . | | `picture` | نہیں | `true` ایڈ میں پروموٹ کیا گیا چینل کے ایواٹر کو دکھاتا ہے. | | `button` | نہیں | بٹن کے نیچے ڈبل: `subscribe`, `view`, `read`, `learn_more`, `download`, `open`, `sign_up`, `buy`, `order`, `play`, `try`, `leave_request`. جہاں صرف اشتہارات کے اکاؤنٹ `features.ad_button` ہے `true`. | | `website_name` | نہیں | برانڈ کا نام ایک ویب سائٹ کے اوپر دکھایا گیا ہے. | | `schedule` | نہیں | صرف منتخب ہفتے کے دنوں اور گھنٹوں پر اشتہارات دکھائیں، e.g . ہفتے کے اوقات 9:00-18:00. فارمیٹ: [پروگرام](/ur/docs/api/manage-campaigns/#doc-note-schedule) . اس کے بغیر اشتہارات گھڑی کے ارد گرد چلتا ہے. | سب سے اوپر سطح صرف: `account_id` (کئی کمرے تک پہنچنے کے لئے ضروری ہے)، `group_id` (ایک موجودہ [گروپ](/ur/docs/api/targeting/#doc-note-groups) ) یا `new_group_name` (گروپ بناتا ہے، یا اس نام کے ساتھ ایک دوبارہ استعمال کرتا ہے). نامعلوم میدانوں کو `400 VALIDATION_ERROR` کے ساتھ رد کیا جاتا ہے اور میدان کا نام `param` میں ہے - ایک ٹائپو کبھی بھی خاموشی سے ترتیب نہیں چھوڑتا. ## ٹارگٹنگ ### `channels` — مخصوص چینلز میں اشتہارات دکھائیں مثال ``` { "target_type": "channels", "channels": ["@durov", "t.me/telegram"], "languages": ["en"], "topics": [7, 26], "exclude_topics": [2], "add_similar_channels": true } ``` | میدان | معنی | | --- | --- | | `channels` | 1-100 عوامی چینلز: `@name` ، `name` یا `t.me/name` . | | `languages`, `topics`, `exclude_topics` | ہلکی زبان اور موضوع کی طرف سے چینل ( [کوڈ](/ur/docs/api/targeting/) ). | | `add_similar_channels` | اس کے علاوہ اس طرح کے چینلز بھی شامل کریں. | ### `bots` — بٹ میں اشتہارات دکھائیں مثال ``` { "target_type": "bots", "bots": ["@somebot"] } ``` `bots` : 1-100 عوامی بٹ. ### `search` — Telegram تلاش کے سوالات کے لئے اشتہارات دکھائیں مثال ``` { "target_type": "search", "search_keywords": ["crypto wallet", "bitcoin"] } ``` `search_keywords` : 1–100 جملے، 64 حروف تک ہر ایک. ### `users` — ایک صارف کو اشتہارات دکھائیں مثال ``` { "target_type": "users", "countries": ["DE", "AT"], "languages": ["de"], "topics": [26], "exclude_topics": [2], "audience_channels": ["@somechannel"] } ``` | میدان | معنی | | --- | --- | | `countries` | ISO ممالک کوڈ. | | `languages` | زبان کوڈ | | `topics`, `exclude_topics` | موضوع ID کے بارے میں دلچسپی | | `audience_channels` | جو لوگ ان چینلز کو پڑھتے ہیں | ان میں سے کم از کم ایک کی ضرورت ہے. کوڈ: [ہدف کوڈ](/ur/docs/api/targeting/) . چینلز، بٹ اور مطلوبہ الفاظ Telegram کے اپنے IDs کے لئے حل کیا جاتا ہے جب کام چلتا ہے. Telegram نہیں پایا جا سکتا ہے وہ ہٹا دیا گیا ہے; اگر کوئی نہیں پایا جاتا ہے تو، یہ کمپنیاں ناکام ہو جاتی ہیں - `No targets found: …` چینلز اور بٹ کے لئے، `No valid search queries found` مطلوبہ الفاظ کے لئے - اور `errors` کے کام کا کہنا ہے کہ. ## مہم بنانے کے بعد 1. پول [`GET /v1/tasks/{id}`](/ur/docs/api/tasks/) سے `completed` تک . `ad_ids` نئے مہموں کو برقرار رکھتا ہے. 2. ٹیلی گرام ہر نئے اشتہارات کا جائزہ لیتا ہے: یہ شروع ہوتا ہے `In Review`پھر وہ ہو جاتا ہے `Active` (یا) `Declined`). A کے [Webhook کے مترادف](/ur/docs/api/webhooks/) آپ کو بتائیں کہ کب 3. تبدیلی، فنڈ یا [کمپنیاں کا انتظام](/ur/docs/api/manage-campaigns/) کے ساتھ ان کو روکنے کے لئے. ## میڈیا اپ لوڈ کرنا `POST /v1/media` ایک کابینہ میں ایک تصویر یا ویڈیو اپ لوڈ کرتا ہے اور `POST /v1/campaigns`، `PATCH` اور کاپی کے لئے ایک `media` ٹاکن واپس دیتا ہے. مثال ``` curl -s -X POST "https://orbitoads.pro/api/v1/media?account_id=53" \ -H "X-API-Key: $ORBITO_API_KEY" \ -F "file=@banner.jpg" ``` مثال ``` { "success": true, "data": { "media": "BQACAgIAAx0…", "account_id": 53 } } ``` - JPG، PNG، GIF، WEBP یا MP4، 10 MB تک، `file` کے میدان میں `multipart/form-data` کے طور پر بھیجا. - کچھ کابینہ صرف 16: 9 تصاویر کو قبول کرتے ہیں کم از کم 640 پیکس وسیع؛ اگر ایک فائل مناسب نہیں ہے تو Telegram ’ کی وجہ `error` میں واپس آتا ہے. ## خرابیاں | کوڈ | جب | | --- | --- | | `VALIDATION_ERROR` | ایک فیلڈ گم ہو گیا ہے، نامعلوم، غلط قسم، یا اس `target_type` سے تعلق نہیں ہے - `param` کہتا ہے کہ. | | `IDEMPOTENCY_KEY_REQUIRED` | `Idempotency-Key`ء کی دہائی | | `ACCOUNT_ID_REQUIRED` / `ACCOUNT_NOT_FOUND` | کہو کہ کون سی کابینہ / یہ کابینہ دستیاب نہیں ہے. | | `VIEW_ONLY_ACCESS` | آپ کو اس کابینہ تک ویئر تک رسائی حاصل ہے. | | `QUEUE_FULL` | 5 اس کمرے میں پہلے سے ہی کھیلیں ہیں. | | `CABINET_LOCKED`, `SUBSCRIPTION_REQUIRED` | دفتر ابھی تک دستی تبدیلی نہیں کر سکتے ہیں. | انفرادی مہم کی ناکامیوں (Telegram ایک متن، ایک پیشکش، ایک لنک سے انکار) درخواست کو ناکام نہیں کرتے ہیں - وہ کام کے `errors` میں ظاہر ہوتے ہیں . ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## POST `/api/v1/campaigns` ایک اکاؤنٹ میں ایک یا زیادہ سے زیادہ 100 مہمیں بنانے کا کام قطار میں لگائیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | ہاں | | `X-API-Key` | header | `string` | ہاں | 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": [] } } ``` ### درخواست کی ساخت 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" } ] } ``` درخواست کے نتائج اور جواب کے فیلڈ | API | HTTP | مطلب | | --- | --- | --- | | VALIDATION_ERROR | 400 | دوبارہ بھیجنے سے پہلے فیلڈ دیکھیں اور غلط قدر درست کریں۔ | | IDEMPOTENCY_KEY_REQUIRED | 400 | تبدیلی کی درخواست میں لازم Idempotency-Key ہیڈر بھیجیں۔ | | VIEW_ONLY_ACCESS | 403 | Viewer کھاتا دیکھ سکتا ہے۔ تبدیلی کے لیے کھاتے کی تحریری اجازت درکار ہے۔ | | QUEUE_FULL | 429 | اس کھاتے کی قطار میں تخلیق کے پانچ کام ہیں۔ جگہ خالی ہونے کا انتظار کریں۔ | [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) ## POST `/api/v1/media` میڈیا اپ لوڈ کر کے منتخب اکاؤنٹ کا فائل ٹوکن حاصل کریں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | | `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 } } ``` ### درخواست کی ساخت JSON Schema ``` { "properties": { "account_id": { "type": "integer" }, "file": { "format": "binary", "type": "string" } }, "required": [ "file" ], "type": "object" } ``` مثال · 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" ] } ] } ``` ## عملی نفاذ کے نوٹس ## ایک مہم یا بیچ ایک درخواست میں title، text، promote_url، cpm، budget اور target_type جڑ پر دیں۔ بیچ میں campaigns کے اندر 1–100 اندراج، جڑ پر مشترک اکاؤنٹ اور گروپ دیں۔ بجٹ صفر یا کم سے کم min_budget ہو۔ ## ٹارگٹنگ اور فائلیں channels، bots، search یا users منتخب کریں۔ چینل، بوٹ اور تلاش کی فہرست 1–100 اور ہر فقرہ 64 حروف تک ہے۔ سامعین میں ایک فلٹر چاہیے۔ 10 MB تک JPG، PNG، GIF، WebP اور MP4 اپ لوڈ والے اکاؤنٹ سے منسلک ہیں۔ ## قبولیت اور تکمیل بنانے، نقل اور اجتماعی درخواستوں پر HTTP 202 اور کام کا id ملتا ہے۔ Retry-After کے مطابق GET /api/v1/tasks/{id} دیکھیں۔ completed پر بھی failed اور errors پڑھیں۔ ## کارروائیاں اور فیلڈز POST /api/v1/campaigns POST /api/v1/media channels bots search users - POST /api/v1/campaigns - POST /api/v1/media - channels - bots - search - users ## درخواست کی مثال GET /api/v1/targeting HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## سامعین کے تجربے کی ترتیبات مہم کے اسکیما میں ہدف بندی کے چار طریقے ہیں۔ چینل channels، بوٹ کے نام bots اور تلاش کے الفاظ search_keywords میں جاتے ہیں۔ ملک، زبان اور موضوع کے فلٹر صارفین کے گروپ کی تعریف کرتے ہیں۔ ٹیسٹ سے پہلے اکاؤنٹ کی سہولتیں دیکھیں۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · مہم بنانا اور میڈیا شامل کرنا | فیلڈ | دستاویزی قدر | | --- | --- | | target_type | channels \| bots \| search \| users | | campaigns[] | 1 … 100 | | active = | true | | views_per_user | 1 … 4 | | budget | ≥ 0 | | Idempotency-Key | UUID | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/create-campaigns/) ## CampaignInput | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## CreateBatchRequest | فیلڈ | فیلڈ کی قسم | | --- | --- | | account_id | integer | | group_id | integer | | new_group_name | string | | campaigns | array · [CampaignInput] · 1 … 100 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## CreativeFields | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/)[مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/)[موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/)[مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/)[ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**مہم کی تفصیل دیکھنا**](/ur/docs/api/campaigns/)[اگلا موضوع**موجودہ مہمات بدلنا**](/ur/docs/api/manage-campaigns/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # API کی خرابیوں کو سمجھنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/errors/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) HTTP حالت اور خرابی کا کوڈ اکٹھے پڑھیں۔ کلید نہ ہونے پر 401 ملتا ہے۔ تحریر دہرانے سے پہلے اِن پٹ درست کریں اور حد پوری ہونے پر بتائی گئی مدت انتظار کریں۔ [Markdown](/ur/docs/api/errors.md) ## جواب کا فارمیٹ ہر غلطی ایک ہی شکل ہے: مثال ``` { "success": false, "error": "cpm must be greater than 0", "code": "VALIDATION_ERROR", "param": "campaigns[2].cpm", "request_id": "6f1c2a7e-3b0e-4f39-9a52-0c8d7f1e2b44" } ``` | میدان | ہمیشہ | معنی | | --- | --- | --- | | `error` | جی ہاں | ایک جملہ ایک شخص پڑھ سکتا ہے ۔ اسے دکھائیں ۔ اسے مت چھوڑیں ۔ الفاظ کو بہتر بنایا جا سکتا ہے ۔ | | `code` | جی ہاں تمام v1 غلطیوں پر | سادہ، آلہ پڑھنے کے قابل. اس پر شاخ. | | `param` | انٹرویو غلطیوں کے لئے | ایک راستہ کے طور پر غلط میدان: `cpm` ، `campaigns[2].channels[0]` ، `account_id` . | | `request_id` | زیادہ تر غلطیوں میں | `X-Request-Id` جواب کے عنوان کے طور پر اسی طرح. | کچھ غلطیوں میں شامل ہیں: `min_cpm` اور `currency` جب Telegram بہت کم پیشکش سے انکار کرتا ہے، `missing` `UNKNOWN_AD_IDS` کے ساتھ، `limit` `QUEUE_FULL` کے ساتھ. ## HTTP اسٹیٹس کوڈ | حالات | معنی | رجوع کیا ہے؟ | | --- | --- | --- | | 200 | ڈون | — | | 202 | قبول کیا گیا، پس منظر میں چلتا ہے — poll the [کام](/ur/docs/api/tasks/) | — | | 400 | درخواست غلط ہے (فیلڈ، قیمت، گم `account_id` ) — یا Telegram تبدیلی سے انکار | نہیں - درخواست کو درست کریں | | 401 | کوئی کلید، برا کلید، یا کلید کوئی کابینہ تک نہیں پہنچتا | نہیں | | 403 | کلید یا منصوبہ ایسا کرنے کی اجازت نہیں ہے | نہیں | | 404 | کمرے میں یہ کلید تک نہیں پایا گیا | نہیں | | 409 | موجودہ حالات کے ساتھ تنازعہ (کابینہ بند، Telegram سیشن ختم ہو چکا ہے، اسی درخواست میں آگے بڑھ رہا ہے) | بعض اوقات - کوڈ دیکھیں | | 413 | فائل بہت بڑا ہے | نہیں | | 422 | `Idempotency-Key` ایک مختلف درخواست کے لئے دوبارہ استعمال | نہیں - ایک نئی کلید کا استعمال کریں | | 429 | قیمت کی حد یا کل کی حد | جی ہاں، بعد `Retry-After` سیکنڈ | | 500 | ہماری بوجھ - پہلے سے ہی لاگ ان | ریاست کو سب سے پہلے پڑھیں، پھر باکوف کے ساتھ واپس لوٹیں | | 503 | موقتا ناممکن | جی ہاں، `Retry-After` کے بعد | ## خرابی کے کوڈ ### تصدیق اور رسائی | کوڈ | HTTP | کیا کرنا ہے | | --- | --- | --- | | `API_KEY_MISSING` | 401 | `X-API-Key` کے بارے میں | | `API_KEY_INVALID` | 401 | کلید غلط ہے، منسوخ یا ختم ہو چکا ہے۔ ایک نیا بنائیں۔ | | `NO_ACCOUNTS` | 401 | کلید ابھی تک کوئی فعال کابینہ تک نہیں پہنچتا (کابینہ غیر فعال، رسائی ہٹا دی گئی). | | `FORBIDDEN` | 403 | یہ کلید قسم اس کے مالک کے لئے اجازت نہیں ہے. | | `READ_ONLY_KEY` | 403 | پینل میں کلید کے لئے **کمپنیاں کا انتظام** پر کلک کریں۔ | | `WRITE_NOT_ALLOWED` | 403 | یہ کلید ٹائپ (شرکاء کے لئے Orbito Ads کی طرف سے جاری) کبھی نہیں لکھتا. | | `VIEW_ONLY_ACCESS` | 403 | آپ کا اس دفتر تک رسائی ویئر ہے. ایجنسی کے مالک سے مینیجر کے لئے پوچھیں. | | `FEATURE_NOT_AVAILABLE` | 403 | اس منصوبے میں اس عمل کو شامل نہیں کیا جاتا ہے (جو جواب `feature` کا نام ہے). | | `SUBSCRIPTION_REQUIRED` | 403 | دفتر کے مالک کو کوئی فعال رکنیت نہیں ہے. | | `ACCOUNT_INACTIVE` | 403 | دفتر کو غیر فعال کیا گیا ہے. | ### چیزوں کو تلاش کریں | کوڈ | HTTP | کیا کرنا ہے | | --- | --- | --- | | `ACCOUNT_ID_REQUIRED` | 400 | کلید کئی کابینہ تک پہنچتا ہے (یا یہ `ad_id` کئی میں موجود ہے) — پاس `account_id` . | | `ACCOUNT_NOT_FOUND` | 404 | یہ `account_id` اس کلید کے ساتھ دستیاب نہیں ہے. چیک کریں `GET /v1/account/info` . | | `CAMPAIGN_NOT_FOUND` | 404 | کلید کے دفتر میں اس طرح کی مہم نہیں ہے (یا یہ حذف کیا جاتا ہے). | | `TASK_NOT_FOUND` | 404 | اس کلید کے مالک کے لئے اس طرح کا کام نہیں ہے. | | `NOT_FOUND` | 404 | اس فہرست اور اس مدت کے لئے کوئی اعداد و شمار نہیں ہیں. | | `UNKNOWN_AD_IDS` | 400 | کچھ `ad_ids` ایک بڑے پیمانے پر کال میں اس کابینہ کی کمپنیاں نہیں ہیں؛ `missing` ان کی فہرست ہے. | ### داخلہ | کوڈ | HTTP | کیا کرنا ہے | | --- | --- | --- | | `VALIDATION_ERROR` | 400 | `param` فیلڈ کا نام دیتا ہے؛ `error` کہتا ہے کہ کیا غلط ہے. | | `UNSUPPORTED_MEDIA` | 400 | JPG، PNG، GIF، WEBP یا MP4 کو `file` فیلڈ میں اپ لوڈ کریں. | | `FILE_TOO_LARGE` | 413 | ایک چھوٹا سا فائل اپ لوڈ کریں (10 MB زیادہ سے زیادہ). | ### Telegram اور کابینہ ریاست | کوڈ | HTTP | کیا کرنا ہے | | --- | --- | --- | | `PLATFORM_REJECTED` | 400 | Telegram نے تبدیلی سے انکار کیا؛ `error` اس کی وجہ لے جاتا ہے. ایک کم پیشکش کے ساتھ آپ کو بھی `param: "cpm"`، `min_cpm` اور `currency` ملتا ہے. | | `BUDGET_UNCHANGED` | 400 | Telegram نے اوپر اپ کو قبول کیا لیکن کمپنیاں کے بجٹ میں کوئی حرکت نہیں ہوئی۔ کابینہ کی توازن ( `GET /v1/account/info` ) چیک کریں۔ | | `INSUFFICIENT_AD_BALANCE` | 400 | آپ کو کمپنیاں سے زیادہ نکالنے کے لئے پوچھا گیا ہے. کم نکالنے، یا `withdraw_all` کا استعمال کریں. | | `CABINET_AUTH_EXPIRED` | 409 | دفتر کی Telegram سیشن ختم ہو چکی ہے۔ مالک اسے پینل میں دوبارہ منسلک کرتا ہے، پھر واپس آتا ہے۔ | | `CABINET_LOCKED` | 409 | کابینہ خود کار طریقے سے کنٹرول کیا جاتا ہے؛ دستی تبدیلیوں کو روک دیا جاتا ہے. | ### محدودیتیں اور واپسی | کوڈ | HTTP | کیا کرنا ہے | | --- | --- | --- | | `RATE_LIMITED` | 429 | `Retry-After` سیکنڈ کا انتظار کریں۔ [شرح محدود](/ur/docs/api/rate-limits/) دیکھیں ۔ | | `QUEUE_FULL` | 429 | کابینہ پہلے سے ہی 5 آپریشنوں کو کوڈ کیا گیا ہے. ایک کام ختم کرنے کے لئے انتظار کریں، پھر رجوع کریں (ایک ہی `Idempotency-Key` ٹھیک ہے). | | `IDEMPOTENCY_KEY_REQUIRED` | 400 | ایک `Idempotency-Key` سر شامل کریں. | | `IDEMPOTENCY_KEY_INVALID` | 400 | 8-255 حروف کا استعمال کریں؛ ایک UUID اچھا ہے. | | `IDEMPOTENCY_KEY_REUSED` | 422 | یہ کلید ایک مختلف درخواست کے لئے استعمال کیا گیا تھا - نئے عمل، نئے کلید. | | `IDEMPOTENCY_IN_PROGRESS` | 409 | اس کلید کے ساتھ پہلا درخواست اب بھی چل رہا ہے. | | `IDEMPOTENCY_UNAVAILABLE` | 503 | کچھ بھی نہیں کیا گیا ۔ ایک ہی کلید کے ساتھ واپسی ۔ | | `INGEST_DISABLED` | 403 | کلید کے لئے **Postbacks حاصل کریں** پر کلک کریں ( [تبدیل کرنے کے](/ur/docs/api/conversions/) ). | | `INTERNAL_ERROR` | 500 | ہمارے طرف ایک کے ساتھ اس کی جگہ چیک کریں GET ایک لکھنے سے پہلے: رابطہ کریں [@orbitoads](https://t.me/orbitoads) کے ساتھ `request_id` اگر یہ جاری رہتا ہے | ## درخواست کب دہرائیں - **4xx** - غیر متغیر کی واپسی نہ کریں؛ درخواست کو درست کریں۔ (ایک 4xx آپ کے `Idempotency-Key` کا استعمال کبھی نہیں کرتا، لہذا آپ ایک ہی کلید کے ساتھ مقررہ درخواست کو واپسی کرسکتے ہیں۔) - **429 / 503** - `Retry-After` کے بعد واپسی. - **5x ایک لکھنے کے بعد** - تبدیلی Telegram تک پہنچ سکتی ہے یا نہیں ہوسکتی ہے ۔ **اسی طرح** `Idempotency-Key` کے ساتھ واپسی ایک ہی 5xx (تصمیم کے مطابق - یہ دوہری کارروائی سے روکتا ہے) واپس آتا ہے ۔ `GET` کی مہم دیکھنے کے لئے کیا ہوا ہے، پھر فیصلہ کریں ۔ اگر آپ واپسی کرتے ہیں تو ایک نئی کلید کا استعمال کریں ۔ - **نیٹ ورک ٹائم اوٹ پر لکھا** - **اسی طرح** `Idempotency-Key` کے ساتھ واپسی ۔ اگر پہلا کوشش گزر گیا تو آپ اس کا نتیجہ حاصل کریں گے ۔ اگر ایسا نہیں ہوا تو آپریشن اب چلتا ہے ۔ ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ مثال · JSON ``` { "httpStatus": 400, "body": { "success": false, "error": "Choose a positive CPM.", "code": "VALIDATION_ERROR", "param": "cpm", "request_id": "example-request-013" } } ``` ## HTTP | کوڈ | 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 | ## عملی نفاذ کے نوٹس ## خرابی کا جواب پڑھنا خرابی میں success=false اور error ہوتے ہیں۔ کلائنٹ میں code اور معاونت کے لیے request_id لیں۔ param غلط فیلڈ، missing نامعلوم اشتہار IDs اور min_cpm و currency مسترد بولی کا اشارہ دے سکتے ہیں۔ ## حالت کے مطابق دوبارہ کوشش 400 پر ان پٹ، 401 پر کلید، 403 پر اجازت درست کریں۔ 404 پر اکاؤنٹ اور اشتہار IDs دیکھیں۔ 409 کو code سے سمجھیں۔ کوٹے اور عارضی خرابی پر Retry-After مانیں۔ 422 کے بعد واقعی نئے عمل کے لیے نئی شناخت دیں۔ ## کارروائیاں اور فیلڈز error code param request_id 401 403 409 422 429 - error - code - param - request_id - 401 - 403 - 409 - 422 - 429 ## درخواست کی مثال GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · API کی خرابیوں کو سمجھنا | فیلڈ | دستاویزی قدر | | --- | --- | | error | string | | code | string | | param | string \| null | | request_id | X-Request-Id | | HTTP 429 | Retry-After | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/errors/) ## Error | فیلڈ | فیلڈ کی قسم | | --- | --- | | success | false | | error | string | | code | string | | param | string | | request_id | string | | min_cpm | number | | currency | string | | missing | array · [integer] | | limit | integer | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/)[ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/)[قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/)[مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**AI اسسٹنٹ کے لیے API حوالہ**](/ur/docs/api/ai-assistants/)[اگلا موضوع**درخواست اور واقعے کی حدود**](/ur/docs/api/rate-limits/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # ایک ہی کارروائی کی دوبارہ کوشش [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/idempotency/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) ہر تخلیق، نقل، بیچ یا بجٹ کی تبدیلی کے لیے نئی Idempotency-Key دیں۔ دوبارہ کوشش میں کلید اور متن ایک رکھیں۔ دوسری کارروائی میں یہی شناخت دینے پر خرابی ملتی ہے۔ [Markdown](/ur/docs/api/idempotency.md) کبھی سرور درخواست وصول کر لیتا ہے لیکن جواب پہنچنے سے پہلے رابطہ ٹوٹ جاتا ہے۔ بلا تصدیق دوبارہ بھیجنے سے رقم دو بار منتقل ہو سکتی ہے یا ایک ہی مہم دو بار بن سکتی ہے۔ `Idempotency-Key` سے سرور اسی کارروائی کی دوبارہ کوشش پہچان لیتا ہے۔ ## آئیڈیم پوٹینسی کلید کب ضروری ہے | انتہائی نقطہ | ہائیڈر | | --- | --- | | `POST /v1/campaigns` | ضروری ہے | | `POST /v1/campaigns/{ad_id}/copy` | ضروری ہے | | `POST /v1/campaigns/bulk` | ضروری ہے | | `POST /v1/campaigns/{ad_id}/budget` | ضروری ہے | | دیگر خطوط ( `PATCH` ، استراحت / خلاصہ ، `DELETE` ، میڈیا) | اختیاری - وہ اپنے آپ کو دوبارہ کرنے کے لئے محفوظ ہیں | ہدایت کے بغیر یہ `400 IDEMPOTENCY_KEY_REQUIRED` واپس آتے ہیں. ## آئیڈیم پوٹینسی کلید کیسے بھیجیں ایک نئی تصادفی قدر پیدا کریں - ایک UUID - **ہر عمل کے لئے** ، اور ہر بار جب آپ اس عمل کو واپس کرتے ہیں تو **اسی طرح** قدر بھیجیں. مثال ``` 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 ``` مثال ``` 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 ``` ## دہرائی گئی درخواست کا جواب | حالات | جوابات | | --- | --- | | اس کلید کے ساتھ پہلا درخواست | معمولی طور پر چلتا ہے. | | ایک ہی کلید، ایک ہی درخواست، سب سے پہلے ایک ختم | **ذخیرہ** کا جواب، تبدیل نہیں ہوا، سر کے ساتھ `Idempotent-Replayed: true` . کچھ دوبارہ نہیں چلتا. | | ایک ہی کلید، ایک ہی درخواست، سب سے پہلے ایک اب بھی چل رہا ہے | `409 IDEMPOTENCY_IN_PROGRESS` + `Retry-After` . مختصر طور پر واپس. | | ایک ہی کلید، مختلف جسم یا انتہائی نقطہ نظر | `422 IDEMPOTENCY_KEY_REUSED`۔ ایک نئی کارروائی کو ایک نئی کلید کی ضرورت ہے۔ | | پہلا درخواست ایک 4xx میں ختم ہو گیا (خراب انٹرویو، منصوبہ بندی، کوہ مکمل...) | کلید جاری کیا جاتا ہے: درخواست کو درست کریں اور اسے **اسی طرح** کلید کے ساتھ بھیجیں. | | پہلی درخواست 5xx میں ختم ہو گئی | 5x کو محفوظ کیا جاتا ہے اور دوبارہ ادا کیا جاتا ہے - تبدیلی ٹیلی گرام تک پہنچ سکتی ہے، اور کلید موجود ہے اس کو دو بار چلانے سے روکنے کے لئے. کی کمپنیاں دیکھیں `GET`اس کے بعد، اگر آپ اب بھی عمل کرنا چاہتے ہیں تو ایک نئی کلید کا استعمال کریں. | "ایک ہی درخواست" کا مطلب ایک ہی طریقہ، راستہ اور JSON جسم ہے (کلید آرڈر کوئی فرق نہیں پڑتا). ## کلید پر عمل کے قواعد - کلید آپ کے API کلید پر منحصر ہے - دو انضمام کے ساتھ جھڑپ نہیں کر سکتے ہیں. - کلیدوں کو 24 گھنٹوں کے لئے برقرار رکھا جاتا ہے، اس کے بعد ایک نئی کارروائی شروع ہوتی ہے. - کسی بھی 8-255 حروف کی لائن کام کرتا ہے؛ ایک UUID صحیح ڈفالٹ ہے. - اگر ہم کلید کو ریکارڈ نہیں کر سکتے ہیں تو، آپریشن نہیں چلتا ہے اور آپ `503 IDEMPOTENCY_UNAVAILABLE` حاصل کرتے ہیں - ایک ہی کلید کے ساتھ واپس آتے ہیں. مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## عملی نفاذ کے نوٹس ## فی عمل ایک شناخت بنانے، نقل، اجتماعی عمل اور بجٹ کے لیے Idempotency-Key ضروری ہے۔ ہر عمل کی نئی 8–255 حروف کی بے ترتیب قدر دوبارہ کوشش میں وہی رکھیں۔ 24 گھنٹے تک API کلید، طریقہ، راستہ اور JSON سے بندھی ہے۔ ## متوازی یا بدلی دوبارہ کوشش مکمل جواب Idempotent-Replayed: true کے ساتھ دہرایا جاتا ہے۔ زیرِ عمل نقل 409 و Retry-After، بدلی درخواست 422 دیتی ہے۔ 4xx جانچ خرابی کلید آزاد کرتی ہے۔ محفوظ 5xx کے بعد نیا عمل بھیجنے سے پہلے ریکارڈ پڑھیں۔ ## کارروائیاں اور فیلڈز Idempotency-Key Idempotent-Replayed 409 IDEMPOTENCY_IN_PROGRESS 422 IDEMPOTENCY_KEY_REUSED - Idempotency-Key - Idempotent-Replayed - 409 IDEMPOTENCY_IN_PROGRESS - 422 IDEMPOTENCY_KEY_REUSED ## درخواست کی مثال GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · ایک ہی کارروائی کی دوبارہ کوشش | فیلڈ | دستاویزی قدر | | --- | --- | | Idempotency-Key | UUID | | 200 / 202 | Idempotent-Replayed: true | | 409 | IDEMPOTENCY_IN_PROGRESS, Retry-After | | 422 | IDEMPOTENCY_KEY_REUSED | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/idempotency/) ## متعلقہ مطالعہ [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/)[درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/)[قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/)[مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**درخواست اور واقعے کی حدود**](/ur/docs/api/rate-limits/)[اگلا موضوع**قطار میں کارروائی کی نگرانی**](/ur/docs/api/tasks/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # موجودہ مہمات بدلنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/manage-campaigns/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) متن، لنک، بولی، روزانہ حد، شیڈول، بجٹ اور نمائش بدلیں۔ ایک بیچ میں 1,000 تک مہمات آسکتی ہیں۔ ٹاسک میں جزوی ناکامیاں دیکھیں۔ [Markdown](/ur/docs/api/manage-campaigns.md) یہاں تمام کالوں کو **کمپنیاں کا انتظام** کے ساتھ ایک کلید کی ضرورت ہوتی ہے اور مینیجر (یا مالک) کابینہ تک رسائی حاصل کرتا ہے. وہ ایک کمپنیاں پر عمل کرتے ہیں, `(account_id, ad_id)` : جسم میں `account_id` پاس کریں یا جب کلید کئی کابینہ تک پہنچتا ہے تو پوچھیں. ہر تبدیلی کی تاریخ میں ظاہر ہوتا ہے کمپنیاں کی تاریخ میں پینل مارک **🔌 API** . | کال کریں | کیا کرتا ہے | جوابات | | --- | --- | --- | | `PATCH /v1/campaigns/{ad_id}` | ترمیم متن، لنک، bid، cap، پروگرام، on/off | فوراً | | `POST /v1/campaigns/{ad_id}/pause` | سوئچ سے | فوراً | | `POST /v1/campaigns/{ad_id}/resume` | سوئٹ پر | فوراً | | `POST /v1/campaigns/{ad_id}/budget` | بجٹ شامل کریں یا نکالیں | فوراً | | `DELETE /v1/campaigns/{ad_id}` | حذف کریں | فوراً | | `POST /v1/campaigns/{ad_id}/copy` | 1 - 100 کاپی | 202 + [کام](/ur/docs/api/tasks/) | | `POST /v1/campaigns/bulk` | 1000 سے زائد کمپنیاں پر ایک کارروائی | 202 + کام کرنے کے لئے | براہ راست جوابات `data` میں اپ ڈیٹ [کمپنیاں کے موضوعات](/ur/docs/api/campaigns/#doc-note-the-campaign-object) کو واپس لیں. ## ترمیم `PATCH /v1/campaigns/{ad_id}` - صرف جو تبدیلیاں بھیجیں. مثال ``` 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." }' ``` | میدان | معنی | | --- | --- | | `title`, `text`, `promote_url` | تخلیق اور لنک | | `cpm` | نئے بوجھ، 0 سے زیادہ. | | `daily_budget` | روزانہ کاپ | | `views_per_user` | 1–4. | | `active` | `true` / `false` - اسی طرح دوبارہ / روکنے کے لئے. | | `schedule` | دنوں اور گھنٹوں کو دکھانے کے لئے اشتہارات؛ `null` اسے ہٹا دیتا ہے — دیکھیں [پروگرام](/ur/docs/api/manage-campaigns/#doc-note-schedule) . | | `media`, `picture`, `button`, `website_name` | [پیدا کرنے کے لئے](/ur/docs/api/create-campaigns/#doc-note-fields) کے طور پر. | **Telegram کی طرف سے کیا ہے.** تبدیلی `cpm` ، `active` یا `schedule` نہیں ہے - وہ ایک بار میں لاگو ہوتے ہیں اور کمپنیاں جاری رہتی ہیں. کسی بھی دوسرے فیلڈ ( `title` ، `text` ، `promote_url` ، `media` ، `picture` ، `button` ، `website_name` ، `views_per_user` ، `daily_budget` ) کے ذریعے محفوظ کیا جاتا ہے Telegram کی مکمل اشتہارات فارم کے ذریعے، اور Telegram دوبارہ اشتہارات کا جائزہ لیتا ہے: یہ `In Review` دکھاتا ہے جب تک کہ اس کی تصدیق نہیں کی جاتی. ہدف (`channels`, `countries`ایک موجودہ اشتہارات میں تبدیلی نہیں کر سکتے ہیں - ٹیلی گرام اس کی اجازت نہیں دیتا. نئے مقصد کے ساتھ ایک نئی مہم بنائیں، یا [کاپی](/ur/docs/api/manage-campaigns/#doc-note-copy) اور ان کو تبدیل کریں. `meta` میں جواب میں: | میدان | معنی | | --- | --- | | `status_warning` | میدانوں کو محفوظ کیا گیا تھا، لیکن Telegram ان / آؤٹ سوئچ کو لاگو نہیں کیا گیا تھا (مثال کے طور پر، کوئی بجٹ نہیں). | | `status_intent_only` | آپ کا ان / آؤٹ انتخاب محفوظ کیا جاتا ہے اور جب Telegram کر سکتے ہیں تو لاگو ہوتا ہے (مراجعت میں، کوئی بجٹ نہیں). | | `status_already_set` | یہ کام آپ کی طرف سے پوچھا گیا ہے کہ ریاست میں پہلے سے ہی تھا. | اس ہدف کے لئے Telegram 's کے کم سے کم کی پیشکش `400 PLATFORM_REJECTED` `param: "cpm"`، `min_cpm` اور `currency` کے ساتھ واپس آتا ہے. ## روکنا اور دوبارہ چلانا مثال ``` 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` اس کا مطلب یہ ہے کہ ٹیلی گرام اس پر عمل نہیں کرسکتا – کمپنیاں نظر ثانی کر رہے ہیں، منسوخ کر رہے ہیں یا بجٹ سے باہر ہیں – اور آپ کا انتخاب محفوظ کیا جاتا ہے: یہ جتنی جلد ممکن ہو چلتا ہے. جب آپ کی حالت واقعی تبدیل ہو جاتی ہے تو، آپ کے [Webhook کے مترادف](/ur/docs/api/webhooks/) بھڑیاں ## اشتہارات دکھانے کا شیڈول ایک کمپنیاں صرف منتخب ہفتے کے دنوں اور گھنٹوں پر دکھائیں — مثال کے طور پر ہفتے کے اوقات 9:00-18:00، یا صرف راتوں. ان گھنٹوں کے باہر Telegram اشتہارات کو نہیں دکھاتا. ترتیب، تبدیل یا ایک پروگرام کو ہٹانے کے لئے کمپنیاں کو نہیں روکتا ہے یا نہیں – `status` اور `active` رہتے ہیں جیسا کہ وہ ہیں. یہ ہر کابینہ کی قسم پر کام کرتا ہے. مثال ``` 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" } }' ``` | میدان | معنی | | --- | --- | | `days` | `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `sun` ہر ایک اس دن چلنے والے گھنٹوں (0-23) کو برقرار رکھتا ہے. `9` یعنی 9: 00 - 09: 59، لہذا `[9, …, 17]` 9: 00 سے 18: 00 تک ہے. ایک دن آپ کو چھوڑ دیا جائے گا، یا آپ کو بھیج دیا جائے گا `[]`چلتا نہیں ہے کم از کم ایک گھنٹہ کے طور پر مجموعی طور پر. | | `timezone` | جس کے گھڑی گھنٹوں کے بعد. `"viewer"` - ہر گاہک کی اپنی مقامی وقت؛ صرف گاہکوں کو ہدف بنانے کے لئے ( `target_type: "users"` )۔ دوسری صورت میں ایک UTC آفسیٹ: `"+03:00"` ، `"-05:00"` ، `"+05:30"` . آفسیٹ Telegram پیش کرتے ہیں: پورے گھنٹوں سے `-12:00` سے `+14:00` ، اس کے علاوہ `-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"` اور `"+3"` بھی قبول کیا جاتا ہے. | `"schedule": null` اس پروگرام کو ہٹا دیتا ہے — ایڈ ایک بار پھر گھڑی کے ارد گرد چلتا ہے. **کوئی بجٹ کے بغیر ایک منصوبہ بندی نہیں کر سکتے ہیں.** ٹیلی گرام صرف ایک کمپنیاں پر ایک پروگرام قبول کرتا ہے جو چل سکتا ہے، لہذا ایک `Stopped` کچھ بھی نہیں چھوڑتا آپ کو حاصل کرنے کے لئے `400 PLATFORM_REJECTED` کے ساتھ `param: "schedule"` اور کچھ بھی نہیں بدلتا - سب سے پہلے بجٹ شامل کریں، پھر پروگرام مقرر کریں. ایک بار پھر (`On Hold`(مجھے لگتا ہے کہ یہ کام اچھی طرح سے چلتا ہے) کمپنیاں اشیاء ایک ہی شکل میں اس پروگرام کو واپس دیتا ہے، ہمیشہ سب سات دنوں کے ساتھ اور `"+03:00"` کے طور پر لکھا ہے - لہذا آپ اسے پڑھ سکتے ہیں، ایک دن تبدیل کریں اور اسے واپس بھیجیں. `GET /v1/campaigns/{ad_id}` اس وقت کے پروگرام کو دیتا ہے یہاں تک کہ اگر یہ براہ راست Telegram میں تبدیل کیا گیا ہے - دیکھیں [تازہ ترین](/ur/docs/api/campaigns/#doc-heading-freshness) . 0 سے 23 کے باہر گھنٹے، ایک نامعلوم دن، ایک خالی پروگرام، `"viewer"` ایک چینل / بٹ / تلاش ایڈ یا ایک Telegram کے طور پر ڈسکاؤنٹ پیش نہیں کرتا → `400 VALIDATION_ERROR` `param` میں صحیح میدان کے ساتھ (مثال کے طور پر `schedule.days.mon`). [کاپی](/ur/docs/api/manage-campaigns/#doc-note-copy) اور رجوع مکرر مہمیں ان سے آنے والی مہم کے پروگرام کو برقرار رکھیں. ایک ہی وقت میں کئی مہموں پر ایک پروگرام مقرر کرنے کے لئے، مجموعی عمل `set_schedule` کا استعمال کریں. ## مہم کا بجٹ `POST /v1/campaigns/{ad_id}/budget` پیسہ کی منتقلی کے اکاؤنٹ کے توازن اور کمپنیاں کے درمیان. ایک کی ضرورت ہے `Idempotency-Key`. مثال ``` 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` | اثر | | --- | --- | --- | | `add` | ضروری ہے | کابینہ کی توازن → کمپنیاں | | `withdraw` | ضروری ہے | کمپنیاں → کابینہ کی توازن. زیادہ سے زیادہ کمپنیاں ہے → `400 INSUFFICIENT_AD_BALANCE` . | | `withdraw_all` | — | تمام کاموں کے لئے باقی رہ گیا ہے → کابینہ توازن. | `meta.moved` کیا ہے جو واقعی منتقل کیا گیا ہے `meta.partial` ہے `true` جب کم سے کم درخواست کی جاتی ہے تو اس سے باہر نکال دیا جا سکتا ہے. پیسہ کبھی نہیں چھوڑتا اشتہارات کے اکاؤنٹ کے ذریعے API. ## مہم کی نقل `POST /v1/campaigns/{ad_id}/copy` ایک ہی ہدف کے ساتھ کاپی بناتا ہے؛ جو کچھ بھی آپ بھیجتے ہیں وہ اصل سے زیادہ ہے. ایک کی ضرورت ہے `Idempotency-Key`. ایک کام کی طرف رجوع کریں جس کے `ad_ids` یہ کپی ہیں مثال ``` { "account_id": 53, "copies": 3, "text": "Variant B — shorter", "cpm": 2, "budget": 5 } ``` | میدان | معنی | | --- | --- | | `copies` | 1 - 100، معیاری 1. | | `title`, `text`, `promote_url`, `cpm`, `budget`, `media`, `picture`, `views_per_user` | `budget` : `0` یا کم از کم دفتر کے `min_budget` . | | `schedule` | کاپی [پروگرام](/ur/docs/api/manage-campaigns/#doc-note-schedule) کو محفوظ رکھیں؛ اسے تبدیل کرنے کے لئے ایک بھیجیں، یا `null` کسی کے لئے نہیں. | | `group_id` / `new_group_name` | کپی کو ایک گروپ میں رکھیں. | ## حذف کرنا مثال ``` curl -s -X DELETE "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "success": true, "data": { "ad_id": 90412, "account_id": 53, "deleted": true } } ``` ایک حذف کردہ مہم جس میں تبصرے آپ کے اعداد و شمار میں رہتے ہیں `status: "Deleted"`جو کوئی نہیں چلتا وہ ہٹا دیا جاتا ہے حذف دوبارہ رجوع کریں `404 CAMPAIGN_NOT_FOUND`. ## اجتماعی کارروائیاں `POST /v1/campaigns/bulk` ایک کاروبار کے 1000 تک کی کمپنیاں پر ایک کارروائی کا استعمال کرتا ہے. `Idempotency-Key` کی ضرورت ہوتی ہے. مثال ``` 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` | اضافی میدان | اثر | | --- | --- | --- | | `pause` | — | سوئچ سے | | `resume` | — | سوئٹ پر | | `add_budget` | `amount` | ہر کمپنیاں میں شامل کریں | | `withdraw_budget` | `amount` | ہر مہم سے باہر نکلنا | | `withdraw_all_budget` | — | ہر کام سے ہر چیز کو نکالنا | | `set_cpm` | `cpm` | ہر ایک پر اسی طرح کی پیشکش کریں | | `set_schedule` | `schedule` | ہر ایک پر ایک ہی [پروگرام](/ur/docs/api/manage-campaigns/#doc-note-schedule) مقرر کریں؛ `"schedule": null` اسے ہٹا دیتا ہے | | `delete` | — | ہر ایک کو ہٹا دیں | ہر `ad_id` اس کابینہ کی ایک لائیو کمپنیاں ہونا چاہئے؛ دوسری صورت میں کچھ بھی نہیں ہے اور آپ کو `missing` میں مجرموں کے ساتھ `400 UNKNOWN_AD_IDS` ملتا ہے. دوبارہ نظر انداز کیا جاتا ہے. کام کی `errors` فہرستوں کی کمپنیاں Telegram سے انکار کیا گیا ہے - `set_schedule` کے ساتھ، اس کے علاوہ کوئی بجٹ کے ساتھ کمپنیاں اور کمپنیاں جہاں `"timezone": "viewer"` درخواست نہیں کر سکتے ہیں کیونکہ وہ ایک صارف کو ہدف نہیں دیتے ہیں. ## فی کارروائی زیادہ لاگت والی مہم روکنا مثال ``` 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 کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## PATCH `/api/v1/campaigns/{ad_id}` مہم کی بھیجی گئی سیٹنگز بدلیں اور باقی فیلڈز برقرار رکھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | | `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" } } ``` ### درخواست کی ساخت 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" } ``` درخواست کے نتائج اور جواب کے فیلڈ | API | مطلب | | --- | --- | | status_warning | فیلڈ محفوظ ہو گئے، مگر مثلاً بجٹ نہ ہونے سے ترسیل آن یا آف نہ ہو سکی۔ | | status_intent_only | مطلوبہ حالت درج ہے۔ جائزے یا بجٹ کی شرط پوری ہونے پر لاگو ہو سکتی ہے۔ | | status_already_set | مہم پہلے ہی مطلوبہ حالت میں تھی۔ | [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) ## POST `/api/v1/campaigns/{ad_id}/pause` مہم کی نمائش روکنے کی درخواست دیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | | `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` نمائش ممکن ہونے پر مہم بحال کرنے کی درخواست دیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | | `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` اکاؤنٹ بیلنس اور ایک مہم کے درمیان بجٹ منتقل کریں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | ہاں | | `X-API-Key` | header | `string` | ہاں | 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 } } ``` ### درخواست کی ساخت 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` اصل ٹارگٹنگ اور اختیاری تبدیلیوں کے ساتھ 100 تک نقول قطار میں لگائیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `Idempotency-Key` | header | `string` | ہاں | | `X-API-Key` | header | `string` | ہاں | 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": [] } } ``` ### درخواست کی ساخت 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` ایک اکاؤنٹ کی 1,000 تک مہموں پر ایک عمل قطار میں لگائیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `Idempotency-Key` | header | `string` | ہاں | | `X-API-Key` | header | `string` | ہاں | 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": [] } } ``` ### درخواست کی ساخت 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}` مہم ہٹائیں اور دستیاب پرانے نمائش کے اعداد برقرار رکھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `ad_id` | path | `integer` | ہاں | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | | `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 } } ``` ## عملی نفاذ کے نوٹس ## قابلِ تبدیلی فیلڈز اور وقت cpm، active یا schedule بدلنے سے مواد کا نیا جائزہ شروع نہیں ہوتا۔ مواد کی تبدیلی سے ہو سکتا ہے۔ اصل ٹارگٹنگ مقرر رہتی ہے۔ ہفتے کے دن، 0–23 گھنٹے اور UTC فرق دیں۔ users کے لیے viewer اور شیڈول ہٹانے کے لیے null ہے۔ ## اکاؤنٹ کے اندر بجٹ کی منتقلی add رقم مہم میں دیتا ہے۔ withdraw مطلوبہ رقم اور withdraw_all باقی بجٹ اکاؤنٹ میں لوٹاتا ہے۔ meta.moved اور meta.partial دیکھیں۔ بیرونی ٹاپ اَپ، انوائس اور واپسی بلنگ میں ہیں۔ ## قبولیت اور تکمیل بنانے، نقل اور اجتماعی درخواستوں پر HTTP 202 اور کام کا id ملتا ہے۔ Retry-After کے مطابق GET /api/v1/tasks/{id} دیکھیں۔ completed پر بھی failed اور errors پڑھیں۔ ## کارروائیاں اور فیلڈز 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 ## درخواست کی مثال GET /api/v1/campaigns/{ad_id}?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · موجودہ مہمات بدلنا | فیلڈ | دستاویزی قدر | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/manage-campaigns/) ## UpdateRequest | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## BudgetRequest | فیلڈ | فیلڈ کی قسم | | --- | --- | | account_id | integer | | action | add \| withdraw \| withdraw_all | | amount | number | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## CopyRequest | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## BulkRequest | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## Schedule | فیلڈ | فیلڈ کی قسم | | --- | --- | | days | object | | timezone | string | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/)[مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/)[مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/)[مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/)[ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**مہم بنانا اور میڈیا شامل کرنا**](/ur/docs/api/create-campaigns/)[اگلا موضوع**مہمات اور اکاؤنٹس کے اعداد**](/ur/docs/api/stats/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # مہمات کے صفحات پڑھنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/pagination/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) خالی cursor سے شروع کریں۔ فلٹر برقرار رکھتے ہوئے meta.next_cursor کو null تک جاری رکھیں۔ فی صفحہ زیادہ سے زیادہ 500 مہمات ملتی ہیں۔ [Markdown](/ur/docs/api/pagination.md) صرف `GET /v1/campaigns` کی فہرست صفحوں میں تقسیم ہوتی ہے۔ اس کے دو طریقے ہیں۔ ## کرسر کے ذریعے صفحہ بندی پہلی درخواست میں `cursor=` خالی بھیجیں۔ پھر `meta.next_cursor` کے ساتھ آگے بڑھیں جب تک اس کی قدر `null` نہ ہو۔ مثال ``` curl -s "https://orbitoads.pro/api/v1/campaigns?limit=500&cursor=" -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "success": true, "data": [ { "ad_id": 90412, "account_id": 53, "…": "…" } ], "meta": { "limit": 500, "cursor": null, "next_cursor": "eyJhIjo1MywiaSI6OTAzMTB9", "hasMore": true } } ``` مثال ``` 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 ``` - کورسر کو غیر معمولی طور پر علاج کریں۔ یہ صرف اسی فلٹر کے ساتھ درست ہے. - آرڈر مقرر کیا جاتا ہے (کابینٹ، پھر تازہ ترین `ad_id` سب سے پہلے)، لہذا صفحات کو اس وقت تک مستحکم رہتا ہے جب کمپنیاں شامل کی جاتی ہیں. - کوئی اوپر حد نہیں - یہ ہے کہ آپ 100،000 کمپنیاں کے ساتھ ایک کابینہ پڑھتے ہیں. - `bot_username`، `promote_domain` اور `type` فلٹرز ہمیشہ کورسر موڈ کا استعمال کرتے ہیں. - کورسور موڈ کچھ بھاری میدانوں کو چھوڑ دیتا ہے (مقاصد، میڈیا، آخری عمل کا مقصد) ایک کمپنیاں کے مکمل ریکارڈ کے لئے [`GET /v1/campaigns/{ad_id}`](/ur/docs/api/campaigns/#doc-note-get-one-campaign) کا استعمال کریں. ## چھوٹے اکاؤنٹس کے لیے آفسیٹ صفحہ بندی `cursor` کے بغیر، `limit` اور `offset` کے ساتھ انتہائی نقطہ صفحات اور ترتیب دے سکتے ہیں ( `sortBy`، `sortOrder` ). یہ زیادہ سے زیادہ **500 کمپنیاں ہر اشتہارات کے اکاؤنٹ پر** پر پڑھتا ہے : اس سے پہلے کہ `meta.truncated` `true` اور `meta.next_step` آپ کو کورسر موڈ میں منتقل کرنے کے لئے بتاتا ہے. مثال ``` "meta": { "total": 1240, "limit": 100, "offset": 0, "hasMore": true, "truncated": true, "next_step": "Use ?cursor= for full traversal beyond 500 campaigns per cabinet" } ``` ## صفحے کا حجم `limit` کی حد فی صفحہ 1–500 نتائج ہے۔ طے شدہ قدر 100 ہے۔ ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ مثال · 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' ``` مثال · 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' ``` ## عملی نفاذ کے نوٹس ## بڑی فہرست پڑھنا GET /api/v1/campaigns میں cursor= اور فلٹر دیں۔ اگلے صفحے پر وہی فلٹر اور بلا تبدیلی meta.next_cursor دیں۔ null پر رکیں۔ limit 1–500، طے شدہ 100 ہے۔ ## ترتیب اور آف سیٹ حد کرسر اکاؤنٹ اور گھٹتے ad_id کے مطابق ترتیب دیتا ہے۔ bot_username، promote_domain اور type یہ موڈ چنتے ہیں۔ آف سیٹ میں sortBy، sortOrder اور فی اکاؤنٹ 500 مہمیں ہیں۔ meta.truncated پر کرسر لیں۔ ## کارروائیاں اور فیلڈز GET /api/v1/campaigns cursor meta.next_cursor limit offset - GET /api/v1/campaigns - cursor - meta.next_cursor - limit - offset ## درخواست کی مثال GET /api/v1/campaigns?limit=500&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · مہمات کے صفحات پڑھنا | فیلڈ | دستاویزی قدر | | --- | --- | | limit | 1 … 500 | | limit = | 100 | | cursor | string | | meta.next_cursor | string \| null | | sortBy = | date | | sortOrder = | DESC | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/pagination/) ## CampaignListItem | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/)[درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/)[ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/)[قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**قطار میں کارروائی کی نگرانی**](/ur/docs/api/tasks/)[اگلا موضوع**دستیاب اشتہاری اکاؤنٹس**](/ur/docs/api/accounts/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # درخواست اور واقعے کی حدود [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/rate-limits/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) ہر کلید کے لیے پڑھنے، لکھنے اور آنے والے واقعات کی الگ حد ہے۔ فی منٹ 60 ریڈ اور 30 رائٹ اور فی سیکنڈ 20 تبدیلیاں درج ہیں۔ اکاؤنٹ کی قطار پر بھی حد ہے۔ [Markdown](/ur/docs/api/rate-limits.md) ہر کلید میں پڑھنے، لکھنے اور کنورژنز بھیجنے کے الگ کوٹے ہیں۔ اعدادوشمار بار بار پڑھنے سے مہم روکنے کی گنجائش متاثر نہیں ہوتی۔ ٹریکر سے بہت سے ایونٹس ایک ساتھ آئیں تب بھی باقی دونوں کوٹے بچتے ہیں۔ | بجٹ | قبول کرنے کے لئے | محدودیت | | --- | --- | --- | | **پڑھنا** | ہر ایک `GET` | ایک منٹ میں 60 درخواستیں | | **لکھا ہے** | ہر `POST`، `PATCH`، `DELETE` میں تبدیل کے علاوہ | ایک منٹ میں 30 درخواستیں | | **تبدیل کرنے کے لئے** | `POST /v1/postback`, `GET /v1/ingest/{token}` | 20 واقعات فی سیکنڈ، 1000 تک دھماکے | کوٹا مسلسل بھرتا رہتا ہے۔ مختصر وقفے میں پورے منٹ کی دستیاب حد استعمال ہو سکتی ہے۔ مہمات، اعدادوشمار اور مجموعے ہم وقت کرنے میں عموماً 3–4 ریڈ درخواستیں لگتی ہیں۔ ایک مخصوص انضمام کے لئے مزید کی ضرورت ہے؟ [@orbitoads](https://t.me/orbitoads) سے پوچھیں — حدوں کو کلید پر اٹھایا جا سکتا ہے. ## HTTP ہیڈرز ہر جواب کے ہیڈرز موجودہ حد اور باقی کوٹا بتاتے ہیں۔ مثال ``` 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 ``` ## کم درخواستوں میں زیادہ کام - **پینٹنگ کے بجائے پینٹ** 300 سے زائد کمپنیاں ایک ہی ہیں `POST /v1/campaigns/bulk`300 سے زائد پائپنگ کال نہیں دیکھیں [کمپنیاں کا انتظام](/ur/docs/api/manage-campaigns/#doc-note-bulk). - **بٹکوئن میں پیدا کریں** `POST /v1/campaigns` 100 کمپنیاں تک لے جاتا ہے. - **Webhooks کے بجائے پوچھیں.** حالات میں تبدیلیاں وہ وقت آتے ہیں جب وہ ہوتے ہیں؛ گھڑی کے اعداد و شمار خود آتے ہیں۔ دیکھیں [Webhooks کے](/ur/docs/api/webhooks/) . - **بٹچ تبدیل کریں** `POST /v1/postback` ایک درخواست پر 1000 تک واقعات قبول کرتا ہے (ہر واقعہ اب بھی واقعات کے بجٹ کے مقابلے میں شمار کرتا ہے - بٹنگ روڈ ٹریڈز کو بچاتا ہے، کیوٹ نہیں). ## دیگر حدود | کیا ہے | محدودیت | | --- | --- | | کاروباری اداروں کی طرف سے کام کرنے یا چلانے کا طریقہ | 5 تخلیق + 5 دیگر آپریشنز (کپی، بڑے پیمانے پر). 6th واپس آتا ہے `429 QUEUE_FULL` . | | درخواست پر تخلیق کی کمپنیاں | 100 | | کپی کی درخواست کے مطابق | 100 | | بڑے پیمانے پر درخواست پر کمپنیاں | 1,000 | | اپ لوڈ کردہ فائل | 10 MB | | صفحہ سائز کے لئے `GET /v1/campaigns` | 500 | ## دوبارہ کوشش سے پہلے انتظار 429 کے بعد `Retry-After` میں درج سیکنڈ تک انتظار کریں۔ خودکار عمل میں تھوڑی بے ترتیب تاخیر رکھیں تاکہ تمام ورکر ایک ساتھ دوبارہ کوشش نہ کریں۔ مثال ``` 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); } ``` مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## عملی نفاذ کے نوٹس ## فی کلید الگ کوٹے فی کلید 60 ریڈ/منٹ اور 30 رائٹ/منٹ ہیں۔ کنورژن کے لیے 20 ایونٹس/سیکنڈ اور برسٹ 1,000 تک ہے۔ بیچ کا ہر ایونٹ گنا جاتا ہے۔ X-RateLimit-Limit، X-RateLimit-Remaining اور X-RateLimit-Reset دیکھیں۔ ## قطار اور دوبارہ کوشش فی اکاؤنٹ پانچ بنانے اور پانچ دیگر کام قطار یا عمل میں ہو سکتے ہیں۔ ہر قسم کا ایک کام بیک وقت چلتا ہے۔ 429 پر Retry-After سیکنڈ رکیں۔ ## کارروائیاں اور فیلڈز 60 GET / min 30 writes / min 20 conversions / s Retry-After 429 - 60 GET / min - 30 writes / min - 20 conversions / s - Retry-After - 429 ## درخواست کی مثال GET /api/v1/account/info HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## رپورٹ کے پیمانے API ایک تخلیقی درخواست میں 100 مہمات، ایک نقل درخواست میں 100 نقول اور ایک بلک کارروائی میں 1,000 موجودہ مہمات قبول کرتی ہے۔ 202 جواب قطار میں کام کی شناخت دیتا ہے۔ اگلا گروپ بدلنے سے پہلے مکمل کام کے failed اور errors دیکھیں۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · درخواست اور واقعے کی حدود | فیلڈ | دستاویزی قدر | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/rate-limits/) ## متعلقہ مطالعہ [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/)[ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/)[قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/)[مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**API کی خرابیوں کو سمجھنا**](/ur/docs/api/errors/)[اگلا موضوع**ایک ہی کارروائی کی دوبارہ کوشش**](/ur/docs/api/idempotency/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # مہمات اور اکاؤنٹس کے اعداد [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/stats/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) الگ مہمات کے اعداد، اکاؤنٹ کے مجموعے یا کرنسی کی درجہ بندی منتخب کریں۔ متحرک دورانیہ یا تاریخیں اور اوقات طے کریں۔ برآمد شدہ اعداد کے ساتھ مدت بھی درج کریں۔ [Markdown](/ur/docs/api/stats.md) اعدادوشمار کے تین طریقے ہیں جن کی تفصیل مختلف ہے۔ ہر طریقہ کلید کی رسائی والے تمام اکاؤنٹس کا ڈیٹا الگ الگ واپس دیتا ہے۔ | انتہائی نقطہ | واپس آتے ہیں | | --- | --- | | `GET /v1/stats` | ہر مرحلے کے لئے کمپنیاں کی تعداد | | `GET /v1/stats/total` | ہر کابینہ کی مجموعی پلس چارٹ پوائنٹس | | `GET /v1/stats/analytics` | مجموعی طور پر تقسیم کرنسی، چارٹ، سب سے اوپر کی کمپنیاں | ایک مہم کی مخصوص مدت کی تاریخ کے لیے `GET /v1/campaigns/{ad_id}/history` استعمال کریں۔ [`GET /v1/campaigns/{ad_id}/history`](/ur/docs/api/campaigns/#doc-note-get-v1campaignsad_idhistory) ## رپورٹ کے ادوار | `period` | ونڈو | | --- | --- | | `1d` | آخری 24 گھنٹے (معیاری طور پر `/stats` اور `/stats/total` کے لئے) | | `7d` | 7 دنوں میں | | `30d` | آخری 30 دن (معیاری طور پر `/stats/analytics` کے لئے) | | `all` | ہر وقت | | `custom` | `startDate` اور `endDate` ( `YYYY-MM-DD` ) ، اختیاری طور پر `startHour` اور `endHour` (0-23) | کسی بھی `h` یا `d` یہ بھی کام کرتا ہے (`6h`, `14d`(ایک دن 365 تک) ایک غیر شناختی قیمت آخری 24 گھنٹوں کے طور پر پڑھائی جاتی ہے - یہ کوئی غلطی واپس نہیں کرتا، لہذا آپ کے ٹکڑے چیک کریں. ہر وقت ہے UTC. مثال ``` # 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 مندرجہ ذیل فہرستوں کی فہرست: `data[account_id][ad_id]` مثال ``` { "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" } } ``` کلید لائن ہیں؛ یہاں قیمتیں **اعداد و شمار** ہیں (کمپنی کے اشیاء کے برعکس)۔ `cpa` ایک عمل پر خرچ کیا جاتا ہے؛ `ctr` ایک فیصد ہے. ## GET /v1/stats/total ڈش بورڈ کے اختتام: مجموعات اور ہر کابینہ کے لئے ایک نقشہ. مثال ``` { "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` پوائنٹس فی گھنٹہ یا روزانہ وقت پر منحصر ہے. `cabinetType` کرنسی دیتا ہے ( `euro` → EUR ، `ton` → TON ، `stars` → ستارے). ## GET /v1/stats/analytics `/stats/total` کے طور پر، اس کے علاوہ کرنسی اور سب سے اوپر کی مہموں کی طرف سے تقسیم خرچ. مثال ``` { "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" } } ``` ## نوٹس - ریاستیں Telegram کے اپنے اعداد و شمار کی پیروی کرتے ہیں، Orbito Ads کو منظم طور پر سنکنڈ کیا جاتا ہے؛ تازہ ترین گھنٹہ سنکنڈ آنے کے بعد ملتا ہے. - کبھی بھی مختلف کرنسیوں کے ساتھ کاروباری اداروں میں `spent` اضافہ نہ کریں. - آپ اپنے آپ کو ٹرانسمیشن (لوڈ، ڈپازٹ، فروخت) کے لئے دیکھیں [تبدیل کرنے کے](/ur/docs/api/conversions/) - Telegram ’s `actions` شامل ہیں اور بٹ شروع ہوتا ہے، آپ کے تبدیل نہیں. - ہر چند منٹ میں [گھڑی کے لئے Webhook](/ur/docs/api/webhooks/#doc-heading-hourly_digest) کے مقابلے میں سروے کے اعداد و شمار کو ترجیح دیتا ہے. ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## GET `/api/v1/stats` اکاؤنٹ اور مہم کے مطابق مدت کے اعداد پڑھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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` منتخب مدت کے اکاؤنٹ مجموعے اور چارٹ نقاط پڑھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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` کرنسی کی تقسیم، چارٹ اور مہموں کی درجہ بندی حاصل کریں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `period` | query | `string` | — | | `startDate` | query | `string` | — | | `endDate` | query | `string` | — | | `startHour` | query | `integer` | — | | `endHour` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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" } } ``` ## عملی نفاذ کے نوٹس ## بیلنس اور کرنسیاں ہر اکاؤنٹ میں currency، balance_updated_at اور min_budget دیکھیں۔ مہم میں رقم اور شرح اعشاری متن یا null ہو سکتی ہے۔ رپورٹ کا مجموعہ عدد ہے۔ EUR، TON اور Stars الگ رکھیں۔ ## مدت اور UTC گھنٹے period میں 1d، 7d، 30d، all، custom یا 365 دن تک Nh/Nd دیں۔ custom میں startDate، endDate ضروری اور startHour/endHour 0–23 UTC اختیاری ہیں۔ stats اور total کا طے شدہ 1d، analytics کا 30d ہے۔ ## عمل کی تشریح actions میں چینل کی رکنیت یا بوٹ شروع ہونے جیسے پلیٹ فارم اعمال ہیں۔ ٹریکر کی لیڈز، خرید اور آمدنی کے لیے conversions دیکھیں۔ /stats/analytics فی اکاؤنٹ چارٹ، مجموعے اور topCampaigns دیتا ہے۔ ## کارروائیاں اور فیلڈز 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 ## درخواست کی مثال GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · مہمات اور اکاؤنٹس کے اعداد | فیلڈ | دستاویزی قدر | | --- | --- | | period | 1d, 7d, 30d, all, custom | | startDate, endDate | YYYY-MM-DD | | startHour, endHour | 0 … 23 | | /stats | 1d | | /stats/analytics | 30d | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/stats/) ## StatsNumbers | فیلڈ | فیلڈ کی قسم | | --- | --- | | views | number | | clicks | number | | actions | number | | spent | number | | ctr | number | | cpm | number | | cpa | number | | group_id | integer \| null | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/)[مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/)[مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/)[موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/)[ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) حوالے کی تازہ کاری 2026-10-26 [پچھلا موضوع**موجودہ مہمات بدلنا**](/ur/docs/api/manage-campaigns/)[اگلا موضوع**ٹارگٹنگ لغات اور گروپس**](/ur/docs/api/targeting/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # ٹارگٹنگ لغات اور گروپس [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/targeting/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) درخواست بنانے سے پہلے ملک، زبان اور موضوع کے کوڈز لیں۔ محفوظ فولڈرز کے لیے گروپس حاصل کریں۔ لغات کو کیش کریں اور اختیارات بدلنے پر تازہ کریں۔ [Markdown](/ur/docs/api/targeting.md) ## GET /v1/targeting کوڈ [`POST /v1/campaigns`](/ur/docs/api/create-campaigns/) قبول کرتا ہے. فہرستیں وہ ہیں جو Orbito Ads تخلیق فارم کا استعمال کرتے ہیں، لہذا یہاں سے ایک کوڈ کبھی بھی نامعلوم کے طور پر انکار نہیں کیا جاتا ہے. مثال ``` curl -s https://orbitoads.pro/api/v1/targeting -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "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" ] } } ``` | فہرست | استعمال میں | نوٹیں | | --- | --- | --- | | `countries[].code` | `countries` | ISO 3166 دو حروف کوڈ، اس کے علاوہ Telegram ’ کے اپنے `FT` (غیر نامی اعداد و شمار). | | `languages[].code` | `languages` | Telegram ’ کی زبان کی کلیدیں — e.g . `pt-br` اور `pt-pt` ، `pt` نہیں . | | `topics[].id` | `topics`, `exclude_topics` | اعداد و شمار: IDs مسلسل نہیں ہیں. | | `buttons` | `button` | صرف ان کمرے میں جن کے `features.ad_button` `true` ہے. | یہ فہرستیں کم بدلتی ہیں۔ ایک بار حاصل کرکے ایک دن کے لیے کیش میں رکھیں۔ ## ٹارگٹنگ گروپس نئے مہموں یا کاپیوں کو `group_id` ( موجودہ) یا `new_group_name` (خالق، یا دوبارہ استعمال کیا جاتا ہے اگر نام موجود ہے) کے ساتھ ایک میں ڈال دیں. ### GET /v1 / گروپوں مثال ``` curl -s "https://orbitoads.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ORBITO_API_KEY" ``` مثال ``` { "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] } ``` `account_id` کے بغیر آپ کو ہر کابینہ کے گروپوں کو کلید تک پہنچ جاتا ہے. ایک گروپ ایک کابینہ سے تعلق رکھتا ہے — `group_id` سے دوسرے کابینہ سے انکار کیا جاتا ہے. ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## GET `/api/v1/targeting` معاون ملک، زبان، موضوع اور بٹن کی قدریں پڑھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `X-API-Key` | header | `string` | ہاں | 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` مہموں کے گروپ دیکھیں، چاہیں تو ایک اکاؤنٹ تک محدود رکھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `account_id` | query | `integer` | — | | `X-API-Key` | header | `string` | ہاں | 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" } ] } ``` ## عملی نفاذ کے نوٹس ## فارم کی جائز قدریں لوٹائے گئے ملک و زبان کوڈ، عددی موضوع IDs اور بٹن قدریں دیں۔ pt-br اور pt-pt الگ علاقائی کوڈ ہیں۔ button کے لیے اکاؤنٹ سپورٹ ضروری ہے۔ ## گروپ کی ملکیت ہر گروپ ایک اکاؤنٹ کا ہے۔ بناتے یا نقل کرتے وقت اسی کا group_id یا new_group_name دیں۔ اسی نام کا موجودہ گروپ دوبارہ استعمال ہو سکتا ہے۔ ## کارروائیاں اور فیلڈز GET /api/v1/targeting GET /api/v1/groups - GET /api/v1/targeting - GET /api/v1/groups ## درخواست کی مثال GET /api/v1/groups?account_id={account_id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## سامعین کے تجربے کی ترتیبات مہم کے اسکیما میں ہدف بندی کے چار طریقے ہیں۔ چینل channels، بوٹ کے نام bots اور تلاش کے الفاظ search_keywords میں جاتے ہیں۔ ملک، زبان اور موضوع کے فلٹر صارفین کے گروپ کی تعریف کرتے ہیں۔ ٹیسٹ سے پہلے اکاؤنٹ کی سہولتیں دیکھیں۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | GET | /api/v1/targeting | — | — | 200, 401 | | GET | /api/v1/groups | account_id | — | 200, 401, 404 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · ٹارگٹنگ لغات اور گروپس | فیلڈ | دستاویزی قدر | | --- | --- | | countries[] | code, name | | languages[] | code, name | | topics[] | id, name | | buttons[] | string | | Group | id, account_id, name, color | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/targeting/) ## Targeting | فیلڈ | فیلڈ کی قسم | | --- | --- | | countries | array · [object] | | languages | array · [object] | | topics | array · [object] | | buttons | array · [string] | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## Group | فیلڈ | فیلڈ کی قسم | | --- | --- | | id | integer | | account_id | integer | | name | string | | color | string | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/)[مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/)[مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/)[موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/)[مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**مہمات اور اکاؤنٹس کے اعداد**](/ur/docs/api/stats/)[اگلا موضوع**مہم کے واقعات وصول کرنا**](/ur/docs/api/webhooks/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # قطار میں کارروائی کی نگرانی [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/tasks/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) تخلیق، نقل اور بیچ تبدیلی پر 202 اور ٹاسک ID آسکتا ہے۔ پیش رفت، مجموعہ اور الگ ناکامیاں دیکھیں۔ متاثرہ مہمات کی آخری شناختیں محفوظ کریں۔ [Markdown](/ur/docs/api/tasks.md) کچھ آپریشنز ایک بار ٹیلی گرام سے بات کرتے ہیں، لہذا وہ ایک سے زیادہ وقت لے سکتے ہیں HTTP درخواست کا انتظار کرنا چاہئے یہ رجوع `202 Accepted` کے ساتھ A **کام** آخر کے نتائج کے بجائے: - `POST /v1/campaigns` - پیدا کرنے کے لئے - `POST /v1/campaigns/{ad_id}/copy` - کاپی - `POST /v1/campaigns/bulk` — استراحت، تجدید، بجٹ، CPM یا بہت سے حذف کریں انفرادی مہم کی تبدیلیوں ( `PATCH` ، وقفہ، دوبارہ، بجٹ، حذف) براہ راست جواب — کوئی کام نہیں. ## HTTP 202 جواب مثال ``` HTTP/1.1 202 Accepted Location: /api/v1/tasks/81234 Retry-After: 2 ``` مثال ``` { "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} مثال ``` curl -s https://orbitoads.pro/api/v1/tasks/81234 -H "X-API-Key: $ORBITO_API_KEY" ``` `status` ختم ہونے تک اس پر کلک کریں۔ اگرچہ ایک کام `pending` یا `running` ہے تو جواب `Retry-After: 2` لے جاتا ہے۔ سوالات کے درمیان اتنی دیر انتظار کریں۔ اسی مالک کی کسی بھی کلید کو یہ کام پڑھ سکتے ہیں۔ | میدان | معنی | | --- | --- | | `type` | `create` ، `copy` ، `status` (بولک پاؤڈ / ریسوم) ، `budget` ، `cpm` ، `delete` | | `status` | دیکھیں نیچے | | `progress` / `total` | مندرجہ ذیل صفحات پر کل / مجموعی طور پر | | `succeeded` / `failed` | ایک بار جانا جاتا ہے | | `ad_ids` | کام کی کمپنیاں جو کام پیدا کیا گیا ہے (خالق، کپی) یا تبدیل کیا گیا (بولک) | | `errors[]` | 50 تک ناکامیوں: `{ ad_id, index, error }` - `index` آپ کے `campaigns` رینج میں پوزیشن ہے تخلیق کے لئے | | `paused_reason` | کیوں ایک کام انتظار کرنے سے روک دیا، e.g . کابینہ توازن سے باہر نکل گیا | | `error` | کیوں کل کام ناکام ہو گیا | ### حالات | حالات | معنی | آخر میں؟ | | --- | --- | --- | | `pending` | Queued - کابینہ ایک ہی وقت میں ایک تخلیق اور ایک دوسرے عمل چلتا ہے | نہیں | | `running` | آگے بڑھنے میں | نہیں | | `paused` | انتظار کرنے کے لئے روک دیا - عام طور پر کابینہ کی توازن وسط راستے سے باہر چلا گیا. | نہیں | | `completed` | چیک کریں `failed` اور `errors` — ایک مکمل کام انفرادی ناکامیوں کو شامل کر سکتے ہیں | جی ہاں | | `failed` | کام کی مجموعی طور پر ناکام ہو گیا — دیکھیں `error` | جی ہاں | | `cancelled` | پینل سے منسوخ | جی ہاں | ## مہم بنانے کا عمل کیسے مکمل ہوتا ہے - نئے مہم IDs `ad_ids` میں ظاہر ہوتا ہے جب کام مکمل ہو جاتا ہے (وہ آخری مہم کی تخلیق کے بعد کابینہ کو سنکنک کرکے پایا جاتا ہے). - اگر **سب سے پہلے** کی کمپنیاں ناکام ہوجاتی ہیں، تو یہ کام 100 بار ایک ہی غلطی کو دوبارہ کرنے کے بجائے وہاں روکتا ہے. - اگر Telegram کسی مہم کے کسی بھی چینل یا بٹ کو حل نہیں کرسکتا، تو یہ مہم `No targets found: …` ان کی فہرست کے ساتھ ناکام ہوسکتی ہے. - ٹیلی گرام ہر نئے اشتہارات کا جائزہ لیتا ہے. ایک تخلیق کی کمپنیاں عام طور پر شروع ہوتی ہیں `In Review`• A [Webhook کے مترادف](/ur/docs/api/webhooks/) یہ آپ کو بتاتا ہے کہ جب یہ تبدیلی آئے گی. ## حالت معلوم کرنے کا لوپ مثال ``` 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)); } } ``` مثال ``` 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 کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ ## GET `/api/v1/tasks/{id}` کام کی پیش رفت، اشتہار IDs اور انفرادی ناکامیاں پڑھیں۔ | پیرامیٹر | جگہ | فارمیٹ | ضروری | | --- | --- | --- | --- | | `id` | path | `integer` | ہاں | | `X-API-Key` | header | `string` | ہاں | 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" } } ``` ## عملی نفاذ کے نوٹس ## قبولیت اور تکمیل بنانے، نقل اور اجتماعی درخواستوں پر HTTP 202 اور کام کا id ملتا ہے۔ Retry-After کے مطابق GET /api/v1/tasks/{id} دیکھیں۔ completed پر بھی failed اور errors پڑھیں۔ ## کام کے نتیجے pending، running، paused درمیانی، جبکہ completed، failed، cancelled آخری حالتیں ہیں۔ progress، total، ad_ids اور 50 تک انفرادی خرابیاں دیکھیں۔ paused_reason پینل میں حل ہونے والی بجٹ کی کمی بتا سکتا ہے۔ ## کارروائیاں اور فیلڈز 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 ## درخواست کی مثال GET /api/v1/tasks/{id} HTTP/1.1 Host: orbitoads.pro X-API-Key: {key} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## رپورٹ کے پیمانے API ایک تخلیقی درخواست میں 100 مہمات، ایک نقل درخواست میں 100 نقول اور ایک بلک کارروائی میں 1,000 موجودہ مہمات قبول کرتی ہے۔ 202 جواب قطار میں کام کی شناخت دیتا ہے۔ اگلا گروپ بدلنے سے پہلے مکمل کام کے failed اور errors دیکھیں۔ ## پروٹوکول کا حوالہ | میتھڈ | راستہ | پیرامیٹرز | درخواست کا مواد | جوابی کوڈ | | --- | --- | --- | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## اسکیما فیلڈ اور حدود · قطار میں کارروائی کی نگرانی | فیلڈ | دستاویزی قدر | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/tasks/) ## Task | فیلڈ | فیلڈ کی قسم | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/openapi.yaml) ## متعلقہ مطالعہ [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/)[درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/)[ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/)[مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**ایک ہی کارروائی کی دوبارہ کوشش**](/ur/docs/api/idempotency/)[اگلا موضوع**مہمات کے صفحات پڑھنا**](/ur/docs/api/pagination/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json) --- # مہم کے واقعات وصول کرنا [Orbito Ads · اردو · HTML](https://orbitoads.pro/ur/docs/api/webhooks/) ماخذ کی جانچ · 2026-11-27 ### دستاویزات کے موضوعات [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [تمام دستاویزات](/ur/docs/) ابتدائی رہنمائی - [API کا ابتدائی تعارف](/ur/docs/api/) - [کلیدیں اور اکاؤنٹ کی اجازتیں](/ur/docs/api/authentication/) - [AI اسسٹنٹ کے لیے API حوالہ](/ur/docs/api/ai-assistants/) بنیادی تصورات - [API کی خرابیوں کو سمجھنا](/ur/docs/api/errors/) - [درخواست اور واقعے کی حدود](/ur/docs/api/rate-limits/) - [ایک ہی کارروائی کی دوبارہ کوشش](/ur/docs/api/idempotency/) - [قطار میں کارروائی کی نگرانی](/ur/docs/api/tasks/) - [مہمات کے صفحات پڑھنا](/ur/docs/api/pagination/) API کا حوالہ - [دستیاب اشتہاری اکاؤنٹس](/ur/docs/api/accounts/) - [مہم کی تفصیل دیکھنا](/ur/docs/api/campaigns/) - [مہم بنانا اور میڈیا شامل کرنا](/ur/docs/api/create-campaigns/) - [موجودہ مہمات بدلنا](/ur/docs/api/manage-campaigns/) - [مہمات اور اکاؤنٹس کے اعداد](/ur/docs/api/stats/) - [ٹارگٹنگ لغات اور گروپس](/ur/docs/api/targeting/) انضمام - [مہم کے واقعات وصول کرنا](/ur/docs/api/webhooks/) - [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/) - [API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) فائلیں اور اسکیما - [OpenAPI · YAML](/docs/api/openapi.yaml) - [OpenAPI · JSON](/docs/api/openapi.json) - [llms.txt](/ur/docs/llms.txt) - [llms-full.txt](/ur/docs/llms-full.txt) [Orbito Ads](/ur/) [دستاویزات](/ur/docs/) [API](/ur/docs/api/) حوالے میں status_change، hourly_digest اور آزمائشی ping شامل ہیں۔ HTTPS پر وصول کریں، اصل متن سے دستخط کی تصدیق کریں اور دہرائے گئے واقعات الگ کریں۔ [Markdown](/ur/docs/api/webhooks.md) API کو بار بار چیک کرنے کے بجائے «API اور ویب ہکس» میں کلید کے کارڈ پر Postback URL درج کریں۔ Orbito Ads اس کلید کی رسائی والے اکاؤنٹس کے ایونٹس POST سے بھیجتا ہے۔ ہر ترسیل پر ویب ہک کے الگ سیکرٹ سے دستخط کیے جاتے ہیں۔ ## ایونٹس | واقعہ | جب | | --- | --- | | `status_change` | ایک مہم کی حیثیت تبدیل کر دیا گیا ہے (مراجعہ → فعال، فعال → روک دیا ...) ہر سینک کے بعد بھیج دیا گیا ہے، اور فوری طور پر جب مہموں کو پینل میں یا API کے ذریعے منتقل کیا جاتا ہے. | | `hourly_digest` | 5 منٹ ہر گھنٹہ سے گزر جاتے ہیں، صرف بند ہونے والے گھنٹوں کی تعداد کے ساتھ - ایک POST فی کابینہ. | | `ping` | جب آپ **ٹیسٹ** پر کلک کریں. | ### status_change مثال ``` { "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 مثال ``` { "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` میں سب سے زیادہ خرچ والی 200 تک مہمات آتی ہیں۔ مزید مہمات بدلی ہوں تو `truncated` بتاتا ہے کہ کتنی فہرست سے باہر ہیں۔ `totals` میں سب مہمات شامل ہیں۔ رقم اکاؤنٹ کی کرنسی میں ہے۔ ## HTTP ہیڈرز مثال ``` 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= ``` ## دستخط کی تصدیق `X-Orbito-Timestamp`، ایک نقطہ اور درخواست کے اصل بائٹس ملائیں۔ کلید بناتے یا ویب ہُک سیکرٹ تبدیل کرتے وقت دکھائے گئے سیکرٹ سے HMAC-SHA256 نکالیں۔ JSON پڑھنے سے پہلے دستخط جانچیں۔ دوبارہ سیریلائز کرنے سے بائٹس بدل جاتے ہیں۔ پانچ منٹ سے پرانی درخواست رد کریں۔ ### Node.js (ایکسپریس) مثال ``` 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 }); ``` ### پائٹن (فلاش) مثال ``` 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 ``` ## ایونٹ کی ترسیل - آپ کا انتہائی نقطہ نظر عوامی ہونا چاہئے **HTTPS** . `http://`مقامی اور ذاتی ایڈریس سے انکار کیا جاتا ہے. - **10 سیکنڈ** کے اندر اندر کسی `2xx` کے ساتھ جواب دیں ۔ جواب دینے کے بعد آہستہ آہستے کام کریں۔ - ایک نیٹ ورک یا ایک `5xx` ہم رجوع کریں **ایک بار** 750 میٹر کے بعد، اسی طرح کے ساتھ `X-Orbito-Delivery`. A کے `4xx` نہیں نکال دیا گیا - رجوع مکرر نہیں کیا جاتا ہے. - پینل میں کلید کارڈ آخری ترسیل کا وقت، حالات اور غلطی دکھاتا ہے. ## ویب ہُک میں شامل اکاؤنٹس کلید کو صرف ان اکاؤنٹس کے ایونٹس ملتے ہیں جن تک اسے رسائی ہے۔ ایجنسی کے رکن کو اس کے ساتھ شیئر کیے گئے اکاؤنٹس کے ایونٹس ملتے ہیں۔ رسائی ختم ہوتے ہی ترسیل بند ہو جاتی ہے۔ [کلید اور رسائی](/ur/docs/api/authentication/#doc-note-which-cabinets-a-key-reaches) ## آزمائشی ایونٹ بھیجنا کلید کے کارڈ میں «ٹیسٹ» دبائیں۔ ایک `ping` ایونٹ ملے گا جس پر اصل ایونٹس کی طرح دستخط ہوں گے۔ مثال ``` { "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 } ``` ## API کا حوالہ مکمل اشتہاری API کے لیے اس ورک اسپیس کی مخصوص فراہم کنندہ کلید درکار ہے۔ کلائنٹ درخواست میں اپنی Orbito API کلید دیں۔ اکاؤنٹ آرڈر، فراہمی اور بیرونی بلنگ الگ عمل ہیں۔ مثال · 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" } ] } ``` ## عملی نفاذ کے نوٹس ## ایونٹس اور کال بیک ترتیب فراہم کنندہ کلید میں عوامی HTTPS کال بیک دیں۔ status_change حالت کی تبدیلی، hourly_digest منٹ 05 پر فعال اکاؤنٹ کے گھنٹے کی رپورٹ اور ping ترسیل کا ٹیسٹ ہے۔ ترتیب یہاں کے 22 HTTP اعمال سے الگ ہے۔ ## دستخط اور دوبارہ ترسیل وقت کی مہر، ایک نقطے اور اصل بائٹس پر webhook راز سے HMAC-SHA256 تصدیق کریں۔ پانچ منٹ سے پرانی مہر رد کریں۔ دس سیکنڈ میں 2xx دیں۔ نیٹ ورک خرابی یا 5xx پر 750 ms بعد اسی id سے ایک کوشش ہوتی ہے۔ ## کارروائیاں اور فیلڈز 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} ## اسکیما فیلڈ اور حدود یہ جدول عوامی v1 معاہدے کے مطابق ہے۔ فیلڈ اور پیرامیٹر کے نام حروف کے حجم کا فرق رکھتے ہیں۔ ہر کارروائی کے HTTP کوڈ کامیابی، ان پٹ کی جانچ اور رسائی کی پڑتال بتاتے ہیں۔ منسلک تفصیل مکمل درخواست اور جواب کی ساخت دکھاتی ہے۔ ## وقت کی مدت · hourly_digest hourly_digest ویب ہک ختم ہونے والے گھنٹے کا احاطہ کرتا ہے اور ٹریفک والے ہر اکاؤنٹ کے لیے اگلے گھنٹے کے پانچویں منٹ پر بھیجا جاتا ہے۔ مدت، اکاؤنٹ آئی ڈی اور ڈیلیوری آئی ڈی محفوظ کریں۔ واقعے کا وقت اور سرور کو وصولی کا وقت الگ رکھیں۔ ## اسکیما فیلڈ اور حدود · مہم کے واقعات وصول کرنا | فیلڈ | دستاویزی قدر | | --- | --- | | 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 | ماخذ · [اعداد کا ماخذ](https://adsly.pro/docs/api/webhooks/) ## متعلقہ مطالعہ [تصدیق شدہ تبدیلیاں بھیجنا](/ur/docs/api/conversions/)[API ورژن اور تبدیلیاں](/ur/docs/api/changelog/) حوالے کی تازہ کاری 2026-10-08 [پچھلا موضوع**ٹارگٹنگ لغات اور گروپس**](/ur/docs/api/targeting/)[اگلا موضوع**تصدیق شدہ تبدیلیاں بھیجنا**](/ur/docs/api/conversions/) ## ماخذ اور ڈیٹا - [openapi.yaml](https://orbitoads.pro/docs/api/openapi.yaml) - [openapi.json](https://orbitoads.pro/docs/api/openapi.json)