Log out
Users
Log out
Logout API Documentation
API Overview
-
Name: Logout API
-
Description: This API endpoint allows users to log out by invalidating their session or token.
-
Method:
Delete -
Endpoint URL:
/v1/logout
Authentication
-
Authentication Required: Yes
-
The user must be authenticated (i.e., must include a valid token) to successfully log out.
Request
HTTP Method:
Delete
URL:
/v1/logout
Headers:
| Header Name | Description | Required | Example |
|---|---|---|---|
Authorization | Bearer token used to authenticate the user | Yes | Bearer |
Content-Type | The content type of the request | No | application/json |
Note: The token should be passed in the Authorization header as a Bearer token.
Request Body:
No request body is necessary for this endpoint.
Responses
Success Response:
- Status Code:
200 OK
If the logout is successful, the response confirms that the user has been logged out.
DELETE
Log out
Headers
Response
200 - application/json
OK
The response is of type object.