Logout Endpoint
Logs out the user by invalidating the currently active authentication token. After a successful logout, a new token must be generated to regain access to the API.
HTTP Method & URL
-
Method: POST
-
URL:
{{host}}/api/v2/api_generation/logout
Description
This endpoint logs the user out of the currently active authentication session by invalidating the token used for API access. Once this endpoint is called, the token can no longer be used for authenticated requests. To continue using the API, the user must authenticate again and obtain a new token.
Request
Headers
| Header Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for the current user session. |
| Content-Type | string | Yes | Should be set to application/json. |
Example:
plaintextAuthorization: Bearer <user-token>Content-Type: application/json
Body
- None.
This endpoint does not require a request body.
Response
Status Codes
| Status Code | Description |
|---|---|
| 204 No Content | Logout successful. No response body is returned. |
| 401 Unauthorized | The provided token is invalid or expired. |
| 500 Internal Server Error | An unexpected error occurred. |
Response Body
- None.
The response will not contain a body. The status code indicates the result of the operation.
Usage Notes
-
Ensure the
Authorizationheader contains a valid bearer token for the session you wish to terminate. -
After a successful logout (
204 No Content), the token used in the request is invalidated and cannot be used for further API calls. -
If you attempt to use the same token after logout, you will receive a
401 Unauthorizedresponse. -
To regain access, authenticate again to obtain a new token.
-
No request body is required or accepted for this endpoint.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
