=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::chatkit-sessions-session_id-cancel - Documentation for the /chatkit/sessions/{session_id}/cancel path.

=head1 OPERATIONS

=head2 POST /chatkit/sessions/{session_id}/cancel

=head3 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.

=head4 Path/query parameters

=over

=item * C<session_id> (in path, required, string) - Unique identifier for the ChatKit session to cancel.

=back

=head4 Responses

B<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"
       }
    }

=head1 SCHEMAS

=head2 ChatSessionAutomaticThreadTitling

Properties:

=over

=item * C<enabled> (boolean, required) - Whether automatic thread titling is enabled.

=back

=head2 ChatSessionChatkitConfiguration

Properties:

=over

=item * C<automatic_thread_titling> (ChatSessionAutomaticThreadTitling, required) - Automatic thread titling preferences.

See L</ChatSessionAutomaticThreadTitling> below for shape.

=item * C<file_upload> (ChatSessionFileUpload, required) - Upload settings for the session.

See L</ChatSessionFileUpload> below for shape.

=item * C<history> (ChatSessionHistory, required) - History retention configuration.

See L</ChatSessionHistory> below for shape.

=back

=head2 ChatSessionFileUpload

Properties:

=over

=item * C<enabled> (boolean, required) - Indicates if uploads are enabled for the session.

=item * C<max_file_size> (anyOf, required)

=item * C<max_files> (anyOf, required)

=back

=head2 ChatSessionHistory

Properties:

=over

=item * C<enabled> (boolean, required) - Indicates if chat history is persisted for the session.

=item * C<recent_threads> (anyOf, required)

=back

=head2 ChatSessionRateLimits

Properties:

=over

=item * C<max_requests_per_1_minute> (integer, required) - Maximum allowed requests per one-minute window.

=back

=head2 ChatSessionResource

Properties:

=over

=item * C<chatkit_configuration> (ChatSessionChatkitConfiguration, required) - Resolved ChatKit feature configuration for the session.

See L</ChatSessionChatkitConfiguration> below for shape.

=item * C<client_secret> (string, required) - Ephemeral client secret that authenticates session requests.

=item * C<expires_at> (integer, required) - Unix timestamp (in seconds) for when the session expires.

=item * C<id> (string, required) - Identifier for the ChatKit session.

=item * C<max_requests_per_1_minute> (integer, required) - Convenience copy of the per-minute request limit.

=item * C<object> (string, required) - Type discriminator that is always C<chatkit.session> .

Allowed values: chatkit.session

Default: chatkit.session

=item * C<rate_limits> (ChatSessionRateLimits, required) - Resolved rate limit values.

See L</ChatSessionRateLimits> below for shape.

=item * C<status> (ChatSessionStatus, required) - Current lifecycle state of the session.

See L</ChatSessionStatus> below for shape.

=item * C<user> (string, required) - User identifier associated with the session.

=item * C<workflow> (ChatkitWorkflow, required) - Workflow metadata for the session.

See L</ChatkitWorkflow> below for shape.

=back

=head2 ChatSessionStatus

See L<https://platform.openai.com/docs/api-reference> for details.

=head2 ChatkitWorkflow

Properties:

=over

=item * C<id> (string, required) - Identifier of the workflow backing the session.

=item * C<state_variables> (anyOf, required)

=item * C<tracing> (ChatkitWorkflowTracing, required) - Tracing settings applied to the workflow.

See L</ChatkitWorkflowTracing> below for shape.

=item * C<version> (anyOf, required)

=back

=head2 ChatkitWorkflowTracing

Properties:

=over

=item * C<enabled> (boolean, required) - Indicates whether tracing is enabled.

=back

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 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.

=cut
