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

# 创建发布选项值

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

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

所有平台侧“需要先创建再选择”的额外参数都通过本接口处理。例如 Pinterest 需要先创建 Board，再把返回的 Board 作为发布目标 `boardId` 使用。

调用流程：先调用[「平台发布选项」](/api-reference/get-api-v2-channels-platforms-platform-publish-options)接口（`GET /api/v2/channels/platforms/{platform}/publish-options`）查询该平台有哪些额外参数；只有返回项包含 `createSchema` 的字段才支持创建。将返回项中的 `field` 放到本接口路径参数 `field`，并按该 `createSchema` 组织 JSON 请求体。不需要创建的字段，请调用[「发布选项可选值」](/api-reference/get-api-v2-channels-accounts-account-id-publish-options-field-values)接口查询后选择。

## Path parameters

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

## Request body

- object — 创建发布选项值所需的 JSON 参数。具体字段不是固定结构，必须以[「平台发布选项」](/api-reference/get-api-v2-channels-platforms-platform-publish-options)接口返回项中的 `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 毫秒。

---

[API](https://skmtc.net/aitoearn/apis/aitoearn-api.md) · [All operations](https://skmtc.net/aitoearn/apis/aitoearn-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aitoearn/aitoearn-api/revisions/19d860d9260d/schema)
