Skip to main content

Delete Post

DELETE /developers/v1/posts/{id}

Permanently cancels and deletes a scheduled post. This action cannot be undone.

Request

Path parameters

ParameterTypeRequiredDescription
idintegerYesThe ID of the post to delete, as returned by Create Post or List Posts.

Headers

HeaderRequiredDescription
X-API-KEYYes*Your personal API key.
AuthorizationYes*Bearer token: Bearer sp_tok_xxxxxxx.

*Provide one of the two authentication headers.

No request body is required.

Example request

curl -X DELETE https://api.schedpilot.com/developers/v1/posts/8841 \
-H "X-API-KEY: smm_4a9f3c1e8b205d7a6e0f2c49b8d3a15f"

Response

Status: 200 OK

Response fields

FieldTypeDescription
messagestringConfirmation that the post was deleted.

Example response

{
"message": "Post 8841 has been deleted successfully."
}

Error responses

StatusDescription
404 Not FoundNo post with the given ID exists, or the post belongs to a different user account.
409 ConflictAt least one connected account has already published this post. Published posts cannot be deleted.
401 UnauthorizedMissing or invalid authentication credentials.
429 Too Many RequestsWrite rate limit exceeded (30 requests/hour).

409 example response

{
"error": "This post has already been published to one or more accounts and cannot be deleted."
}

Notes

  • Permanent action. Deletion cannot be undone. The post and all associated scheduling data are removed immediately.
  • Published posts are protected. If any account within the post has a posted_status of posted, the entire delete request is rejected with a 409 Conflict. This prevents accidental deletion of posts whose analytics you may still want to retrieve via Post Analytics.
  • Partial delivery edge case. If a post has been delivered to some accounts but not others (e.g. one platform failed), the 409 still applies as long as at least one account successfully published. To stop future delivery attempts on failed platforms, use the dashboard at app.schedpilot.com instead.
  • ID ownership. The 404 response is returned both when a post does not exist and when it exists but belongs to another user. This prevents leaking information about other users' post IDs.