Reschedule to a queue or time, cancel, or publish now with POST /api/v1/posts/{postId}/targets/{targetId}/schedule. Requires an API key with the publish scope or a signed-in workspace owner.
Request
Send the current attempt ID from post status. A queueId assigns the next free occurrence or the pinned slot. scheduledAt detaches the target from its queue.
| Parameter | In | Type | Required |
|---|---|---|---|
postId |
path | UUID | Yes |
targetId |
path | UUID | Yes |
workspaceId |
query | UUID | Yes |
The body takes one of 3 shapes.
| Body field | Type | Required |
|---|---|---|
expectedAttemptId |
UUID | Yes (shape 1) |
action |
"reschedule" |
Yes (shape 1) |
scheduledAt |
string | Yes (shape 1) |
expectedAttemptId |
UUID | Yes (shape 2) |
action |
"reschedule" |
Yes (shape 2) |
queueId |
UUID | Yes (shape 2) |
pinned |
object | No (shape 2) |
expectedAttemptId |
UUID | Yes (shape 3) |
action |
"publish_now", "cancel" |
Yes (shape 3) |
Response
- HTTP 202: an object with
targetId,attemptId,accountId,scheduledAt,queueId,slotId,assignmentId,occurrenceDate,localDate,localTime,timezone,status.status:scheduled,queued,submitting,confirming,published,provider_draft,failed,unresolved,cancelled
The OpenAPI document has each field’s type.
Examples
const result = await workspace.schedule.change(postId, targetId, {
expectedAttemptId: attemptId,
action: "reschedule",
scheduledAt: "2026-12-10T15:00:00Z",
});result = workspace.schedule.change(
post_id,
target_id,
expected_attempt_id=attempt_id,
action="reschedule",
scheduled_at="2026-12-10T15:00:00Z",
)curl -X POST "https://pubnio.com/api/v1/posts/$POST_ID/targets/$TARGET_ID/schedule?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"expectedAttemptId":"'"$ATTEMPT_ID"'","action":"reschedule","scheduledAt":"2026-12-10T15:00:00Z"}'pnio posts reschedule "$POST_ID" "$TARGET_ID" --attempt "$ATTEMPT_ID" --at 2026-12-10T15:00:00ZAlso: pnio posts cancel, pnio posts publish-now, pnio schedule skip-to-next.
async () => {
const postId = "<postId>";
const targetId = "<targetId>";
const attemptId = "<attemptId>";
const response = await codemode.request({
method: "POST",
path: `/api/v1/posts/${postId}/targets/${targetId}/schedule`,
query: { workspaceId: codemode.workspaceId },
body: {
expectedAttemptId: attemptId,
action: "reschedule",
scheduledAt: "2026-12-10T15:00:00Z",
},
});
return response.data;
};Errors
attempt-changed: HTTP 409, Delivery attempt changeddelivery-schedule-locked: HTTP 409, Delivery schedule cannot change
It also declares the problems most operations declare.
Idempotency
No key. The required expectedAttemptId makes a stale retry fail instead of applying twice.
Limits
- Field lengths and ranges are in the OpenAPI document.