Reference

任务接口参考

Task endpoint reference with contract notes for the current upstream review schema, including discard cleanup.

Create task
/api/review/agent/tasks
List tasks
/api/review/tasks
Download package
/api/review/tasks/:taskId/package
Delete task
/api/review/tasks/:taskId
Patch rework
/api/review/agent/tasks/:taskId/elements
Generated schema note
The endpoint blocks below are still sourced from shared docs data. Treat the manual notes on this page as authoritative for the contract changes introduced in Task 5.

Overview

Task endpoint map

These routes cover task creation, shared detail lookup, deletion, and rework patching.

POST /api/review/agent/tasks

通过代理令牌认证创建审核任务。

请求时需携带 `x-review-agent-token`,并提供 `publicAccount`、`topic` 和 `candidates`。

创建任务不再要求 `candidates.themeTemplates`。

`candidates.bodyOptions` 不再接受纯字符串数组,必须使用结构化候选对象。

`outline` 在请求与响应中都保持字符串格式,例如 `开场说明 | 升级亮点 | 行动引导`。

成功后返回处于 `pending_review` 的新任务记录。

GET /api/review/tasks

使用管理员会话认证并按条件筛选任务列表。

该路由支持 `status`、`publicAccount`、`from` 和 `to` 查询参数。

未指定状态筛选时,默认返回 `pending_review` 任务。

GET /api/review/tasks/:taskId

查看单个任务详情。

该路由同时支持管理员会话和代理令牌认证。

响应返回完整的落库任务记录,包括结构化正文候选、当前 `selections`、`manualOverrides`、`bodyDraft` 与时间线。

正文候选中的 `outline` 会保持上游原样字符串格式,不会在接口层拆成数组。

DELETE /api/review/tasks/:taskId

删除任务记录并清理本地 review-upload 文件。

该路由会先删除任务记录,再对任务引用到的本地 review-upload URL 进行 best-effort 清理。

只有位于 `/uploads/review/` 下的本地文件会被删除;material library、shared 和 external URL 都会被跳过。

响应会返回 `deletedTaskId`、`deletedFileCount`、`skippedAssetCount` 和 `redirectTo`,其中 `redirectTo` 固定指向 `/review`。

PATCH /api/review/agent/tasks/:taskId/elements

返工期间只允许补丁更新被驳回的字段。

补丁路由只接受当前列在 `rejectedElements` 中的字段键。

当最后一个被驳回字段修正完成后,任务会回到 `pending_review`。

Contract delta

Current task payload requirements

The task creation contract changed in a way that matters directly to upstream integrators.

Structured body candidates

POST /api/review/agent/tasks now expects candidates.bodyOptions shaped as { id, outline, focuses, content }. The old upstream body candidate schema is no longer accepted.

Theme selection has moved into the body workbench. Task creation no longer requires candidates.themeTemplates.

Minimum candidates.bodyOptions shapejson
{
  "candidates": {
    "bodyOptions": [
      {
        "id": "candidate-primary",
        "outline": "Opening | Main argument | CTA",
        "focuses": [
          "growth",
          "product"
        ],
        "content": "Long-form draft content"
      }
    ]
  }
}
Integration guidance

Keep candidate ids stable across retries and rework. Review decisions now point back to these ids through bodyDraft.sourceBodyCandidateId.

In the live API, outline is a single string. Use | as the delimiter when you need multiple outline segments.

Asset routing

For any local image attachments referenced by the task payload, upload them first through POST /api/assets/upload. Use /api/assets only for browsing the shared material library.

POST

创建审核任务

由代理侧创建新的审核任务。

POST/api/review/agent/tasks
适用场景
当自动化代理已经准备好候选内容,并需要发起审核时使用。
认证方式

请求头取值必须与 REVIEW_AGENT_TOKEN 环境变量一致。

agent_tokenx-review-agent-token

请求参数

请求头

NameTypeRequiredDescriptionNotes
x-review-agent-tokenstringRequired用于授权创建任务的共享代理令牌。-

请求体结构

JSON 对象json

包含公众号、主题以及至少一类候选内容的任务创建负载。

结构说明
  • 校验器要求 `candidates` 至少存在一类非空候选内容。
  • `contentType: 'image_post'` 表示图片消息审核任务,候选内容应提供 `titles`、`descriptions`、`imageGroups`,并可提供 `commentSettings`。
  • `image_post` 的 `candidates.imageGroups[]` 只接受 `id`、可选 `label` 和 `images`;`coverCrop` 是审核通过时写入 `selections` 的字段,不属于创建候选图片组。
  • `candidates.bodyOptions` 必须是结构化对象数组,不能再传旧版字符串数组。
  • `outline` 必须是单个非空字符串;如需多个大纲片段,请在字符串内使用 `|` 分隔。
NameTypeRequiredDescriptionNotes
publicAccount'silicon-rise' | 'carbon-fitness'Required目标公众号。-
topicstringRequired审核主题或文章题目。-
contentType'article' | 'image_post'Optional任务内容类型;缺省按 article 处理,图片消息任务必须显式传 `image_post`,后续发布会走微信 `newspic` 草稿链路。Example: image_post
candidatesobjectRequired至少提供一类候选内容;article 使用标题、摘要、正文和封面候选,image_post 使用 `titles`、`descriptions`、`imageGroups`,可选 `commentSettings`。Example: { "authors": [ "Agent 作者" ], "titles": [ "上线公告草稿" ], "summaries": [ "一段简短摘要" ], "descriptions": [ "图片消息描述文案" ], "bodyOptions": [ { "id": "body_candidate_launch_v1", "outline": "开场说明 | 升级亮点 | 行动引导", "focuses": [ "强调版本上线时间", "突出核心能力升级", "结尾引导读者查看详情" ], "content": "# 上线公告\n\n这里是候选正文全文。" } ], "coverImages": [ "https://example.com/cover.jpg" ], "bodyImageCandidates": [ { "placeholderId": "hero-image", "options": [ "https://example.com/hero-1.jpg" ] } ], "imageGroups": [ { "id": "image_group_1", "label": "首选图片组", "images": [ { "assetId": "asset_image_post_1" }, { "assetId": "asset_image_post_2" } ] } ], "commentSettings": [ { "needOpenComment": true, "onlyFansCanComment": false } ] }

响应结构

JSON 对象json

已落库且处于 pending_review 状态的任务记录。

NameTypeRequiredDescriptionNotes
idstringRequired任务标识。-
publicAccount'silicon-rise' | 'carbon-fitness'Required目标公众号。-
topicstringRequired任务主题。-
candidatesReviewTaskCandidatesRequired创建任务时提交的候选内容。-
status'pending_review' | 'approved' | 'published' | 'rejected_rework'Required当前任务生命周期状态。-
selectionsReviewSelections | undefinedOptional审核确认后的选中结果,审核或返工后会出现。-
manualOverridesReviewManualOverrides | undefinedOptional审核员的人工覆写审计轨迹;只在发生手动改写时出现。-
bodyDraftReviewBodyDraft | undefinedOptional用于生成发布快照的正文草稿。-
rejectedElementsElementKey[] | undefinedOptional任务被驳回返工时仍待修正的字段;article 可用 title、summary、body、bodyImages、coverImage,image_post 可用 title、description、images、coverCrop、commentSettings。-
lockedSelectionsPartial<ReviewSelections> | undefinedOptional返工期间保持锁定的已确认字段。-
rejectionReasonRejectionReasonCategory | undefinedOptional任务被退回返工的原因。-
rejectionNotestring | undefinedOptional返工补充说明。-
publishJobsPublishJobRecord[]Required与任务关联的发布任务列表。-
timelineTimelineEvent[]Required任务生命周期审计轨迹。-
createdAtstringRequiredISO 格式创建时间。-
updatedAtstringRequiredISO 格式最后更新时间。-

状态码

NameTypeRequiredDescriptionNotes
HTTP 201已创建Optional任务记录已成功写入。-
HTTP 400请求错误Optional请求负载格式错误,或缺少必填候选内容。-
HTTP 401未授权Optional代理令牌缺失或无效。-
HTTP 500内部服务器错误Optional仓储写入失败,或发生非预期处理异常。-

约束条件

  • `candidates` 至少要提供一类候选内容。
  • publicAccount 只能是 silicon-rise 或 carbon-fitness。
  • `contentType` 只能是 `article` 或 `image_post`;未提供时按文章任务处理。
  • `image_post` 的 candidates 必须能让审核员选择标题、描述和图片组;图片组中的图片必须是可发布的素材资产引用。
  • `image_post` 的 candidates.imageGroups[] 只允许 id、label 和 images;封面裁剪 `coverCrop` 必须随审核 selections 提交。
  • `image_post` 的 candidates.commentSettings 必须是 `{ needOpenComment, onlyFansCanComment }` 对象数组。
  • `bodyOptions` 中的每个候选都必须包含 `id`、`outline`、`focuses` 和 `content`。
  • `outline` 的协议值不是数组,而是一个可按 `|` 切分展示的字符串。

副作用

  • 向审核仓储写入新的任务记录。
  • 追加一条 task_created 时间线事件。

请求示例

POST /api/review/agent/taskshttp
POST /api/review/agent/tasks

Headers
{
  "x-review-agent-token": "agent-token-example"
}

Body
{
  "publicAccount": "silicon-rise",
  "topic": "新品图片消息",
  "contentType": "image_post",
  "candidates": {
    "authors": [
      "Agent 作者"
    ],
    "titles": [
      "新品图片消息标题 A",
      "新品图片消息标题 B"
    ],
    "descriptions": [
      "图片消息描述文案 A",
      "图片消息描述文案 B"
    ],
    "imageGroups": [
      {
        "id": "image_group_1",
        "label": "首选图片组",
        "images": [
          {
            "assetId": "asset_image_post_1"
          },
          {
            "assetId": "asset_image_post_2"
          }
        ]
      }
    ],
    "commentSettings": [
      {
        "needOpenComment": true,
        "onlyFansCanComment": false
      }
    ]
  }
}

响应示例

HTTP 201http
HTTP/1.1 201

Body
{
  "id": "task_123",
  "status": "pending_review",
  "publicAccount": "silicon-rise",
  "topic": "新品图片消息",
  "contentType": "image_post",
  "candidates": {
    "titles": [
      "新品图片消息标题 A"
    ],
    "descriptions": [
      "图片消息描述文案 A"
    ],
    "imageGroups": [
      {
        "id": "image_group_1",
        "label": "首选图片组",
        "images": [
          {
            "assetId": "asset_image_post_1"
          },
          {
            "assetId": "asset_image_post_2"
          }
        ]
      }
    ],
    "commentSettings": [
      {
        "needOpenComment": true,
        "onlyFansCanComment": false
      }
    ]
  },
  "publishJobs": []
}

相关链接

GET

获取审核任务列表

为管理员界面返回筛选后的任务列表。

GET/api/review/tasks
适用场景
当管理员需要任务索引页,或按状态、账号、日期范围查看队列时使用。
认证方式

该路由会读取 review_admin_session Cookie,并拒绝未认证请求。

admin_sessionreview_admin_session

请求参数

查询参数

NameTypeRequiredDescriptionNotes
status'all' | TaskStatusOptional可选的任务状态筛选;默认值为 pending_review。-
publicAccount'silicon-rise' | 'carbon-fitness'Optional可选的公众号筛选条件。-
fromISO date stringOptionalcreatedAt 的可选起始时间下界,包含边界值。-
toISO date stringOptionalcreatedAt 的可选结束时间上界,包含边界值。-

Cookie

NameTypeRequiredDescriptionNotes
review_admin_sessionstringRequired承载 review_admin_session Cookie。-

请求体结构

无请求体none
无请求体
无需请求体;路由行为完全由查询参数驱动。

响应结构

JSON 数组json

应用筛选条件后,按 updatedAt 倒序返回的裸 JSON 任务数组。

结构说明
  • 线上处理器会直接通过 Response.json(filteredTasks) 返回数组,而不是包裹对象。
元素类型ReviewTaskRecord

按 updatedAt 倒序返回的筛选后任务记录。

NameTypeRequiredDescriptionNotes
idstringRequired任务标识。-
publicAccount'silicon-rise' | 'carbon-fitness'Required目标公众号。-
topicstringRequired任务主题。-
candidatesReviewTaskCandidatesRequired创建任务时提交的候选内容。-
status'pending_review' | 'approved' | 'published' | 'rejected_rework'Required当前任务生命周期状态。-
selectionsReviewSelections | undefinedOptional审核确认后的选中结果,审核或返工后会出现。-
manualOverridesReviewManualOverrides | undefinedOptional审核员的人工覆写审计轨迹;只在发生手动改写时出现。-
bodyDraftReviewBodyDraft | undefinedOptional用于生成发布快照的正文草稿。-
rejectedElementsElementKey[] | undefinedOptional任务被驳回返工时仍待修正的字段;article 可用 title、summary、body、bodyImages、coverImage,image_post 可用 title、description、images、coverCrop、commentSettings。-
lockedSelectionsPartial<ReviewSelections> | undefinedOptional返工期间保持锁定的已确认字段。-
rejectionReasonRejectionReasonCategory | undefinedOptional任务被退回返工的原因。-
rejectionNotestring | undefinedOptional返工补充说明。-
publishJobsPublishJobRecord[]Required与任务关联的发布任务列表。-
timelineTimelineEvent[]Required任务生命周期审计轨迹。-
createdAtstringRequiredISO 格式创建时间。-
updatedAtstringRequiredISO 格式最后更新时间。-

状态码

NameTypeRequiredDescriptionNotes
HTTP 200成功Optional任务列表已成功读取。-
HTTP 400请求错误Optional查询参数校验失败。-
HTTP 401未授权Optional管理员会话缺失或无效。-
HTTP 500内部服务器错误Optional仓储读取失败,或筛选过程发生异常。-

约束条件

  • 未传入状态时,默认筛选 pending_review。
  • 当 from 和 to 同时存在时,from 必须早于或等于 to。

副作用

  • 无。

请求示例

GET /api/review/taskshttp
GET /api/review/tasks

Headers
{
  "cookie": "review_admin_session=eyJhbGciOi..."
}

Query
{
  "status": "pending_review",
  "publicAccount": "silicon-rise"
}

响应示例

HTTP 200http
HTTP/1.1 200

Body
[
  {
    "id": "task_123",
    "status": "pending_review",
    "publicAccount": "silicon-rise"
  }
]

相关链接

GET

获取审核任务详情

返回单个任务的完整已落库记录。

GET/api/review/tasks/:taskId
适用场景
当管理员需要查看任务详情、返工状态、时间线和发布任务信息时使用;代理侧请使用 /api/review/agent/tasks/:taskId。
认证方式

该路由只接受 review_admin_session Cookie;携带 x-review-agent-token 会被拒绝。

admin_sessionreview_admin_session

请求参数

路径参数

NameTypeRequiredDescriptionNotes
taskIdstringRequired待查询任务的标识。-

Cookie

NameTypeRequiredDescriptionNotes
review_admin_sessionstringRequired管理员侧使用该 Cookie 访问任务详情。-

请求体结构

无请求体none
无请求体
无需请求体。

响应结构

JSON 对象json

已落库的完整审核任务记录。

NameTypeRequiredDescriptionNotes
idstringRequired任务标识。-
publicAccount'silicon-rise' | 'carbon-fitness'Required目标公众号。-
topicstringRequired任务主题。-
candidatesReviewTaskCandidatesRequired创建任务时提交的候选内容。-
status'pending_review' | 'approved' | 'published' | 'rejected_rework'Required当前任务生命周期状态。-
selectionsReviewSelections | undefinedOptional审核确认后的选中结果,审核或返工后会出现。-
manualOverridesReviewManualOverrides | undefinedOptional审核员的人工覆写审计轨迹;只在发生手动改写时出现。-
bodyDraftReviewBodyDraft | undefinedOptional用于生成发布快照的正文草稿。-
rejectedElementsElementKey[] | undefinedOptional任务被驳回返工时仍待修正的字段;article 可用 title、summary、body、bodyImages、coverImage,image_post 可用 title、description、images、coverCrop、commentSettings。-
lockedSelectionsPartial<ReviewSelections> | undefinedOptional返工期间保持锁定的已确认字段。-
rejectionReasonRejectionReasonCategory | undefinedOptional任务被退回返工的原因。-
rejectionNotestring | undefinedOptional返工补充说明。-
publishJobsPublishJobRecord[]Required与任务关联的发布任务列表。-
timelineTimelineEvent[]Required任务生命周期审计轨迹。-
createdAtstringRequiredISO 格式创建时间。-
updatedAtstringRequiredISO 格式最后更新时间。-

状态码

NameTypeRequiredDescriptionNotes
HTTP 200成功Optional任务已找到并成功返回。-
HTTP 401未授权Optional管理员会话缺失或无效。-
HTTP 403禁止访问Optional请求携带 x-review-agent-token 访问后台页面接口。-
HTTP 404未找到OptionaltaskId 不存在。-
HTTP 500内部服务器错误Optional仓储读取失败。-

约束条件

  • 该路由返回完整任务记录,而不是裁剪后的摘要。
  • 代理访问同一记录时应使用 /api/review/agent/tasks/:taskId。
  • 响应中的 candidates.bodyOptions 为结构化正文候选数组。
  • `outline` 在响应中保持字符串格式。

副作用

  • 无。

请求示例

GET /api/review/tasks/:taskIdhttp
GET /api/review/tasks/:taskId

Headers
{
  "cookie": "review_admin_session=eyJhbGciOi..."
}

Params
{
  "taskId": "task_123"
}

响应示例

HTTP 200http
HTTP/1.1 200

Body
{
  "id": "task_123",
  "status": "approved",
  "candidates": {
    "bodyOptions": [
      {
        "id": "body_candidate_launch_v1",
        "outline": "开场说明 | 升级亮点 | 行动引导",
        "focuses": [
          "强调版本上线时间",
          "突出核心能力升级"
        ],
        "content": "# 上线公告\n\n这里是候选正文全文。"
      }
    ]
  },
  "manualOverrides": {
    "title": {
      "basedOn": "上线公告草稿",
      "value": "上线公告|新版能力已正式开放"
    }
  },
  "publishJobs": []
}

相关链接

Offline package
The package route exports the saved final manuscript and selected images. Editable tasks are saved by the review UI before download; historical task records can be downloaded directly.

GET

打包下载审核稿件

把任务当前已保存的最终文稿和图片导出为离线 ZIP。

GET/api/review/tasks/:taskId/package
适用场景
当管理员需要下载文章或图片消息最终稿,或归档仍保留在审核仓储中的历史任务时使用。
认证方式

该路由只接受具有 review 权限的管理员会话;Agent token 不能访问。

admin_sessionreview_admin_session

请求参数

路径参数

NameTypeRequiredDescriptionNotes
taskIdstringRequired待导出任务的标识。-

Cookie

NameTypeRequiredDescriptionNotes
review_admin_sessionstringRequired必须包含 review 权限的管理员会话 Cookie。-

请求体结构

无请求体none
无请求体
无需请求体。

响应结构

二进制文件binary
二进制响应

包含 manuscript.md 与 images/ 的 ZIP 文件。

Content-Type: binary

  • 响应 Content-Type 为 application/zip,并通过 Content-Disposition 提供 review-{taskId}.zip 文件名。
  • Markdown 中的共享素材地址会改写为 ZIP 内 images/ 的相对路径。

状态码

NameTypeRequiredDescriptionNotes
HTTP 200成功OptionalZIP 已构建并作为附件返回。-
HTTP 401未授权Optional管理员会话缺失或无效。-
HTTP 403禁止访问Optional会话缺少 review 权限,或使用 Agent token 访问。-
HTTP 404未找到OptionaltaskId 不存在。-
HTTP 409冲突Optional最终稿不存在,或任一最终图片缺失、停用或不可读。-
HTTP 500内部服务器错误Optional仓储读取或 ZIP 构建发生非预期失败。-

约束条件

  • 只导出当前已保存的最终 selections 与 bodyDraft,不包含未采用候选。
  • 图片消息按最终 selections.images 顺序导出。
  • pending_review、approved、published 与 rejected_rework 等仍可读取的历史任务均可下载。
  • 任一最终图片异常时整包失败,不返回残缺 ZIP。

副作用

  • 无;详情页在调用本接口前可能先通过草稿接口保存当前编辑。

请求示例

GET /api/review/tasks/:taskId/packagehttp
GET /api/review/tasks/:taskId/package

Headers
{
  "cookie": "review_admin_session=eyJhbGciOi..."
}

Params
{
  "taskId": "task_123"
}

响应示例

HTTP 200http
HTTP/1.1 200

Headers
{
  "content-type": "application/zip",
  "content-disposition": "attachment; filename=\"review-task_123.zip\""
}

Body
"<binary zip>"

相关链接

Discard action

The delete route removes the task record and only best-effort cleans local review-upload files. Shared material library assets and external URLs are skipped.

DELETE

删除审核任务

删除任务记录,并尽力清理该任务引用的本地 review-upload 文件。

DELETE/api/review/tasks/:taskId
适用场景
当管理员需要丢弃一个任务并回收其本地上传附件时使用。
认证方式

该路由会读取 review_admin_session Cookie,并拒绝未认证请求。

admin_sessionreview_admin_session

请求参数

路径参数

NameTypeRequiredDescriptionNotes
taskIdstringRequired待删除任务的标识。-

Cookie

NameTypeRequiredDescriptionNotes
review_admin_sessionstringRequired承载 review_admin_session Cookie。-

请求体结构

无请求体none
无请求体
无需请求体。

响应结构

JSON 对象json

删除任务后的结果、清理统计与跳转目标。

结构说明
  • 清理只会尝试删除 `/uploads/review/` 下的本地文件,不会触及 material library、shared 或 external URL。
  • 文件清理是 best-effort;单个文件删除失败只会增加 skippedAssetCount,不会回滚已删除的任务记录。
NameTypeRequiredDescriptionNotes
deletedTaskIdstringRequired已删除任务的标识。-
deletedFileCountnumberRequired从本地 review-upload 路径删除的文件数量。-
skippedAssetCountnumberRequired跳过的资产数量,包括 material library、shared 或 external URL,以及删除失败的本地文件。-
redirectTostringRequired前端在删除任务后应跳转到的路径。-

状态码

NameTypeRequiredDescriptionNotes
HTTP 200成功Optional任务已删除并完成本地文件清理。-
HTTP 401未授权Optional管理员会话缺失或无效。-
HTTP 404未找到OptionaltaskId 不存在。-
HTTP 500内部服务器错误Optional仓储删除失败,或本地文件清理发生异常。-

约束条件

  • 只会删除 `/uploads/review/` 下的本地 review-upload 文件。
  • material library、shared 和 external URL 都会被跳过,不会被删除。
  • 删除任务记录与清理文件是 best-effort 流程;清理失败不会把任务记录恢复回来。

副作用

  • 删除任务记录。
  • 尽力清理该任务引用到的本地 review-upload 文件。
  • 将前端重定向到 /review。

请求示例

DELETE /api/review/tasks/:taskIdhttp
DELETE /api/review/tasks/:taskId

Headers
{
  "cookie": "review_admin_session=eyJhbGciOi..."
}

Params
{
  "taskId": "task_123"
}

响应示例

HTTP 200http
HTTP/1.1 200

Body
{
  "deletedTaskId": "task_123",
  "deletedFileCount": 1,
  "skippedAssetCount": 2,
  "redirectTo": "/review"
}

相关链接

Shared detail route

Agents and admins now read the same task detail route. Rework automation should keep treating the upstream candidate id as the source of truth for later decision submissions.

Rework constraint

Rework payloads should preserve candidate identity when a body field is revised. Do not regenerate unrelated candidate ids during a patch.

PATCH

更新被驳回字段

允许代理只更新返工过程中被驳回的字段。

PATCH/api/review/agent/tasks/:taskId/elements
适用场景
当代理已经修改仍处于开放状态的字段内容时使用。
认证方式

请求头取值必须与 REVIEW_AGENT_TOKEN 环境变量一致。

agent_tokenx-review-agent-token

请求参数

路径参数

NameTypeRequiredDescriptionNotes
taskIdstringRequired待更新任务的标识。-

请求头

NameTypeRequiredDescriptionNotes
x-review-agent-tokenstringRequired用于授权补丁请求的共享代理令牌。-

请求体结构

JSON 对象json

仅包含当前被驳回字段键的局部选中补丁。

结构说明
  • `title` 最长 64 个字符,`summary` 最长 120 个字符。
  • `coverImage` 与 `bodyImages` 必须使用素材库路径。
  • 如果正文包含图片占位链接,这些链接也必须来自素材库。
NameTypeRequiredDescriptionNotes
titlestringOptional返工后更新的标题。-
summarystringOptional返工后更新的摘要;审核通过时最长 100 个字符。-
bodystringOptional返工后更新的正文内容。-
descriptionstringOptionalimage_post 返工后更新的图片消息描述。-
bodyImagesstring[]Optional返工后更新的正文图片地址。-
coverImagestringOptional返工后更新的封面图地址;审核通过时必须是有效封面图。-
imagesReviewAssetRef[]Optionalimage_post 返工后更新的图片素材列表。-
coverCrop{ assetId: string; cropPercentList: { ratio: "3_4"; x1: number; y1: number; x2: number; y2: number }[] }Optionalimage_post 返工后更新的审核选中封面裁剪参数。-
commentSettings{ needOpenComment: boolean; onlyFansCanComment: boolean }Optionalimage_post 返工后更新的留言设置。-

响应结构

JSON 对象json

应用补丁后的最新任务记录。

NameTypeRequiredDescriptionNotes
idstringRequired任务标识。-
publicAccount'silicon-rise' | 'carbon-fitness'Required目标公众号。-
topicstringRequired任务主题。-
candidatesReviewTaskCandidatesRequired创建任务时提交的候选内容。-
status'pending_review' | 'approved' | 'published' | 'rejected_rework'Required当前任务生命周期状态。-
selectionsReviewSelections | undefinedOptional审核确认后的选中结果,审核或返工后会出现。-
manualOverridesReviewManualOverrides | undefinedOptional审核员的人工覆写审计轨迹;只在发生手动改写时出现。-
bodyDraftReviewBodyDraft | undefinedOptional用于生成发布快照的正文草稿。-
rejectedElementsElementKey[] | undefinedOptional任务被驳回返工时仍待修正的字段;article 可用 title、summary、body、bodyImages、coverImage,image_post 可用 title、description、images、coverCrop、commentSettings。-
lockedSelectionsPartial<ReviewSelections> | undefinedOptional返工期间保持锁定的已确认字段。-
rejectionReasonRejectionReasonCategory | undefinedOptional任务被退回返工的原因。-
rejectionNotestring | undefinedOptional返工补充说明。-
publishJobsPublishJobRecord[]Required与任务关联的发布任务列表。-
timelineTimelineEvent[]Required任务生命周期审计轨迹。-
createdAtstringRequiredISO 格式创建时间。-
updatedAtstringRequiredISO 格式最后更新时间。-

状态码

NameTypeRequiredDescriptionNotes
HTTP 200成功Optional补丁已应用,任务状态已更新。-
HTTP 400请求错误Optional请求负载格式错误,或内容为空。-
HTTP 401未授权Optional代理令牌缺失或无效。-
HTTP 404未找到OptionaltaskId 不存在。-
HTTP 409冲突Optional任务不处于 rejected_rework,或补丁字段与被驳回字段不匹配。-
HTTP 500内部服务器错误Optional仓储更新失败。-

约束条件

  • 只允许更新 `rejectedElements` 中已列出的字段键。
  • 补丁请求至少要包含一个字段。
  • 当补丁包含 `coverImage` 时,会校验素材库来源和封面比例。
  • 当补丁包含 `body` 时,系统会自动更新 bodyDraft 以保留正文来源审计信息。
  • 最后一个被驳回字段修正完成时,系统会先做一次完整性校验,再把任务送回 pending_review。

副作用

  • 更新任务选中内容。
  • 当返工全部完成后,移除 `rejectedElements` 与 `lockedSelections`。
  • 当所有被驳回字段都修正完成后,将任务送回 pending_review。

请求示例

PATCH /api/review/agent/tasks/:taskId/elementshttp
PATCH /api/review/agent/tasks/:taskId/elements

Headers
{
  "x-review-agent-token": "agent-token-example"
}

Params
{
  "taskId": "task_123"
}

Body
{
  "body": "# Revised body"
}

响应示例

HTTP 200http
HTTP/1.1 200

Body
{
  "id": "task_123",
  "status": "pending_review",
  "selections": {
    "title": "已选标题",
    "body": "# Revised body"
  }
}

相关链接