# 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://3849653046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Frmjx4OUiHEx18PH4nMzn%2Fuploads%2FMluKkVyZiFIAxWPjptJn%2FScreenshot%202023-02-16%20at%209.57.30%20AM.png?alt=media&#x26;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://3849653046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Frmjx4OUiHEx18PH4nMzn%2Fuploads%2FoqGtX8DV5hGBDYrzcmYq%2FScreenshot%202023-02-16%20at%2010.12.34%20AM.png?alt=media&#x26;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/)*.*
