Cancel Scheduled Post API
The Cancel Scheduled Post API lets you cancel a scheduled post by its postId, and the operation moves it back to draft. Use the DELETE request described below when a post should no longer publish on its scheduled time but should remain available as a draft for later review or editing.
Cancel Scheduled Post API: DELETE {{API_BASE_URL}}/v1/posts/scheduled/{postId} and draft outcome
Cancel a scheduled post by sending a DELETE request to {{API_BASE_URL}}/v1/posts/scheduled/{postId}. The path contains one required parameter, postId, whose value identifies the scheduled post to cancel. Replace the placeholder with the actual identifier for the post you want to move back to draft, and do not add a request body for this operation. Before sending the request, confirm that the postId belongs to the scheduled post you intend to cancel, because the outcome is that the post moves it back to draft rather than being published.
Authorization: x-access-key header input contract
Authorization uses the x-access-key header. Send the header named x-access-key with your token as its value on the DELETE request. If the header is missing or incorrect, treat the request as not properly authorized and correct the header before retrying. Keep the token out of the URL and out of the postId path segment, since the contract places authentication in the header and identification in the path.
Path Parameters: required string postId field map
The only path parameter is postId, and it is required and typed as a string. Supply it as the final path segment in /v1/posts/scheduled/{postId}. Use the exact identifier returned for the scheduled post you want to cancel, and check the value for stray spaces or placeholder text before sending. A missing or wrong postId is the first thing to check when the response is not a 200, because the request cannot identify the intended scheduled post without it.
Response Body: 200, 404, and 409 application/json contracts with success and message fields
Every documented response uses application/json and contains the same two fields: success, a required boolean, and message, a required string. A 200 response indicates the captured successful contract for the request. A 404 response uses the same JSON shape, and a 409 response also uses the same JSON shape, so your client should parse success and message for all three status codes rather than assuming a different body format. Read the message field for the human-readable detail returned with the status, and branch on the HTTP status code first, then on success, when deciding whether the scheduled post was cancelled and moved back to draft.
Failure matrix and worked origin-modular request example
To work through the operation, first assemble the request with the DELETE method, the {{API_BASE_URL}} origin followed by /v1/posts/scheduled/{postId}, and the x-access-key header. Then send the request and inspect the status code and JSON body together. For a 200, confirm that success is true and note the message. For a 404 or a 409, do not assume the cancellation succeeded; record the status, read the message, and check the postId and the current state of the scheduled post before deciding whether to retry, correct the identifier, or take another action. The worked request example and the response body example below show the exact shapes to use for this check.
| Field | Location | Required | Type | Notes |
|---|---|---|---|---|
| postId | Path | Yes | string | Final segment of /v1/posts/scheduled/{postId}; identifies the scheduled post to cancel. |
| x-access-key | Header | Yes | string | Authorization header carrying the token. |
| success | Response body | Yes | boolean | Returned for 200, 404, and 409 application/json responses. |
| message | Response body | Yes | string | Returned for 200, 404, and 409 application/json responses. |
Captured contract; no additional constraints supplied.
| Status | Content type | Body fields | How to handle it |
|---|---|---|---|
| 200 | application/json | success (boolean, required); message (string, required) | Treat as the captured successful contract; confirm success and read message. |
| 404 | application/json | success (boolean, required); message (string, required) | Do not assume cancellation succeeded; check postId and read message. |
| 409 | application/json | success (boolean, required); message (string, required) | Do not assume cancellation succeeded; check the scheduled post state and read message. |
Status semantics beyond the captured codes are not verified; do not infer additional meaning.
curl -X DELETE "{{API_BASE_URL}}/v1/posts/scheduled/{postId}" \
-H "x-access-key: <token>"{
"success": true,
"message": "string"
}| Scope | Field | Type | Type reference | Required | Description |
|---|---|---|---|---|---|
| postId#1 | postId | string | __0 | Yes | |
| response#2 | response | object | __0 | ||
| response#2 | response.success | boolean | __1 | Yes | |
| response#2 | response.message | string | __2 | Yes |