Create a publish task
POST /extension/task
Requires Bearer token authentication.
Endpoint#
POST https://api.multipost.app/extension/taskRequest body#
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| targetClientId | string | ✓ | |
| taskType | enum(PUBLISH_POST, SCHEDULE_PUBLISH_POST, DRAFT_POST) | ✓ | Must match the taskData shape |
| taskData | PublishPost | SchedulePublishPost | DraftPost | ✓ |
Publish an existing draft#
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_FACEBOOK"
}
]
}
}'The task is processed immediately when timestamp is omitted. For scheduled publishing, provide a 13-digit JavaScript timestamp in milliseconds, normally calculated with Date.now().
Publish content directly#
{
"targetClientId": "cmd5qsrfd00036hsmokswv5ye",
"taskType": "PUBLISH_POST",
"taskData": {
"platforms": [{ "name": "DYNAMIC_FACEBOOK" }],
"isAutoPublish": false,
"data": {
"title": "Test post",
"content": "This is a test post",
"images": [],
"videos": []
}
}
}PUBLISH_POST does not accept draftId. To schedule direct content, use SCHEDULE_PUBLISH_POST and provide taskData.timestamp in milliseconds.
Response#
200 — Task created successfully
{
"success": true,
"data": {
"taskId": "string",
"status": "PENDING"
}
}400 — Invalid request data
{
"success": false,
"error": "string"
}401 — Unauthorized
{
"success": false,
"error": "string"
}