创建发布任务

POST /extension/task

需要 Bearer Token 鉴权。

端点#

POST https://api.multipost.app/extension/task

请求体#

application/json

字段类型必填说明
targetClientIdstring
taskTypeenum(PUBLISH_POST, SCHEDULE_PUBLISH_POST)
taskDataPublishPost | SchedulePublishPost | DraftPost

请求示例#

curl -X POST 'https://api.multipost.app/extension/task' \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "targetClientId": "cmd5qsrfd00036hsmokswv5ye",
  "taskType": "DRAFT_POST",
  "taskData": {
    "draftId": "cmd5r2t560001itqgy7n7o0tt",
    "platforms": [
      {
        "name": "DYNAMIC_X"
      }
    ],
    "timestamp": 27474647
  }
}'

响应#

200 — 成功创建任务

{
  "success": false,
  "data": {
    "taskId": "string",
    "status": "PENDING"
  }
}

400 — 无效的请求数据

{
  "success": false,
  "error": "string"
}

401 — 未授权

{
  "success": false,
  "error": "string"
}