Skip to content
Primary navigation

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.

ParametersExpand Collapse
certificateID string
ReturnsExpand Collapse
type AdminOrganizationCertificateDeleteResponse struct{…}
ID string

The ID of the certificate that was deleted.

Object CertificateDeleted

The object type, must be certificate.deleted.

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)
}
{
  "object": "certificate.deleted",
  "id": "cert_abc"
}
Returns Examples
{
  "object": "certificate.deleted",
  "id": "cert_abc"
}