.. and press ENTER to ask a question on web5, how to write code and more.

Skip to main content
warning

This project is not actively being maintained. If you are interested in adopting it, please open an issue.

Revoke a Credential

When forming a request to create a credential, there are a number of possible request values, two of which are revocable and suspendable. These options are exposed to give issuers the ability to specify status for credentials they create in the service.

In this guide, we'll go over how to revoke a credential.

info

Prerequsite​

Create a Credential with Status

As the creator of a credential, you're able to change the status of that credential.

To do so, make a PUT request to /v1/credentials/{id}/status and specify a boolean value for the status you'd like to change.

Given a credential was created with revocable as true, you can revoke that credential by setting revoked to true:

curl -X PUT localhost:8080/v1/credentials/8f9d58b2-c978-4317-96bd-35949ce76121/status -d '{ "revoked": true }'

Upon success, you'll see the following response:

{ 
"revoked": true,
"suspended": false
}

It is possible to reverse the status of a credential. To do so, make a PUT request to /v1/credentials/{id}/status, and set the value of revoked to false.

Connect with us on Discord

Submit feedback: Open a GitHub issue

Edit this page: GitHub Repo

Contribute: Contributing Guide