---
title: "平台发布选项"
method: GET
path: "/api/v2/channels/platforms/{platform}/publish-options"
tags: ["渠道管理/平台"]
---

# 平台发布选项

`GET /api/v2/channels/platforms/{platform}/publish-options`

## Request

- Base URL: `https://aitoearn.cn`
- URL: `https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/aitoearn/apis/aitoearn-api/docs/api/v2/channels/platforms/:platform/publish-options/get.ts> (a function with typed inputs; its response is checked against the schema)

接口说明：查询指定平台在发布时是否需要平台专属的额外参数，以及这些参数的字段名、取值结构和账号要求。

返回的每个 `data[n]` 表示一个额外参数。常见场景包括 B 站分区 `tid`、YouTube 分类 `categoryId`、Threads 地点 `location_id`、Pinterest Board `boardId`。如果返回空数组，说明该平台当前没有需要通过发布选项接口处理的额外参数。

使用方式：取返回项中的 `field`，放到[「发布选项可选值」](/api-reference/get-api-v2-channels-accounts-account-id-publish-options-field-values)接口路径参数 `field` 中查询可选值；如果后续返回项包含 `filterSchema`，按该 schema 将过滤条件作为查询参数传给「发布选项可选值」接口；如果包含 `createSchema`，可按该 schema 组织请求体后调用[「创建发布选项值」](/api-reference/post-api-v2-channels-accounts-account-id-publish-options-field-values)接口。

## Path parameters

- `platform` 'bilibili' | 'youtube' | 'pinterest' | 'twitter' | 'tiktok' | 'facebook' | 'instagram' | 'threads' | 'linkedin' | 'xhs' | 'wxSph' | 'douyin' | 'KWAI' | 'wxGzh', required: 平台标识。取值来自[「平台列表」](/api-reference/get-api-v2-channels-platforms)接口（`GET /api/v2/channels/platforms`）返回的 `data[n].platform`。

## Response `200`

请求已被服务处理。业务是否成功以响应体 code === 0 为准。

- object
  - `data` object[]: 指定平台当前支持的发布选项列表。返回空数组表示没有额外发布选项。
    - `field` string: 发布选项字段
    - `label` string: 展示名称
    - `description` string: 说明
    - `valueType` 'list' | 'tree': 取值结构
    - `requiresAccount` boolean: 是否需要账号授权
    - `filterSchema` object: 过滤条件 schema
    - `createSchema` object: 创建参数 schema
  - `code` integer: 业务状态码。0 表示成功，非 0 表示业务错误。
  - `message` string: 响应消息。
  - `requestId` string: 请求 ID。
  - `timestamp` integer: 错误响应时间戳，Unix 毫秒。

## Changes

- **2026-11-03** `7cc8f21c4c96`: 7 breaking, 14 info
  - the `path` request parameter `platform` was restricted to a list of enum values
  - the response property `code` became optional for the status `200`
  - the response property `data/items/field` became optional for the status `200`
  - the response property `data/items/label` became optional for the status `200`
  - …17 more

[Operation history](https://skmtc.dev/aitoearn/apis/aitoearn-api/changes/api/v2/channels/platforms/:platform/publish-options/get.md)

---

[API](https://skmtc.dev/aitoearn/apis/aitoearn-api.md) - [All operations](https://skmtc.dev/aitoearn/apis/aitoearn-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aitoearn/apis/aitoearn-api/revisions/7cc8f21c4c96?raw)
