---
title: "POST /api/v1/revoke"
method: POST
path: "/api/v1/revoke"
tags: ["fabric-ca-server"]
---

# POST /api/v1/revoke

`POST /api/v1/revoke`

Perform revocation of one of the following:  
* a specific certificate identified by a serial number and AKI (Authority Key Identitifer), or   
* all certificates associated with the identity and prevent any future enrollments for this identity.   
The caller must have the **hf.Revoker** attribute.

## Query parameters

- `ca` string

## Headers

- `Authorization` string, required

## Request body

- object
  - `id` string — The enrollment ID of the identity whose certificates are to be revoked, including both enrollment certificates and transaction certificates. All future enrollment attempts for this identity will be rejected. If this field is specified, the *serial* and *aki* fields are ignored.
  - `aki` string — The Authority Key Identifier of the certificate which is to be revoked. The *serial* field must also be specified.
  - `serial` string — The serial number of the certificate which is to be revoked. The *aki* (Authority Key Identifier) field must also be specified.
  - `reason` string — The reason for revocation. See https://godoc.org/golang.org/x/crypto/ocsp for valid values. The default value is 0 (ocsp.Unspecified).
  - `caname` string — Name of the CA to direct traffic to within server.
  - `gencrl` boolean — When this request results in revoking one or more certificates, this boolean indicates whether to generate a CRL and return it in the response

## Response `200`

Successfully completed the revocation

- ResponseBase
  - `result` unknown, required
  - `success` boolean, required — Boolean indicating if the request was successful.
  - `errors` object[], required — An array of error messages (code and message)
    - `code` integer, required — Integer code denoting the type of error.
    - `message` string, required — An error message
  - `messages` object[], required — An array of information messages (code and message)
    - `code` integer, required — Integer code denoting the type of message.
    - `message` string, required — A more specific message.

---

[API](https://skmtc.dev/hyperledger/apis/fabric-ca-server-api.md) · [All operations](https://skmtc.dev/hyperledger/apis/fabric-ca-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperledger/fabric-ca-server-api/revisions/f1cf3d665f0e/schema)
