Get authentication status
Authentication
Authentication Status
Check the current authentication status and session details.
GET
Get authentication status
Validates an API key and returns information about the authenticated organisation. This endpoint is used for verifying API key validity and retrieving organisation context before making other API calls.
Best Practices
- Key Validation: Call this endpoint when initialising API clients to ensure your credentials are valid.
- Error Handling: Check the
is_activefield to ensure the key hasn’t been revoked. - Caching: Cache validation results briefly (5-10 minutes) to avoid redundant network calls.
- Organisation Context: Use the
organisation_idto validate multi-tenant application context.
Response
200 - application/json
Authentication status (returns user session info if authenticated with JWT, API key info if authenticated with API key, or type: 'none' if not authenticated)
Available options:
user Example:
"user"
Whether multi-factor authentication is complete
Example:
true
Authentication methods completed for this session
Available options:
password, email-otp, device-trust Example:
User verification stage: unverified (password only), email_verified (password + OTP), verified (admin approved), or administrator
Available options:
unverified, email_verified, verified, administrator Example:
"email_verified"
Example:
"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9..."