Skip to main content
POST
/
awards
/
:id_movie
curl -X POST https://api.marsai.com/awards/5 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "award_name": "Best Cinematography"
  }'
{
  "message": "Award créé",
  "newAward": {
    "id_award": 3,
    "award_name": "Best Cinematography",
    "id_movie": 5,
    "createdAt": "2026-03-07T10:30:00Z",
    "updatedAt": "2026-03-07T10:30:00Z"
  }
}
This endpoint requires ADMIN authentication.
Creates a new award and assigns it to a specific movie.

Path Parameters

id_movie
integer
required
The ID of the movie to assign the award to

Body Parameters

award_name
string
required
Name of the award (max 100 characters)
If an award with the same name already exists, the endpoint will return the existing award instead of creating a duplicate.

Response

message
string
Success message: “Award créé” or “Award déjà existant”
newAward
object
The created award object
award
object
Returned when award already exists instead of newAward
curl -X POST https://api.marsai.com/awards/5 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "award_name": "Best Cinematography"
  }'
{
  "message": "Award créé",
  "newAward": {
    "id_award": 3,
    "award_name": "Best Cinematography",
    "id_movie": 5,
    "createdAt": "2026-03-07T10:30:00Z",
    "updatedAt": "2026-03-07T10:30:00Z"
  }
}

Error Responses

400 Bad Request
Missing required fields
{
  "error": "Tous les champs doivent être remplis"
}