Customer Logout
API endpoint for customer logout and session termination
POST
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
Setting 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
The body is of type object
.
Response
200
application/json
Logout successful
The response is of type object
.