NAME
OpenAPI::Client::OpenAI::Path::chatkit-sessions-session_id-cancel - Documentation for the /chatkit/sessions/{session_id}/cancel path.
OPERATIONS
POST /chatkit/sessions/{session_id}/cancel
CancelChatSessionMethod
$client->cancel_chat_session_method({
body => { ... },
});
Cancel an active ChatKit session and return its most recent metadata.
Cancelling prevents new requests from using the issued client secret.
Path/query parameters
session_id(in path, required, string) - Unique identifier for the ChatKit session to cancel.
Responses
200 - Success
Content-Type: application/json
Example:
{
"chatkit_configuration" : {
"automatic_thread_titling" : {
"enabled" : true
},
"file_upload" : {
"enabled" : true,
"max_file_size" : 16,
"max_files" : 20
},
"history" : {
"enabled" : true,
"recent_threads" : 10
}
},
"client_secret" : "ek_token_123",
"expires_at" : 1712349876,
"id" : "cksess_123",
"max_requests_per_1_minute" : 60,
"object" : "chatkit.session",
"rate_limits" : {
"max_requests_per_1_minute" : 60
},
"status" : "cancelled",
"user" : "user_789",
"workflow" : {
"id" : "workflow_alpha",
"version" : "2024-10-01T00:00:00.000Z"
}
}
SCHEMAS
ChatSessionAutomaticThreadTitling
Properties:
enabled(boolean, required) - Whether automatic thread titling is enabled.
ChatSessionChatkitConfiguration
Properties:
automatic_thread_titling(ChatSessionAutomaticThreadTitling, required) - Automatic thread titling preferences.See "ChatSessionAutomaticThreadTitling" below for shape.
file_upload(ChatSessionFileUpload, required) - Upload settings for the session.See "ChatSessionFileUpload" below for shape.
history(ChatSessionHistory, required) - History retention configuration.See "ChatSessionHistory" below for shape.
ChatSessionFileUpload
Properties:
enabled(boolean, required) - Indicates if uploads are enabled for the session.max_file_size(anyOf, required)max_files(anyOf, required)
ChatSessionHistory
Properties:
enabled(boolean, required) - Indicates if chat history is persisted for the session.recent_threads(anyOf, required)
ChatSessionRateLimits
Properties:
max_requests_per_1_minute(integer, required) - Maximum allowed requests per one-minute window.
ChatSessionResource
Properties:
chatkit_configuration(ChatSessionChatkitConfiguration, required) - Resolved ChatKit feature configuration for the session.See "ChatSessionChatkitConfiguration" below for shape.
client_secret(string, required) - Ephemeral client secret that authenticates session requests.expires_at(integer, required) - Unix timestamp (in seconds) for when the session expires.id(string, required) - Identifier for the ChatKit session.max_requests_per_1_minute(integer, required) - Convenience copy of the per-minute request limit.object(string, required) - Type discriminator that is alwayschatkit.session.Allowed values: chatkit.session
Default: chatkit.session
rate_limits(ChatSessionRateLimits, required) - Resolved rate limit values.See "ChatSessionRateLimits" below for shape.
status(ChatSessionStatus, required) - Current lifecycle state of the session.See "ChatSessionStatus" below for shape.
user(string, required) - User identifier associated with the session.workflow(ChatkitWorkflow, required) - Workflow metadata for the session.See "ChatkitWorkflow" below for shape.
ChatSessionStatus
See https://platform.openai.com/docs/api-reference for details.
ChatkitWorkflow
Properties:
id(string, required) - Identifier of the workflow backing the session.state_variables(anyOf, required)tracing(ChatkitWorkflowTracing, required) - Tracing settings applied to the workflow.See "ChatkitWorkflowTracing" below for shape.
version(anyOf, required)
ChatkitWorkflowTracing
Properties:
enabled(boolean, required) - Indicates whether tracing is enabled.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.