> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitoearn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Publish Option Value

> Interface description: Additional parameter values ​​required when creating platform publishing for an authorized channel account. After successful creation, an option `item` that can be directly used for publishing tasks is returned.

All additional parameters on the platform side that "need to be created first and then selected" are processed through this interface. For example, Pinterest needs to create a Board first, and then use the returned Board as the publishing target `boardId`.

Calling process: First call the ["Platform Publish Options"](/en/api-reference/get-api-v2-channels-platforms-platform-publish-options) interface (`GET /api/v2/channels/platforms/{platform}/publish-options`) to query what additional parameters the platform has; only fields whose return items contain `createSchema` are supported for creation. Put the `field` in the return item into the path parameter `field` of this interface, and organize the JSON request body according to the `createSchema`. For fields that do not need to be created, please call the ["Publish option optional values"](/en/api-reference/get-api-v2-channels-accounts-account-id-publish-options-field-values) interface to query and select.



## OpenAPI

````yaml /openapi/en/aitoearn.openapi.json post /api/v2/channels/accounts/{accountId}/publish-options/{field}/values
openapi: 3.0.1
info:
  title: AiToEarn Open Platform API
  description: >-
    AiToEarn Open Platform API. You can switch between the China and
    international sites for testing. Business success is determined by whether
    the response body has code === 0.
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: China site
  - url: https://aitoearn.ai
    description: International site
security: []
tags:
  - name: AI Services
  - name: AI Services/Video Generation
  - name: AI Services/Image Generation
  - name: Channel Management
  - name: Channel Management/Accounts
  - name: Channel Management/Publishing
  - name: Channel Management/Platforms
  - name: Channel Management/Works
  - name: Channel Management/Account Groups
  - name: Channel Management/Authorization
  - name: Asset Management
  - name: AI Services/Large Language Models
paths:
  /api/v2/channels/accounts/{accountId}/publish-options/{field}/values:
    post:
      tags:
        - Channel Management/Accounts
      summary: Create Publish Option Value
      description: >-
        Interface description: Additional parameter values ​​required when
        creating platform publishing for an authorized channel account. After
        successful creation, an option `item` that can be directly used for
        publishing tasks is returned.


        All additional parameters on the platform side that "need to be created
        first and then selected" are processed through this interface. For
        example, Pinterest needs to create a Board first, and then use the
        returned Board as the publishing target `boardId`.


        Calling process: First call the ["Platform Publish
        Options"](/en/api-reference/get-api-v2-channels-platforms-platform-publish-options)
        interface (`GET /api/v2/channels/platforms/{platform}/publish-options`)
        to query what additional parameters the platform has; only fields whose
        return items contain `createSchema` are supported for creation. Put the
        `field` in the return item into the path parameter `field` of this
        interface, and organize the JSON request body according to the
        `createSchema`. For fields that do not need to be created, please call
        the ["Publish option optional
        values"](/en/api-reference/get-api-v2-channels-accounts-account-id-publish-options-field-values)
        interface to query and select.
      operationId: AccountsController_createPublishOptionValue_v2
      parameters:
        - name: accountId
          in: path
          description: >-
            Channel account ID. It must be an account authorized by the current
            user, and the platform to which the account belongs should be
            consistent with the platform queried in the "Platform Publishing
            Options" interface.
          required: true
          example: ''
          schema:
            type: string
            description: >-
              Channel account ID. It must be an account authorized by the
              current user, and the platform to which the account belongs should
              be consistent with the platform queried in the "Platform
              Publishing Options" interface.
        - name: field
          in: path
          description: >-
            The publishing options field to create a value for. The value comes
            from the `data[n].field` returned by the ["Platform Publish
            Options"](/en/api-reference/get-api-v2-channels-platforms-platform-publish-options)
            interface, and the return item must contain `createSchema`.
          required: true
          example: ''
          schema:
            type: string
            description: >-
              The publishing options field to create a value for. The value
              comes from the `data[n].field` returned by the ["Platform Publish
              Options"](/en/api-reference/get-api-v2-channels-platforms-platform-publish-options)
              interface, and the return item must contain `createSchema`.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              description: >-
                Create the JSON parameters required to post option values. The
                specific fields are not fixed structures and must be based on
                the `createSchema` in the return item of the ["Platform
                Publishing
                Options"](/en/api-reference/get-api-v2-channels-platforms-platform-publish-options)
                interface.
              properties: {}
            examples: {}
        required: true
        description: >-
          Create the JSON parameters required to post option values. The
          specific fields are not fixed structures and must be based on the
          `createSchema` in the item returned by the ["Platform Publish
          Options"](/en/api-reference/get-api-v2-channels-platforms-platform-publish-options)
          interface; for example, Pinterest's `boardId` field will return the
          schema required to create a Board.
      responses:
        '200':
          description: >-
            The request has been processed by the service. Business success is
            determined by whether the response body has code === 0.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PublishOptionCreatedValueVo'
                  code:
                    type: integer
                    description: >-
                      Business status code. 0 means success; non-zero means a
                      business error.
                  message:
                    type: string
                    description: Response message.
                  requestId:
                    type: string
                    description: Request ID.
                  timestamp:
                    type: integer
                    description: Error response timestamp in Unix milliseconds.
                required:
                  - code
                  - message
              examples:
                success:
                  summary: Success
                  value:
                    code: 0
                    message: Request succeeded
                    data:
                      field: string
                      valueType: list
                      item: {}
                validationFailed10002:
                  summary: ValidationFailed (10002)
                  value:
                    code: 10002
                    message: Parameter validation failed
                    data: {}
                    timestamp: 1772099056662
                unauthorized401:
                  summary: Unauthenticated or invalid API Key
                  value:
                    code: 401
                    message: Unauthorized
                    data: {}
                    timestamp: 1772099056662
                accountNotFound12600:
                  summary: AccountNotFound (12600)
                  value:
                    code: 12600
                    message: Account not found
                    data: {}
                    timestamp: 1772099056662
                channelPlatformOperationNotSupported15080:
                  summary: ChannelPlatformOperationNotSupported (15080)
                  value:
                    code: 15080
                    message: '{{platform}} does not support this operation'
                    data: {}
                    timestamp: 1772099056662
      deprecated: false
      security:
        - apikey-header-X-Api-Key: []
components:
  schemas:
    PublishOptionCreatedValueVo:
      type: object
      properties:
        field:
          type: string
          description: Publishing options field
        valueType:
          type: string
          enum:
            - list
            - tree
          description: Value structure
        item:
          type: object
          properties: {}
          description: Options
      required:
        - field
        - valueType
        - item
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Need to get API Key from AiToEarn. Click to go to ["API Key Obtaining
        Tutorial"](/en/use/api-key).

````