cURL
Authentication
Logout
POST
cURL
Overview
This endpoint terminates the current user session and invalidates the authentication token. After a successful logout, the user will need to authenticate again to access protected resources.Authentication
This endpoint requires API key authentication via theapikey header.
Required Headers:
-
apikey: Your API key for authentication -
Content-Type: application/json -
Accept: application/json
Request Details
Method:POST
Endpoint: {{baseUrl}}/api/logout
Request Body: Not required
Expected Response
Upon successful logout, the API will return a confirmation response indicating that the session has been terminated and the authentication token has been invalidated.Usage Notes
- This endpoint should be called when a user explicitly logs out of the application
- After logout, any subsequent requests using the same authentication token will fail
-
The
{{token}}variable will no longer be valid after this operation - Best practice: Clear any stored authentication tokens from client-side storage after calling this endpoint
Error Scenarios
- 401 Unauthorized: Invalid or missing API key
- 403 Forbidden: API key does not have permission to perform this action
- 500 Internal Server Error: Server-side error during logout process

