Sample - OpenAI API
POST/chatkit/sessions/{session_id}/cancel

Cancel a ChatKit session

Cancel an active ChatKit session and return its most recent metadata.

Cancelling prevents new requests from using the issued client secret.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
session_idstringrequired
Unique identifier for the ChatKit session to cancel.

1 status code
200Success
idstringrequired
Identifier for the ChatKit session.
objectstringrequired
Type discriminator that is always `chatkit.session`.
Allowed:chatkit.sessionDefault:chatkit.session
expires_atintegerrequired
Unix timestamp (in seconds) for when the session expires.
client_secretstringrequired
Ephemeral client secret that authenticates session requests.
workflowobjectrequired
Workflow metadata for the session.
userstringrequired
User identifier associated with the session.
rate_limitsobjectrequired
Resolved rate limit values.
max_requests_per_1_minuteintegerrequired
Convenience copy of the per-minute request limit.
statusstringrequired
Current lifecycle state of the session.
Allowed:activeexpiredcancelled
chatkit_configurationobjectrequired
Resolved ChatKit feature configuration for the session.