Authenticate a user and receive a JWT token.
Request Body
User’s email address. Must be a valid email format and not exceed 100 characters.
User’s password. Must be between 8 and 255 characters.
Response
The user’s unique identifier (UUID).
The user’s email address.
The user’s role ID indicating their access level.
JWT token for authenticating subsequent requests. Include this in the Authorization header as Bearer {token}.
curl -X POST https://api.arca.example.com/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "securepassword123"
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "John Doe",
"email": "[email protected]",
"roleId": 2,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}