Skip to main content
Deletes content and all associated files from Cloudinary. This endpoint requires admin authentication.
This endpoint requires admin authentication. Include a valid JWT token in the Authorization header: Bearer <token>

Path Parameters

contentId
string
required
The unique identifier of the content to delete

Request Headers

Authorization
string
required
Bearer token for admin authentication

Response

message
string
Success message

Error Responses

404 Not Found

{
  "error": "Content not found"
}

401 Unauthorized

Returned when authentication token is missing or invalid.

403 Forbidden

Returned when the authenticated user is not an admin.

500 Internal Server Error

{
  "error": "Error message"
}
This operation is irreversible. The content record will be deleted from the database, and all associated files (content file and thumbnail) will be permanently deleted from Cloudinary.
The endpoint automatically handles different resource types based on content type:
  • PDF files are deleted as ‘image’ resource type
  • Video and audio files are deleted as ‘video’ resource type
  • Thumbnails are always deleted as ‘image’ resource type
{
  "message": "Content and files deleted successfully"
}

Build docs developers (and LLMs) love