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
Theme

Modify certificate

client.Admin.Organization.Certificates.Update(ctx, certificateID, body) (*Certificate, error)
POST
/organization/certificates/{certificate_id}

Modify a certificate. Note that only the name can be modified.

Modify certificate

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"),
  )
  certificate, err := client.Admin.Organization.Certificates.Update(
    context.TODO(),
    "certificate_id",
    openai.AdminOrganizationCertificateUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", certificate.ID)
}
Response example
{
  "object": "certificate",
  "id": "cert_abc",
  "name": "Renamed Certificate",
  "created_at": 1234567,
  "certificate_details": {
    "valid_at": 12345667,
    "expires_at": 12345678
  }
}
Parameters
certificateID string
body AdminOrganizationCertificateUpdateParams
Returns
type Certificate struct{…}

Represents an individual certificate uploaded to the organization.

ID string

The identifier, which can be referenced in API endpoints

CertificateDetails CertificateCertificateDetails
CreatedAt int64

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

formatunixtime
Name string

The name of the certificate.

Object CertificateObject

The object type.

  • If creating, updating, or getting a specific certificate, the object type is certificate.
  • If listing, activating, or deactivating certificates for the organization, the object type is organization.certificate.
  • If listing, activating, or deactivating certificates for a project, the object type is organization.project.certificate.
Active bool
Optional

Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.

Returns Examples
Response example
{
  "object": "certificate",
  "id": "cert_abc",
  "name": "Renamed Certificate",
  "created_at": 1234567,
  "certificate_details": {
    "valid_at": 12345667,
    "expires_at": 12345678
  }
}