Cancel Session

View as Markdown
Forcefully cancel and close an active flow session, transition its status to `CLIENT_CANCELLED` (which can be monitored via [Get Session State](api:GET/es-public-administration/v1/manager/{session_id})), and prevent further customer interactions with the widget. **Key Technical Details:** - **No Request Body Required**: This operation does not accept a payload; it automatically defaults the cancellation reason to `CLIENT_CANCELLED` with empty feedback metadata. - **Idempotency (304)**: If the session is already finalized (completed, failed, or cancelled), the endpoint transitions nothing and returns `304 Not Modified`. - **Concurrency Lock (504)**: Acquires an exclusive database lock on the session. If the lock cannot be acquired within a reasonable time, it returns `504 Gateway Timeout`. > This endpoint needs to be executed with an app secret, so should always be used in server side without exposing the secret to customers.

Authentication

X-APP-SECRETstring
Application Secret

Path parameters

session_idstringRequiredformat: "ObjectId"
Session ID to fetch

Response

204 No Content
Cancelled Successfully

Errors

404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
504
Gateway Timeout Error