Orbitoads
Browse documentation

Create campaigns

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

POST /v1/campaigns creates campaigns in one cabinet. It needs a key with Manage campaigns, an Idempotency-Key, and returns 202 with a task — 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

FieldRequiredMeaning
titleyesInternal name, shown in the panel.
textyesAd text people see. Telegram’s own length and content rules apply — a refusal comes back in the task’s errors.
promote_urlyesWhat the ad opens: https://t.me/channel, t.me/bot?start=ref, @channel or a website URL.
cpmyesBid 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.
budgetyesMoney moved from the cabinet balance to the campaign: 0, or at least the cabinet’s min_budget (Cabinets). With 0 the ad is created but can’t run until you add budget.
target_typeyeschannels, bots, search or users — see below.
activenofalse creates it switched off. Default true.
daily_budgetnoDaily spending cap.
views_per_usernoHow many times one person can see the ad, 1–4.
medianoImage or video token from POST /v1/media.
picturenotrue shows the promoted channel’s avatar in the ad.
buttonnoButton 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_namenoBrand name shown above a website ad.
schedulenoShow the ad only on chosen weekdays and hours, e.g. weekdays 9:00–18:00. Format: 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) 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 }
FieldMeaning
channels1–100 public channels: @name, name or t.me/name. Required.
languages, topics, exclude_topicsNarrow by channel language and topic (codes).
add_similar_channelsAlso 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"] }
FieldMeaning
countriesISO country codes.
languagesLanguage codes.
topics, exclude_topicsInterests by topic id.
audience_channelsPeople who read these channels.

At least one of these is required. Codes: Targeting codes.

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} 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 tells you when.
  3. Change, fund or pause them with 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

CodeWhen
VALIDATION_ERRORA field is missing, unknown, of the wrong type, or doesn’t belong to this target_type — param says which.
IDEMPOTENCY_KEY_REQUIREDNo Idempotency-Key.
ACCOUNT_ID_REQUIRED / ACCOUNT_NOT_FOUNDSay which cabinet / that cabinet isn’t reachable.
VIEW_ONLY_ACCESSYou have Viewer access to this cabinet.
QUEUE_FULL5 creates already queued in this cabinet.
CABINET_LOCKED, SUBSCRIPTION_REQUIREDThe 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.

ParameterLocationFormatRequired
Idempotency-KeyheaderstringYes
X-API-KeyheaderstringYes
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
APIHTTPMeaning
VALIDATION_ERROR400Inspect the request fields and correct invalid input before retrying.
IDEMPOTENCY_KEY_REQUIRED400Supply the required Idempotency-Key header with the write.
VIEW_ONLY_ACCESS403A Viewer can inspect this ad account. A change requires account-level write access.
QUEUE_FULL429Five create jobs already occupy this account’s queue. Wait for capacity.

POST /api/v1/media

Upload creative media and receive a token tied to the selected account.

ParameterLocationFormatRequired
account_idqueryinteger—
X-API-KeyheaderstringYes
Idempotency-Keyheaderstring—
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

MethodRouteParametersRequest contentResponse codes
POST/api/v1/campaignsIdempotency-Keyapplication/json · CreateSingleRequest | CreateBatchRequest202, 400, 401, 403, 404, 409, 422, 429, 503
POST/api/v1/mediaaccount_idmultipart/form-data · file, account_id200, 400, 401, 403, 413
GET/api/v1/targeting——200, 401
GET/api/v1/tasks/{id}id—200, 400, 401, 404

Source · Data source

Schema fields and limits · Creating campaigns and media

FieldDocumented value
target_typechannels | bots | search | users
campaigns[]1 … 100
active =true
views_per_user1 … 4
budget≥ 0
Idempotency-KeyUUID

Source · Data source

CampaignInput

FieldField type
titlestring
textstring
promote_urlstring
cpmnumber
daily_budgetnumber · 0 … ∞
views_per_userinteger · 1 … 4
mediastring
pictureboolean
buttonsubscribe | view | read | learn_more | download | open | sign_up | buy | order | play | try | leave_request
website_namestring
scheduleSchedule
budgetnumber · 0 … ∞
activeboolean · = true
target_typechannels | bots | search | users
channelsarray · [string] · 1 … 100
botsarray · [string] · 1 … 100
search_keywordsarray · [string] · 1 … 100
countriesarray · [string]
languagesarray · [string]
topicsarray · [integer]
exclude_topicsarray · [integer]
audience_channelsarray · [string]
add_similar_channelsboolean

Source · Data source

CreateBatchRequest

FieldField type
account_idinteger
group_idinteger
new_group_namestring
campaignsarray · [CampaignInput] · 1 … 100

Source · Data source

CreativeFields

FieldField type
titlestring
textstring
promote_urlstring
cpmnumber
daily_budgetnumber · 0 … ∞
views_per_userinteger · 1 … 4
mediastring
pictureboolean
buttonsubscribe | view | read | learn_more | download | open | sign_up | buy | order | play | try | leave_request
website_namestring
scheduleSchedule

Source · Data source

Reference revision

Pro Panel
Pro Panel