Skip to main content
PUT
/
events
/
:id
curl -X PUT https://api.marsai.com/events/3 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Directors Panel Discussion - Extended",
    "location": "Main Auditorium",
    "end_date": "2026-03-17T17:00:00Z"
  }'
{
  "message": "Evenement mis à jour",
  "updatedEvent": {
    "id_event": 3,
    "name": "Directors Panel Discussion - Extended",
    "description": "A panel discussion featuring award-winning directors",
    "start_date": "2026-03-17T14:00:00Z",
    "end_date": "2026-03-17T17:00:00Z",
    "location": "Main Auditorium",
    "event_type": "CONFERENCE",
    "createdAt": "2026-03-07T11:00:00Z",
    "updatedAt": "2026-03-07T12:30:00Z"
  }
}
This endpoint requires ADMIN authentication.
Updates an existing event’s details.

Path Parameters

id_event
integer
required
The ID of the event to update

Body Parameters

name
string
Updated event name (max 255 characters)
description
string
Updated event description
start_date
date
Updated start date and time
end_date
date
Updated end date and time
location
string
Updated event location (max 255 characters)
event_type
enum
Updated event type. Must be one of: CONFERENCE, WORKSHOP, MEETUP, WEBINAR
All parameters are optional. Only provided fields will be updated.

Response

message
string
Success message: “Evenement mis à jour”
updatedEvent
object
The updated event object with all fields
curl -X PUT https://api.marsai.com/events/3 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Directors Panel Discussion - Extended",
    "location": "Main Auditorium",
    "end_date": "2026-03-17T17:00:00Z"
  }'
{
  "message": "Evenement mis à jour",
  "updatedEvent": {
    "id_event": 3,
    "name": "Directors Panel Discussion - Extended",
    "description": "A panel discussion featuring award-winning directors",
    "start_date": "2026-03-17T14:00:00Z",
    "end_date": "2026-03-17T17:00:00Z",
    "location": "Main Auditorium",
    "event_type": "CONFERENCE",
    "createdAt": "2026-03-07T11:00:00Z",
    "updatedAt": "2026-03-07T12:30:00Z"
  }
}

Error Responses

404 Not Found
Event not found
{
  "error": "Evenement non trouvé"
}
400 Bad Request
Missing event ID in URL
{
  "error": "ID manquant dans l'URL"
}