=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::organization-admin_api_keys - Documentation for the /organization/admin_api_keys path.

=head1 OPERATIONS

=head2 GET /organization/admin_api_keys

=head3 admin-api-keys-list

  $client->admin_api_keys_list({
      body => { ... },
  });

List organization API keys

Retrieve a paginated list of organization admin API keys.

=head4 Path/query parameters

=over

=item * C<after> (in query, optional, string)

=item * C<order> (in query, optional, string)

Allowed values: asc, desc

Default: asc

=item * C<limit> (in query, optional, integer)

Default: 20

=back

=head4 Responses

B<200 - A list of organization API keys.>

Content-Type: application/json

Example:

    {
       "data" : [
          "{\n  \"object\": \"organization.admin_api_key\",\n  \"id\": \"key_abc\",\n  \"name\": \"Main Admin Key\",\n  \"redacted_value\": \"sk-admin...xyz\",\n  \"created_at\": 1711471533,\n  \"last_used_at\": 1711471534,\n  \"owner\": {\n    \"type\": \"user\",\n    \"object\": \"organization.user\",\n    \"id\": \"user_123\",\n    \"name\": \"John Doe\",\n    \"created_at\": 1711471533,\n    \"role\": \"owner\"\n  }\n}\n"
       ],
       "first_id" : "key_abc",
       "has_more" : false,
       "last_id" : "key_xyz",
       "object" : "list"
    }

=head2 POST /organization/admin_api_keys

=head3 admin-api-keys-create

  $client->admin_api_keys_create({
      body => { ... },
  });

Create an organization admin API key

Create a new admin-level API key for the organization.

=head4 Request body

Content-Type: application/json

Properties:

=over

=item * C<name> (string, required)

=back

Example:

    {
       "name" : "New Admin Key"
    }

=head4 Responses

B<200 - The newly created admin API key.>

Content-Type: application/json

Example:

    {
       "created_at" : 1711471533,
       "id" : "key_abc",
       "last_used_at" : 1711471534,
       "name" : "Administration Key",
       "object" : "organization.admin_api_key",
       "owner" : {
          "created_at" : 1711471533,
          "id" : "sa_456",
          "name" : "My Service Account",
          "object" : "organization.user",
          "role" : "owner",
          "type" : "user"
       },
       "redacted_value" : "sk-admin...def",
       "value" : "sk-admin-1234abcd"
    }

=head1 SCHEMAS

=head2 AdminApiKey

Properties:

=over

=item * C<created_at> (integer, required) - The Unix timestamp (in seconds) of when the API key was created

=item * C<id> (string, required) - The identifier, which can be referenced in API endpoints

=item * C<last_used_at> (anyOf)

=item * C<name> (anyOf) - The name of the API key

=item * C<object> (string, required) - The object type, which is always C<organization.admin_api_key>

Allowed values: organization.admin_api_key

=item * C<owner> (object, required)

=item * C<redacted_value> (string, required) - The redacted value of the API key

=back

=head2 AdminApiKeyCreateResponse

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

=head2 ApiKeyList

Properties:

=over

=item * C<data> (array of AdminApiKey, required)

=item * C<first_id> (anyOf)

=item * C<has_more> (boolean, required)

=item * C<last_id> (anyOf)

=item * C<object> (string, required)

Allowed values: list

=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
