Skip to main content
DELETE
/
movies
/
:id
Delete Movie
curl --request DELETE \
  --url https://api.example.com/movies/:id \
  --header 'Authorization: <authorization>'
{
  "message": "Film supprimé"
}

Overview

Permanently deletes a movie from the database. This action cannot be undone.

Authentication

Authorization
string
required
Bearer token for authenticated user with ADMIN role
Only administrators can delete movies. Producers cannot delete their own submissions.

Path Parameters

id
integer
required
The unique identifier of the movie to delete

Response

message
string
Success confirmation message
{
  "message": "Film supprimé"
}

Error Responses

{
  "error": "Film non trouvé"
}
{
  "error": "Internal server error"
}

Example Request

curl -X DELETE https://api.marsai.com/movies/24 \
  -H "Authorization: Bearer ADMIN_TOKEN"

Notes

  • Permanent deletion: This operation cannot be undone
  • Admin only: Only users with ADMIN role can delete movies
  • Database cascade: Related associations (categories, collaborators, juries) are automatically removed
  • Files not deleted: The actual media files (videos, images, subtitles) in the /uploads directory are NOT automatically deleted and must be cleaned up separately if needed
  • Awards and votes: Related awards and votes may also be affected depending on database constraints
Deleting a movie removes all associated data including:
  • Category associations
  • Collaborator associations
  • Jury assignments
  • Awards (if any)
  • Votes (if any)
Ensure you have a backup before deleting important movies.