Skip to main content
POST
/
api
/
v1
/
auth
/
login
curl -X POST https://api.gosentrix.io/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePassword123!"
  }'
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 900,
  "user": {
    "id": "user-123",
    "email": "[email protected]",
    "email_verified": true
  }
}
Authenticate with email and password to obtain access and refresh tokens.
curl -X POST https://api.gosentrix.io/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePassword123!"
  }'
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 900,
  "user": {
    "id": "user-123",
    "email": "[email protected]",
    "email_verified": true
  }
}

Request Body

email
string
required
User email address
password
string
required
User password

Response

access_token
string
JWT access token (valid for 15 minutes)
refresh_token
string
JWT refresh token (valid for 7 days)
expires_in
integer
Access token expiration time in seconds
user
object
User object with id, email, and verification status

Errors

401
object
Invalid credentials
403
object
Account locked or email not verified
429
object
Rate limit exceeded (too many login attempts)

Security Notes

  • Failed login attempts are rate-limited
  • MFA may be required if enabled
  • See MFA Verify if MFA is enabled