# How to Revoke Certificates

## Revocation API

The API uses a “beneficiary ID/pre-enrolment code” and the “registration number” as input parameters to search and fetch the certificate(s) that need to be revoked from the certificate registry. The revocation certificate does not contain the end date.

## Revoke Certificate Workflow

<figure><img src="/files/Lt7PQtmwqw7wOAhBmYeP" alt=""><figcaption></figcaption></figure>

* **Request URL:** {{baseUrl}}/vc-certification/v1/certificate/revoke &#x20;
* **Request method:** POST

#### Request Body

```
{
    "certificateId": "843575011372",
    "entityName": "HealthProfessional_1"
}
```

#### Request Json

```
{
    "message": "Certificate Revoked",
    "certificateRevokeResponse": {
        "id": "sunbird-rc.registry.create",
        "ver": "1.0",
        "ets": 1674811937256,
        "params": {
            "resmsgid": "",
            "msgid": "3d2a200b-3397-4935-b8ef-6092f467abef",
            "err": "",
            "status": "SUCCESSFUL",
            "errmsg": ""
        },
        "responseCode": "OK",
        "result": {
            "RevokedVC": {
                "osid": "1-888a147b-60b0-467c-8aa0-233b80d121ba"
            }
        }
    }
}
```

## Steps

#### Previous Certificate (should show revoked)

<figure><img src="/files/zP3Ouc2E9syki3weXy92" alt=""><figcaption></figcaption></figure>

#### Delete revoked VC

* **Request method:** Delete
* **Request URL:** {{baseUrl}}/vc-certification/v1/certificate/revoke/entityName/certificateId
* **SampleURL:** {{baseUrl}}/vc- certification/v1/certificate/revoke/HealthProfessional71/961266078942
* Authorisation needed

#### Response Json

```
{
    "message": "Delete revoked certificate request sent successfully"
}
```

[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)](http://creativecommons.org/licenses/by/4.0/)*All content on this page by* [*eGov Foundation*](https://egov.org.in/) *is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://divoc.digit.org/platform/divocs-verifiable-certificate-features-3.0/how-to-revoke-certificates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
