> ## 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.

# 更新已发布内容

> 接口说明：更新已发布任务的内容



## OpenAPI

````yaml /openapi/zh/aitoearn.openapi.json post /api/v2/channels/publish/tasks/{taskId}/update
openapi: 3.0.1
info:
  title: AiToEarn 开放平台 API
  description: AiToEarn 开放平台 API，支持在中国站与国际站之间切换调试。业务是否成功以响应体 code === 0 为准。
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: 中国站
  - url: https://aitoearn.ai
    description: 国际站
security: []
tags:
  - name: AI 服务
  - name: AI 服务/视频生成
  - name: AI 服务/图像生成
  - name: AI 服务/模型中转
  - name: 渠道管理
  - name: 渠道管理/账号
  - name: 渠道管理/内容发布
  - name: 渠道管理/平台
  - name: 渠道管理/互动
  - name: 渠道管理/作品
  - name: 渠道管理/账号分组
  - name: 渠道管理/授权
  - name: 资源管理
paths:
  /api/v2/channels/publish/tasks/{taskId}/update:
    post:
      tags:
        - 渠道管理/内容发布
      summary: 更新已发布内容
      description: 接口说明：更新已发布任务的内容
      operationId: PublishTaskController_updatePublished_v2
      parameters:
        - name: taskId
          in: path
          description: 任务 ID
          required: true
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  description: 更新后的发布内容
                  type: object
                  properties:
                    title:
                      description: 更新后的标题
                      type: string
                    body:
                      description: 更新后的正文
                      type: string
                    media:
                      description: 更新后的媒体列表
                      type: array
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                            minLength: 1
                            description: 媒体 URL
                          options:
                            description: 媒体处理选项
                            type: object
                            properties:
                              adaptation:
                                description: 媒体格式转换选项
                                type: object
                                properties:
                                  imageFormat:
                                    description: 图片和封面格式转换目标
                                    type: string
                                    enum:
                                      - 'off'
                                      - auto
                                      - jpeg
                                      - png
                                      - webp
                        required:
                          - url
                    cover:
                      description: 更新后的封面，传 null 表示移除封面
                      type: object
                      properties:
                        url:
                          type: string
                          minLength: 1
                          description: 封面 URL
                        options:
                          description: 媒体处理选项
                          type: object
                          properties:
                            adaptation:
                              description: 媒体格式转换选项
                              type: object
                              properties:
                                imageFormat:
                                  description: 图片和封面格式转换目标
                                  type: string
                                  enum:
                                    - 'off'
                                    - auto
                                    - jpeg
                                    - png
                                    - webp
                      required:
                        - url
                      nullable: true
                option:
                  description: 更新后的平台选项
                  type: object
                  additionalProperties: true
                  properties: {}
              description: 已发布内容更新数据
            examples: {}
        required: true
      responses:
        '200':
          description: 请求已被服务处理。业务是否成功以响应体 code === 0 为准。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ChannelPublishTaskOperationVo'
                  code:
                    type: integer
                    description: 业务状态码。0 表示成功，非 0 表示业务错误。
                  message:
                    type: string
                    description: 响应消息。
                  requestId:
                    type: string
                    description: 请求 ID。
                  timestamp:
                    type: integer
                    description: 错误响应时间戳，Unix 毫秒。
                required:
                  - code
                  - message
              examples:
                success:
                  summary: 成功
                  value:
                    code: 0
                    message: 请求成功
                    data:
                      taskId: string
                validationFailed10002:
                  summary: ValidationFailed (10002)
                  value:
                    code: 10002
                    message: 参数验证失败
                    data: {}
                    timestamp: 1772099056662
                unauthorized401:
                  summary: 未认证或 API Key 无效
                  value:
                    code: 401
                    message: Unauthorized
                    data: {}
                    timestamp: 1772099056662
                channelAccountNotFound15021:
                  summary: ChannelAccountNotFound (15021)
                  value:
                    code: 15021
                    message: 账户不存在
                    data: {}
                    timestamp: 1772099056662
                channelPublishPlatformNotSupported15062:
                  summary: ChannelPublishPlatformNotSupported (15062)
                  value:
                    code: 15062
                    message: 该平台不支持发布
                    data:
                      platform: douyin
                    timestamp: 1772099056662
                channelPublishPlatformWorkIdMissing15060:
                  summary: ChannelPublishPlatformWorkIdMissing (15060)
                  value:
                    code: 15060
                    message: 缺少平台作品 ID
                    data: {}
                    timestamp: 1772099056662
                channelPublishUpdateNotAllowed15059:
                  summary: ChannelPublishUpdateNotAllowed (15059)
                  value:
                    code: 15059
                    message: 当前任务状态不允许更新
                    data: {}
                    timestamp: 1772099056662
                channelPublishUpdateNotSupported15061:
                  summary: ChannelPublishUpdateNotSupported (15061)
                  value:
                    code: 15061
                    message: 该平台不支持更新已发布作品
                    data: {}
                    timestamp: 1772099056662
                channelPublishValidationFailed15051:
                  summary: ChannelPublishValidationFailed (15051)
                  value:
                    code: 15051
                    message: 发布内容校验失败
                    data:
                      platform: douyin
                      accountId: acc_123
                      issues:
                        - 发布内容校验失败
                    timestamp: 1772099056662
                publishTaskNotFound15004:
                  summary: PublishTaskNotFound (15004)
                  value:
                    code: 15004
                    message: 未发现任务
                    data: {}
                    timestamp: 1772099056662
      deprecated: false
      security:
        - apikey-header-X-Api-Key: []
components:
  schemas:
    ChannelPublishTaskOperationVo:
      type: object
      properties:
        taskId:
          type: string
          description: 发布任务 ID
      required:
        - taskId
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: AiToEarn Open Platform API Key。

````