curl --request PUT \
--url https://api.example.com/users/:id \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"role": {}
}
'{
"id_user": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"mobile": "<string>",
"birth_date": "<string>",
"street": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"biography": "<string>",
"job": {},
"portfolio": "<string>",
"youtube": "<string>",
"instagram": "<string>",
"linkedin": "<string>",
"facebook": "<string>",
"tiktok": "<string>",
"known_by_mars_ai": {},
"role": {},
"createdAt": {},
"updatedAt": {}
}curl --request PUT \
--url https://api.example.com/users/:id \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"role": {}
}
'{
"id_user": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"mobile": "<string>",
"birth_date": "<string>",
"street": "<string>",
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"biography": "<string>",
"job": {},
"portfolio": "<string>",
"youtube": "<string>",
"instagram": "<string>",
"linkedin": "<string>",
"facebook": "<string>",
"tiktok": "<string>",
"known_by_mars_ai": {},
"role": {},
"createdAt": {},
"updatedAt": {}
}Authorization: Bearer <your_jwt_token>
id_user of the user to updatefirstName in camelCase). If not provided, keeps existing value.lastName in camelCase). If not provided, keeps existing value.ADMIN, JURY, PRODUCER. If not provided, keeps existing value.first_name) and camelCase (e.g., firstName) field names for compatibility. Only provided fields will be updated.curl -X PUT https://api.marsai.com/users/1 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"firstName": "Alice",
"lastName": "Martin-Durand",
"email": "alice.durand@example.com",
"role": "JURY"
}'
curl -X PUT https://api.marsai.com/users/1 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"password": "NewSecurePassword123!"
}'
ACTOR, DIRECTOR, PRODUCER, WRITER, OTHERADMIN, JURY, PRODUCER{
"id_user": 1,
"first_name": "Alice",
"last_name": "Martin-Durand",
"email": "alice.durand@example.com",
"password": "$2b$10$XYZ...",
"phone": "+33123456789",
"mobile": "+33612345678",
"birth_date": "1990-05-15T00:00:00.000Z",
"street": "123 Rue de la Paix",
"postal_code": "75001",
"city": "Paris",
"country": "France",
"biography": "Award-winning independent filmmaker",
"job": "DIRECTOR",
"portfolio": "https://alicemartin.com",
"instagram": "@alicemartin",
"linkedin": "alice-martin",
"known_by_mars_ai": "Par un ami",
"role": "JURY",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-03-07T14:45:00.000Z"
}
{
"error": "Token invalide ou manquant"
}
{
"error": "Accès interdit. Rôle ADMIN requis."
}
{
"error": "Utilisateur non trouvé"
}
{
"error": "Erreur base de données",
"details": "Validation error message"
}