Delete Post
Delete a draft or scheduled post. Published posts cannot be deleted.
Delete a draft or scheduled post. Published posts cannot be deleted.
/api/v1/post/delete/{postId}Delete a draft or scheduled post that hasn't been published yet.
Replace {postId} with the postId returned from the Publish endpoint.
curl --request DELETE \
--url https://dopost.co/api/v1/post/delete/<postId> \
--header 'x-api-key: <apiKey>'curl --request DELETE \
--url https://dopost.co/api/v1/post/delete/<postId> \
--header 'x-api-key: <apiKey>'{
"success": true,
"deletedPostId": "cm3abc123def456"
}{
"success": true,
"deletedPostId": "cm3abc123def456"
}Only posts with the following statuses can be deleted:
| Status | Deletable | Description |
|---|---|---|
DRAFT | Yes | Post created but not yet published or scheduled |
SCHEDULED | Yes | Post scheduled for future publishing. The schedule will be cancelled |
PUBLISHED | No | Post already published to the platform |
FAILED | No | Post that failed during publishing |
Published posts cannot be deleted through the API. Only draft and scheduled posts are eligible for deletion.
| Status | Error | Cause |
|---|---|---|
400 | Post has already been published and cannot be deleted | Attempting to delete a published post |
401 | Invalid or missing API key | Bad or missing x-api-key header |
403 | API key does not have permission for this action | API key lacks the required scope for this endpoint |
404 | Post not found | Invalid postId or post belongs to another workspace |
429 | Rate limit exceeded | Too many requests. Check X-RateLimit-* response headers and retry after the indicated time |