=encoding utf8

=head1 NAME

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

=head1 OPERATIONS

=head2 GET /organization/certificates

=head3 listOrganizationCertificates

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

List uploaded certificates for this organization.

=head4 Path/query parameters

=over

=item * C<limit> (in query, optional, integer) - A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.

Default: 20

=item * C<after> (in query, optional, string) - A cursor for use in pagination. C<after> is an object ID that defines your
place in the list. For instance, if you make a list request and receive 100
objects, ending with obj_foo, your subsequent call can include after=obj_foo
in order to fetch the next page of the list.

=item * C<order> (in query, optional, string) - Sort order by the C<created_at> timestamp of the objects. C<asc> for ascending
order and C<desc> for descending order.

Allowed values: asc, desc

Default: desc

=back

=head4 Responses

B<200 - Certificates listed successfully.>

Content-Type: application/json

Example:

    {
       "data" : [
          {
             "active" : false,
             "certificate_details" : {
                "expires_at" : 0,
                "valid_at" : 0
             },
             "created_at" : 0,
             "id" : "string",
             "name" : "string",
             "object" : "organization.certificate"
          }
       ],
       "first_id" : "cert_abc",
       "has_more" : false,
       "last_id" : "cert_abc",
       "object" : "list"
    }

=head2 POST /organization/certificates

=head3 uploadCertificate

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

Upload a certificate to the organization. This does B<not> automatically
activate the certificate.

Organizations can upload up to 50 certificates.

=head4 Responses

B<200 - Certificate uploaded successfully.>

Content-Type: application/json

Example:

    {
       "certificate_details" : {
          "content" : "-----BEGIN CERTIFICATE----- MIIGAjCCA...6znFlOW+ -----END CERTIFICATE-----",
          "expires_at" : 12345678,
          "valid_at" : 1234567
       },
       "created_at" : 1234567,
       "id" : "cert_abc",
       "name" : "My Certificate",
       "object" : "certificate"
    }

=head1 SCHEMAS

=head2 Certificate

Properties:

=over

=item * C<active> (boolean) - Whether the certificate is currently active at the specified scope. Not
returned when getting details for a specific certificate.

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

=item * C<created_at> (integer, required) - The Unix timestamp (in seconds) of when the certificate was uploaded.

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

=item * C<name> (anyOf, required) - The name of the certificate.

=item * C<object> (string, required) - The object type.

- If creating, updating, or getting a specific certificate, the object type is
C<certificate> . - If listing, activating, or deactivating certificates for
the organization, the object type is C<organization.certificate> . - If
listing, activating, or deactivating certificates for a project, the object
type is C<organization.project.certificate> .

Allowed values: certificate, organization.certificate, organization.project.certificate

=back

=head2 ListCertificatesResponse

Properties:

=over

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

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

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

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

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

Allowed values: list

=back

=head2 OrganizationCertificate

Properties:

=over

=item * C<active> (boolean, required) - Whether the certificate is currently active at the organization level.

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

=item * C<created_at> (integer, required) - The Unix timestamp (in seconds) of when the certificate was uploaded.

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

=item * C<name> (anyOf, required) - The name of the certificate.

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

Allowed values: organization.certificate

=back

=head2 UploadCertificateRequest

Properties:

=over

=item * C<certificate> (string, required) - The certificate content in PEM format

=item * C<name> (string) - An optional name for the certificate

=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
