API reference · Auth
POST/api/auth/validate-token

Validate session token

Checks whether the request carries a valid Auth.js session token, either in the session cookie or in an Authorization: Bearer header. A valid token returns the user type and tenant copied from the session JWT. No request body is read.

Header parameters

authorizationstringOptional
Optional Bearer token fallback. The route also accepts the Auth.js session token cookie.

Response body

Success response 200 · schema ValidateTokenSuccessResponse

isValidbooleanRequired
Indicates that the request contains a valid Auth.js session token.
Enum: true
userTypestringRequired
User classification from users.user_type in the session JWT.
Enum: internalclient
tenantstringRequired
Tenant identifier from the session JWT.

Response codes

200
Session token is valid.
401
No valid session token was found.
500
Unexpected token validation error.