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

Delete certificate

client.Admin.Organization.Certificates.Delete(ctx, certificateID) (*AdminOrganizationCertificateDeleteResponse, error)
DELETE
/organization/certificates/{certificate_id}

Delete a certificate from the organization.

The certificate must be inactive for the organization and all projects.

Delete 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.Delete(context.TODO(), "certificate_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", certificate.ID)
}
Response example
{
  "object": "certificate.deleted",
  "id": "cert_abc"
}
Parameters
certificateID string
Returns
type AdminOrganizationCertificateDeleteResponse struct{…}
ID string

The ID of the certificate that was deleted.

Object CertificateDeleted

The object type, must be certificate.deleted.

Returns Examples
Response example
{
  "object": "certificate.deleted",
  "id": "cert_abc"
}