DELETE /v1/scheduled-posts/:scheduledPostId
Cancel a queued post before it publishes.
DELETE
/v1/scheduled-posts/:scheduledPostIdPhase 1stable
- Auth
- Bearer
- Scope
- publish:write
Cancel a post that hasn't started publishing yet. The scheduled post remains visible with status: canceled for audit - it does not disappear.
Cancel is also the escape hatch for publish-content: the 30-second lead time is your window to abort a mistaken immediate publish.
Once a post moves to publishing, cancel is best-effort. If the platform upload already went out, the post completes and cancel returns 409 CONFLICT. Already-published posts cannot be pulled back through this API - you'd delete upstream on the platform.
Path
scheduledPostIdstringrequiredId returned by schedule or publish.
Body
reasonstringoptionalFree-form note stored on the audit log. 1024 chars max.
Example request
curl -X DELETE https://api.layers.com/v1/scheduled-posts/sp_4c8e7d2f-9a1b-4c3d-8e7f-2a1b3c4d5e60 \
-H "Authorization: Bearer lp_..." \
-H "Content-Type: application/json" \
-d '{ "reason": "Brand asked us to hold - legal review pending." }'const result = await layers.publishing.cancel({
id: "sp_4c8e7d2f-9a1b-4c3d-8e7f-2a1b3c4d5e60",
reason: "Brand asked us to hold - legal review pending.",
});result = layers.publishing.cancel(
id="sp_4c8e7d2f-9a1b-4c3d-8e7f-2a1b3c4d5e60",
reason="Brand asked us to hold - legal review pending.",
)Response
200Canceled
{
"id": "sp_4c8e7d2f-9a1b-4c3d-8e7f-2a1b3c4d5e60",
"status": "canceled",
"canceledAt": "2026-04-18T19:22:41Z"
}Errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing or invalid key. |
| 403 | FORBIDDEN_SCOPE | Key lacks publish:write. |
| 404 | NOT_FOUND | Post not in your organization. |
| 409 | CONFLICT | Post already terminal - published, failed, canceled, or draft. |
See also
POST /v1/content/:id/publish- publish nowPOST /v1/content/:id/schedule- queue for laterGET /v1/scheduled-posts/:id- check status before cancelingPOST /v1/scheduled-posts/:id/reschedule- reschedule if the issue is timing, not content