Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

List organization certificates

client.Admin.Organization.Certificates.List(ctx, query) (*ConversationCursorPage[AdminOrganizationCertificateListResponse], error)
GET/organization/certificates

List uploaded certificates for this organization.

ParametersExpand Collapse
query AdminOrganizationCertificateListParams
After param.Field[string]Optional

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 param.Field[int64]Optional

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

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

ReturnsExpand Collapse
type AdminOrganizationCertificateListResponse struct{…}

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.

CertificateDetails AdminOrganizationCertificateListResponseCertificateDetails
CreatedAt int64

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

formatunixtime
Name string

The name of the certificate.

Object OrganizationCertificate

The object type, which is always organization.certificate.

List organization certificates

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAdminAPIKey("My Admin API Key"),
  )
  page, err := client.Admin.Organization.Certificates.List(context.TODO(), openai.AdminOrganizationCertificateListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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
}