> For the complete documentation index, see [llms.txt](https://divoc.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://divoc.digit.org/divoc-wiki-3.1/platform/divocs-verifiable-certificate-features-3.0/how-to-revoke-certificates.md).

# 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="https://1377276962-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZ3Mr7sicTlPeSsH6Scq%2Fuploads%2FeGVQrfLccaHzu3N697rI%2FScreenshot%202023-02-16%20at%209.57.30%20AM.png?alt=media&amp;token=c42e43c5-0025-4c9b-9377-afa1b7877f5a" 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="https://1377276962-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZ3Mr7sicTlPeSsH6Scq%2Fuploads%2FRT77WjfQ720wmGT04588%2FScreenshot%202023-02-16%20at%2010.12.34%20AM.png?alt=media&amp;token=bc6acdcd-f908-4473-8c35-a3ed4cf54fdc" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
