Skip to content
Primary navigation

List organization certificates

admin.organization.certificates.list(**kwargs) -> ConversationCursorPage<CertificateListResponse { id, active, certificate_details, 3 more } >
GET/organization/certificates

List uploaded certificates for this organization.

ParametersExpand Collapse
after: String

A cursor for use in pagination. 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.

limit: Integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order: :asc | :desc

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

One of the following:
:asc
:desc
ReturnsExpand Collapse
class CertificateListResponse { id, active, certificate_details, 3 more }

Represents an individual certificate configured at the organization level.

id: String

The identifier, which can be referenced in API endpoints

active: bool

Whether the certificate is currently active at the organization level.

certificate_details: CertificateDetails{ expires_at, valid_at}
expires_at: Integer

The Unix timestamp (in seconds) of when the certificate expires.

formatunixtime
valid_at: Integer

The Unix timestamp (in seconds) of when the certificate becomes valid.

formatunixtime
created_at: Integer

The Unix timestamp (in seconds) of when the certificate was uploaded.

formatunixtime
name: String

The name of the certificate.

object: :"organization.certificate"

The object type, which is always organization.certificate.

List organization certificates

require "openai"

openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

page = openai.admin.organization.certificates.list

puts(page)
{
  "object": "list",
  "data": [
    {
      "object": "organization.certificate",
      "id": "cert_abc",
      "name": "My Example Certificate",
      "active": true,
      "created_at": 1234567,
      "certificate_details": {
        "valid_at": 12345667,
        "expires_at": 12345678
      }
    },
  ],
  "first_id": "cert_abc",
  "last_id": "cert_abc",
  "has_more": false
}
Returns Examples
{
  "object": "list",
  "data": [
    {
      "object": "organization.certificate",
      "id": "cert_abc",
      "name": "My Example Certificate",
      "active": true,
      "created_at": 1234567,
      "certificate_details": {
        "valid_at": 12345667,
        "expires_at": 12345678
      }
    },
  ],
  "first_id": "cert_abc",
  "last_id": "cert_abc",
  "has_more": false
}