---
title: Revoke Client Certificate
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

[Client Certificates](https://developers.cloudflare.com/api/typescript/resources/client%5Fcertificates)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Revoke Client Certificate

client.clientCertificates.delete(stringclientCertificateID, ClientCertificateDeleteParams { zone\_id } params, RequestOptionsoptions?): [ClientCertificate](https://developers.cloudflare.com/api/typescript/resources/client%5Fcertificates#%28resource%29%20client%5Fcertificates%20%3E%20%28model%29%20client%5Fcertificate%20%3E%20%28schema%29) { id, certificate, certificate\_authority, 15 more } 

DELETE/zones/{zone\_id}/client\_certificates/{client\_certificate\_id}

Set a API Shield mTLS Client Certificate to pending\_revocation status for processing to revoked status.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`SSL and Certificates Write`

##### ParametersExpand Collapse 

clientCertificateID: string

Identifier.

maxLength32

params: ClientCertificateDeleteParams { zone\_id } 

zone\_id: string

Identifier.

maxLength32

##### ReturnsExpand Collapse 

ClientCertificate { id, certificate, certificate\_authority, 15 more } 

id?: string

Identifier.

maxLength32

certificate?: string

The Client Certificate PEM.

certificate\_authority?: CertificateAuthority { id, name } 

Certificate Authority used to issue the Client Certificate.

id?: string

name?: string

common\_name?: string

Common Name of the Client Certificate.

country?: string

Country, provided by the CSR.

csr?: string

The Certificate Signing Request (CSR). Must be newline-encoded.

expires\_on?: string

Date that the Client Certificate expires.

fingerprint\_sha256?: string

Unique identifier of the Client Certificate.

issued\_on?: string

Date that the Client Certificate was issued by the Certificate Authority.

location?: string

Location, provided by the CSR.

organization?: string

Organization, provided by the CSR.

organizational\_unit?: string

Organizational Unit, provided by the CSR.

serial\_number?: string

The serial number on the created Client Certificate.

signature?: string

The type of hash used for the Client Certificate..

ski?: string

Subject Key Identifier.

state?: string

State, provided by the CSR.

status?: "active" | "pending\_reactivation" | "pending\_revocation" | "revoked"

Client Certificates may be active or revoked, and the pending\_reactivation or pending\_revocation represent in-progress asynchronous transitions.

One of the following:

"active"

"pending\_reactivation"

"pending\_revocation"

"revoked"

validity\_days?: number

The number of days the Client Certificate will be valid after the issued\_on date.

### Revoke Client Certificate

TypeScript

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
import Cloudflare from 'cloudflare';

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

const clientCertificate = await client.clientCertificates.delete(
  '023e105f4ecef8ad9ca31a8372d0c353',
  { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);

console.log(clientCertificate.id);
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "certificate": "-----BEGIN CERTIFICATE-----\nMIIDmDCCAoC...dhDDE\n-----END CERTIFICATE-----",
    "certificate_authority": {
      "id": "568b6b74-7b0c-4755-8840-4e3b8c24adeb",
      "name": "Cloudflare Managed CA for account"
    },
    "common_name": "Cloudflare",
    "country": "US",
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----",
    "expires_on": "2033-02-20T23:18:00Z",
    "fingerprint_sha256": "256c24690243359fb8cf139a125bd05ebf1d968b71e4caf330718e9f5c8a89ea",
    "issued_on": "2023-02-23T23:18:00Z",
    "location": "Somewhere",
    "organization": "Organization",
    "organizational_unit": "Organizational Unit",
    "serial_number": "3bb94ff144ac567b9f75ad664b6c55f8d5e48182",
    "signature": "SHA256WithRSA",
    "ski": "8e375af1389a069a0f921f8cc8e1eb12d784b949",
    "state": "CA",
    "status": "active",
    "validity_days": 3650
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "certificate": "-----BEGIN CERTIFICATE-----\nMIIDmDCCAoC...dhDDE\n-----END CERTIFICATE-----",
    "certificate_authority": {
      "id": "568b6b74-7b0c-4755-8840-4e3b8c24adeb",
      "name": "Cloudflare Managed CA for account"
    },
    "common_name": "Cloudflare",
    "country": "US",
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----",
    "expires_on": "2033-02-20T23:18:00Z",
    "fingerprint_sha256": "256c24690243359fb8cf139a125bd05ebf1d968b71e4caf330718e9f5c8a89ea",
    "issued_on": "2023-02-23T23:18:00Z",
    "location": "Somewhere",
    "organization": "Organization",
    "organizational_unit": "Organizational Unit",
    "serial_number": "3bb94ff144ac567b9f75ad664b6c55f8d5e48182",
    "signature": "SHA256WithRSA",
    "ski": "8e375af1389a069a0f921f8cc8e1eb12d784b949",
    "state": "CA",
    "status": "active",
    "validity_days": 3650
  }
}
```