Skip to content
Primary navigation

Delete certificate

client.admin.organization.certificates.delete(stringcertificateID, RequestOptionsoptions?): CertificateDeleteResponse { id, object }
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
CertificateDeleteResponse { id, object }
id: string

The ID of the certificate that was deleted.

object: "certificate.deleted"

The object type, must be certificate.deleted.

Delete certificate

import OpenAI from 'openai';

const client = new OpenAI({
  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});

const certificate = await client.admin.organization.certificates.delete('certificate_id');

console.log(certificate.id);
{
  "object": "certificate.deleted",
  "id": "cert_abc"
}
Returns Examples
{
  "object": "certificate.deleted",
  "id": "cert_abc"
}