Revoke Certificate
client.originCACertificates.delete(stringcertificateId, RequestOptionsoptions?): OriginCACertificateDeleteResponse { id, revoked_at }
DELETE/certificates/{certificate_id}
Revoke an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint (see above).
Security
User Service Key
Used when interacting with the Origin CA certificates API. View/change your key.
Example:
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Revoke Certificate
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
userServiceKey: process.env['CLOUDFLARE_API_USER_SERVICE_KEY'], // This is the default and can be omitted
});
const originCACertificate = await client.originCACertificates.delete(
'023e105f4ecef8ad9ca31a8372d0c353',
);
console.log(originCACertificate.id);{
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"revoked_at": "2024-09-06T18:43:47.928893Z"
}
}Returns Examples
{
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"revoked_at": "2024-09-06T18:43:47.928893Z"
}
}