# 创建广告活动与上传媒体

[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)
