To revoke a credential, you can directly use the revoke credential API. Burning the NFT associated with the credential via the burn-nft API accomplishes the same result.

Issuers can revoke a Verifiable Credential without the subject’s intermediation.

To revoke the credential, copy the revokeCredential.js file from below, use your API key, the credentialId, and run the file from your terminal.

revokeCredential.js
const options = {
    method: "DELETE",
    headers: {
        "X-API-KEY": "YOUR_API_KEY",
    },
};

fetch(`https://staging.crossmint.com/api/v1-alpha1/credentials/${credentialId}`, options)
    .then((response) => response.json())
    .then((response) => console.log(JSON.stringify(response)))
    .catch((err) => console.error(err));
node revokeCredential.js