curl --request POST \
--url https://api.example.com/api/auth/callback/credentials \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"organizationId": "<string>"
}
'{
"success": true,
"user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"roles": [
{}
],
"permissions": [
{}
],
"organizationId": {},
"organizationName": {}
},
"error": "<string>",
"details": {}
}Authenticate a user and create a session
curl --request POST \
--url https://api.example.com/api/auth/callback/credentials \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"organizationId": "<string>"
}
'{
"success": true,
"user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"roles": [
{}
],
"permissions": [
{}
],
"organizationId": {},
"organizationName": {}
},
"error": "<string>",
"details": {}
}/api/auth/login-validation endpoint to validate user status:
curl -X POST https://your-domain.com/api/auth/login-validation \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"organizationId": "123e4567-e89b-12d3-a456-426614174000"
}'
| Status Code | Error Code | Description |
|---|---|---|
| 401 | - | Invalid credentials or authentication failed |
| 409 | USER_NOT_IN_ORG | User does not belong to the specified organization |
| 409 | ORG_NOT_AVAILABLE | Organization is inactive or deleted |
| 409 | USER_NOT_ACTIVE | User account status is not ACTIVE (e.g., PENDING_VERIFICATION) |
| 429 | - | Account locked due to failed login attempts (5+ failures locks for 30 minutes) |
lastLoginAt is updatedcurl -X POST https://your-domain.com/api/auth/callback/credentials \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "SecurePass123",
"organizationId": "123e4567-e89b-12d3-a456-426614174000"
}'