curl --request POST \
--url https://api.example.com/users \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"role": {},
"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": {}
}
'{
"message": "<string>",
"newUser": {
"id_user": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"role": {},
"createdAt": {},
"updatedAt": {}
}
}curl --request POST \
--url https://api.example.com/users \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"role": {},
"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": {}
}
'{
"message": "<string>",
"newUser": {
"id_user": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"password": "<string>",
"role": {},
"createdAt": {},
"updatedAt": {}
}
}firstName in camelCase)lastName in camelCase)ADMIN, JURY, PRODUCER (default: PRODUCER)birthDate in camelCase). Format: YYYY-MM-DDpostalCode in camelCase)ACTOR, DIRECTOR, PRODUCER, WRITER, OTHERPar un ami, Vu une publicité du festival, Via le site internet ou application de l'IA (or knownByMarsAi in camelCase)first_name) and camelCase (e.g., firstName) field names for compatibility.curl -X POST https://api.marsai.com/users \
-H "Content-Type: application/json" \
-d '{
"firstName": "Alice",
"lastName": "Martin",
"email": "alice.martin@example.com",
"password": "SecurePass123!",
"role": "PRODUCER",
"phone": "+33123456789",
"mobile": "+33612345678",
"birthDate": "1990-05-15",
"street": "123 Rue de la Paix",
"postalCode": "75001",
"city": "Paris",
"country": "France",
"biography": "Award-winning independent filmmaker",
"job": "DIRECTOR",
"portfolio": "https://alicemartin.com",
"instagram": "@alicemartin",
"linkedin": "alice-martin",
"knownByMarsAi": "Par un ami"
}'
Show User Object
ADMIN, JURY, PRODUCER{
"message": "Utilisateur créé avec succès",
"newUser": {
"id_user": 1,
"first_name": "Alice",
"last_name": "Martin",
"email": "alice.martin@example.com",
"password": "$2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy",
"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": "PRODUCER",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
}
{
"message": "Cet utilisateur existe déjà",
"user": {
"id_user": 1,
"first_name": "Alice",
"last_name": "Martin",
"email": "alice.martin@example.com",
"role": "PRODUCER"
}
}
{
"error": "Données manquantes"
}
{
"error": "Tous les champs sont requis"
}
{
"error": "Erreur base de données",
"details": "Validation error message"
}
first_name, last_name, email, passwordnullPRODUCER if not specified