---
title: "创建发布选项值"
method: POST
path: "/api/v2/channels/accounts/{accountId}/publish-options/{field}/values"
tags: ["渠道管理/账号"]
---

# 创建发布选项值

`POST /api/v2/channels/accounts/{accountId}/publish-options/{field}/values`

## Request

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

接口说明：为某个已授权渠道账号创建平台发布时需要的额外参数值，创建成功后返回可直接用于发布任务的选项 `item`。

本接口不是所有平台和字段都支持。调用前必须先调用[「平台发布选项」](/api-reference/get-api-v2-channels-platforms-platform-publish-options)接口（`GET /api/v2/channels/platforms/{platform}/publish-options`），只有返回项明确包含 `createSchema` 的字段才可以调用本接口；将该返回项的 `field` 放到路径参数，并严格按照 `createSchema` 组织 JSON 请求体。若返回项没有 `createSchema`，请改用[「发布选项可选值」](/api-reference/get-api-v2-channels-accounts-account-id-publish-options-field-values)接口查询并选择已有值。

例如，当前 Bilibili 返回的 `tid` 仅支持查询分区，不支持通过本接口创建；使用 Bilibili 的 `tid` 调用会返回 `15080`（平台不支持该操作）。

## Path parameters

- `accountId` string, required: 渠道账号 ID。必须是当前用户已授权的账号，且账号所属平台应与「平台发布选项」接口中查询的平台一致。
- `field` string, required: 要创建取值的发布选项字段。取值来自[「平台发布选项」](/api-reference/get-api-v2-channels-platforms-platform-publish-options)接口返回的 `data[n].field`，并且该返回项必须包含 `createSchema`；没有 `createSchema` 的字段不支持本接口。

## Response `200`

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

- object
  - `data` PublishOptionCreatedValueVo
    - `field` string, required: 发布选项字段
    - `valueType` 'list' | 'tree', required: 取值结构
    - `item` object, required: 选项
  - `code` integer, required: 业务状态码。0 表示成功，非 0 表示业务错误。
  - `message` string, required: 响应消息。
  - `requestId` string: 请求 ID。
  - `timestamp` integer: 错误响应时间戳，Unix 毫秒。

## Changes

- **2026-11-03** `7cc8f21c4c96`: 1 breaking
  - removed the request body

[Operation history](https://skmtc.dev/aitoearn/apis/aitoearn-api/changes/api/v2/channels/accounts/:accountId/publish-options/:field/values/post.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)
