Skip to main content
DELETE
/
posts
/
{slug}
Delete Blog Post via Write API
curl --request DELETE \
  --url https://api.buttercms.com/v2/posts/{slug}/ \
  --header 'Authorization: <api-key>'
{
  "detail": "Authentication credentials were not provided"
}
Delete an existing blog post using a soft delete operation that marks the post as deleted while preserving the content for potential recovery. This approach ensures data safety while removing posts from public visibility.
Important: You must append a trailing slash to the end of the blog post slug in the URL path: /v2/posts/your-post-slug/. This is required for the endpoint to function correctly.
Soft Delete Behavior: The post is marked as deleted in the system and will no longer appear in blog listings, search results, RSS feeds, or other public endpoints. However, the actual content and metadata are preserved in the database, allowing for potential recovery through support channels if needed. Access Control: You can only delete blog posts that belong to your organization. Attempting to delete posts from other organizations will result in a 404 Not Found response, ensuring proper data isolation and security.

Authorizations

Authorization
string
header
required

Write-enabled API token required for creating content.

The API token you use for reading from the ButterCMS API will not allow you to create content in the API. For this you will need to use a different write-enabled token. Chat or email support@buttercms.com to get yours.

Set the Authorization header to Token your_write_api_token.

Example: Authorization: Token abc123def456

Your write-enabled token should never be used anywhere it would be exposed, e.g. in client-side JavaScript.

Path Parameters

slug
string
required

The slug of the blog post to delete.

Important: The URL must end with a trailing slash (/v2/posts/your-slug/).

Maximum string length: 100

Response

No Content - Blog Post Successfully Deleted

The blog post has been successfully deleted (soft delete). The response body is empty.

Note: This is a soft delete operation. The post is marked as deleted but not physically removed from the system.