Sign in
POST/auth/loginNo auth
Exchanges a username and password for an access token, a refresh token and the session. Use a dedicated integration user whose role grants only the permissions your integration needs. Limited to 20 attempts per minute per client address.
Request body application/json
usernamerequiredstring | |
passwordrequiredstring | |
tenantCodestring | Needed only when signing in through the shared host. |
Responses
- 201OK
- 401Missing, invalid or expired access token.
- 422Validation failed; details lists each problem by field.
- 429Rate limit exceeded. Wait and retry.
curl -X POST "https://mawro.neuroskill.tech/api/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{
"username": "integration.payroll",
"password": "••••••••",
"tenantCode": "ACME"
}'const res = await fetch("https://mawro.neuroskill.tech/api/v1/auth/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"username": "integration.payroll",
"password": "••••••••",
"tenantCode": "ACME"
}),
});
const { data } = await res.json();import os, requests
res = requests.post(
"https://mawro.neuroskill.tech/api/v1/auth/login",
json={
"username": "integration.payroll",
"password": "••••••••",
"tenantCode": "ACME"
},
)
data = res.json()["data"] {
"username": "integration.payroll",
"password": "••••••••",
"tenantCode": "ACME"
}{
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"refreshToken": "rt_9f3c1a…",
"expiresIn": 3600,
"session": {
"user": {
"id": "f0b1c2d3-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"username": "integration.payroll",
"email": "integration@acme.example",
"displayName": "Payroll integration",
"locale": "en",
"timeZone": "UTC"
},
"tenant": {
"id": "c7d8e9f0-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
"tenantNumber": "T-0042",
"displayName": "Acme Hospitality",
"countryCode": "US",
"baseCurrency": "USD",
"timeZone": "America/New_York",
"enabledModules": [
"EMPLOYEE_MASTER",
"ATTENDANCE_TIME",
"LEAVE",
"PAYROLL"
]
},
"activeRoleContextId": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"permissions": [
"PAY_GL:VIEW",
"PAY_GL:EXPORT",
"PAY_AMOUNT:VIEW"
]
}
},
"meta": {
"correlationId": "6f1c2b9e-4d1a-4b7e-9f0e-2a7c5d3e8b41",
"timestamp": "2026-10-18T09:15:02.118Z"
}
}{
"error": {
"key": "CFG-001",
"type": "ERROR",
"message": "The session has expired. Sign in again.",
"statusCode": 401,
"correlationId": "6f1c2b9e-4d1a-4b7e-9f0e-2a7c5d3e8b41",
"timestamp": "2026-10-18T09:15:02.118Z",
"path": "/api/v1/…"
}
}