Authentication
Authenticate and get a JWT
Exchange an email and password for an access token (JWT). Use the token in the
Authorization: Bearer header on subsequent requests.
Endpoint: POST /account/auth
Content-Type: application/json
Request body
email(string, required) — user emailpassword(string, required) — user password
Example
curl -X POST https://docs.maison-du-pre-etat-date.fr/api/account/auth -H "Content-Type: application/json" -H "X-Auth-Key: $API_KEY" -d '{
"email": "john@example.com",
"password": "secret"
}'
Responses
200 OK
{
"message": "Authenticated",
"payload": { "access_token": "..." },
"success": true
}
400 Bad Request
Typical causes: missing email/password or invalid/missing API key.
{ "message": "Invalid API key", "payload": null, "success": false }
401 Unauthorized
{ "message": "Invalid credentials", "payload": null, "success": false }
Notes
- Always include
X-Auth-Keyalong withAuthorization: Bearer <token>. - Tokens expire; refresh by re-authenticating.