Skip to content

Delete Blog

Use the following endpoint to delete a blog post via the API.

DELETE /api/v1/public/delete-blog/{blogId}

Include your API key in the Authorization header:

Terminal window
Authorization: Bearer YOUR_API_KEY
// Replace "YOUR_UNIQUE_BLOG_ID" with the actual Blog ID
// Endpoint: {API_ENDPOINTS.BLOGS.DELETE("YOUR_UNIQUE_BLOG_ID")}
fetch(`https://api.blogz.ai/api/v1/public/delete-blog/YOUR_UNIQUE_BLOG_ID`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer YOUR_API_KEY`,
}
})
.then(response => response.json()) // Expecting JSON data for a successful DELETE
.catch(error => console.error('Error deleting blog:', error));