Close Session
This endpoint closes an existing session and returns the session ID. A valid session ID must be provided to close the session.
Endpoint
POST /session/close
Parameters
Query Parameters
session_id (required):
Type:
stringDescription: Specify the session ID of the session to be closed. This field is mandatory.
Response
Response Parameters
session_id (required):
Type:
stringDescription: The unique identifier for the closed session.
error (optional):
Type:
stringDescription: Error message if something goes wrong during session closure.
Error Responses
400 (Invalid Request):
Description: Returned when the session ID is not provided.
500 (Internal Server Error):
Description: Returned when the server encounters an unexpected condition.
Authorizations
Authorization (required):
Type:
stringLocation: Header
Description: Access token received from the authorization server in the OAuth 2.0 flow.
Body
Content Type: application/json
session_id:
Type:
stringDescription: The ID of the session to be closed.
Example Request
Response Example
200 - application/json
Status Options
active: Session is currently active.
closed: Session has been closed.
error: An error occurred during the session.
timed_out: Session timed out after exceeding the timeout period.
Important Notes
Ensure a valid
session_idis provided when closing a session.Closing a session ensures no additional billing for that session.
Last updated