Discard a Social Post

Delete a draft or cancel a scheduled post

Published ·Updated

DELETE
/v1/social/posts/{postId}
curl -X DELETE "https://api.orshot.com/v1/social/posts/<POST_ID>" \
  -H "Authorization: Bearer <ORSHOT_API_KEY>"

Overview#

Permanently deletes a post that never reached a platform. That covers drafts, scheduled posts not yet fired, posts that failed outright, and posts still in flight that have not landed anywhere. Where the post is still cancellable on the platform queue, it is cancelled there too.

The one thing you cannot discard is a post that is already live on at least one account — including a partial post, where some accounts succeeded and others failed. Deleting those would destroy your only record of something public. Remove those on the platform itself.

Check is_discardable on the post rather than guessing from status: is_editable and is_discardable are different tests. A failed post can be discarded but not edited.

Endpoint
https://api.orshot.com/v1/social/posts/{postId}

Request#

JavaScript
await fetch("https://api.orshot.com/v1/social/posts/512", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
});
JSON
{
  "data": {
    "success": true
  }
}

Still discarding (202)#

When the platform is slow to confirm the cancel, you get 202. The discard finishes in the background. Check the post in a minute. It leaves the list once the platform confirms. If the cancel fails, the post shows why in error_message.

JSON
{
  "message": "Discarding. Check the post in a minute: it leaves the list once the platform confirms the cancel, or shows why if the cancel failed.",
  "data": {
    "success": true,
    "status": "deleting",
    "post_id": 512
  }
}

Error Responses#

Already live (400)#

JSON
{
  "error": "This post has already been published to at least one account",
  "message": "Discarding it would delete the record of a live post. Delete it on the platform instead."
}

Still being created (409)#

The post is still being sent to its platforms. Try again in a minute.

JSON
{
  "error": "This post is still being created",
  "message": "Try again in a minute, once it has finished publishing."
}

Discard in progress (409)#

JSON
{
  "error": "This post is being discarded",
  "message": "Wait for the discard to finish before changing it."
}

Cancel failed on the platform (502)#

The platform did not confirm the cancel, so the post was not discarded. It is still a draft or still scheduled. Try again.

JSON
{
  "error": "Failed to discard post",
  "message": "Could not cancel it on the platform, so it is still scheduled. Try again."
}

Not found (404)#

JSON
{
  "error": "Post not found"
}

Unauthorized (403)#

JSON
{
  "error": "Access Forbidden"
}

Rate Limits#

  • 20 requests per minute per workspace, shared by the publishing and post endpoints. Analytics has its own limit
Was this page helpful?

Ready to automate?

Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.

Get your API key
  • Image, PDF and video generation via API
  • Visual editor with AI and smart layouts
  • Zapier, Make, MCP and 40+ integrations
  • White-label embed for your own app
  • 100 free credits a month, no credit card required