Skip to main content
POST
/
events
curl -X POST https://api.marsai.com/events \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Directors Panel Discussion",
    "description": "A panel discussion featuring award-winning directors",
    "start_date": "2026-03-17T14:00:00Z",
    "end_date": "2026-03-17T16:00:00Z",
    "location": "Conference Room B",
    "event_type": "CONFERENCE"
  }'
{
  "message": "Evenment créée",
  "newEvent": {
    "id_event": 3,
    "name": "Directors Panel Discussion",
    "description": "A panel discussion featuring award-winning directors",
    "start_date": "2026-03-17T14:00:00Z",
    "end_date": "2026-03-17T16:00:00Z",
    "location": "Conference Room B",
    "event_type": "CONFERENCE",
    "createdAt": "2026-03-07T11:00:00Z",
    "updatedAt": "2026-03-07T11:00:00Z"
  }
}
This endpoint requires ADMIN authentication.
Creates a new event for the film festival.

Body Parameters

name
string
required
Name of the event (max 255 characters)
description
string
required
Detailed description of the event
start_date
date
required
Event start date and time
end_date
date
required
Event end date and time
location
string
required
Event location (max 255 characters)
event_type
enum
required
Type of event. Must be one of: CONFERENCE, WORKSHOP, MEETUP, WEBINAR
If an event with the same name already exists, the endpoint will return the existing event instead of creating a duplicate.

Response

message
string
Success message: “Evenment créée” or “Evenement déjà existant”
newEvent
object
The created event object
curl -X POST https://api.marsai.com/events \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Directors Panel Discussion",
    "description": "A panel discussion featuring award-winning directors",
    "start_date": "2026-03-17T14:00:00Z",
    "end_date": "2026-03-17T16:00:00Z",
    "location": "Conference Room B",
    "event_type": "CONFERENCE"
  }'
{
  "message": "Evenment créée",
  "newEvent": {
    "id_event": 3,
    "name": "Directors Panel Discussion",
    "description": "A panel discussion featuring award-winning directors",
    "start_date": "2026-03-17T14:00:00Z",
    "end_date": "2026-03-17T16:00:00Z",
    "location": "Conference Room B",
    "event_type": "CONFERENCE",
    "createdAt": "2026-03-07T11:00:00Z",
    "updatedAt": "2026-03-07T11:00:00Z"
  }
}

Error Responses

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