Skip to main content

Delete Blog Post

Delete an existing blog post.

HTTP Request

DELETE/api/blog/posts/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff or Admin
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the blog post to delete

Example Requests

1import requests
2response = requests.delete('http://www.example.com/api/blog/posts/1', headers={
3  'Authorization': 'Token <your_api_key>'
4})
5
6print(response.status_code)  # Should be 204 for successful deletion

Status Codes

CodeDescription
204Blog post deleted successfully
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — blog post does not exist
500Internal server error

Response Fields

FieldTypeDescription
NoneNoneNo response body returned