Customer Logout API
This endpoint allows customers to log out and invalidate their current session tokens.Logout Flow
The logout process follows these steps:- Client submits a request with their current access token
- Server invalidates the token
- Server returns a success response
- Client removes stored tokens
Request Headers
Request Example
allSessions
to true
will log out the user from all active sessions across devices.
Response Example
Error Codes
Code | Description |
---|---|
401 | Invalid or expired token |
403 | Forbidden action |
Security Considerations
- Always invalidate tokens on the server side
- Clear tokens from client storage after logout
- Consider implementing a token blacklist for additional security
Related Endpoints
Headers
Tenant identifier for multi-tenant operations
Forwarded client IP address
Client user agent information
Body
application/json
Logout request details
JWT session token to be invalidated
Example:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."