# Revoke an Accreditation

## Revoke a Verifiable Accreditation.

> This endpoint revokes a given Verifiable Accreditation. As input, it can take the didUrl as a string. The StatusList2021 or BitstringStatusList resource should already be setup in the VC and \`credentialStatus\` property present in the VC.

```json
{"openapi":"3.0.0","info":{"title":"cheqd Studio API for cheqd network","version":"2.0.0"},"tags":[{"name":"Trust Registries"}],"servers":[{"url":"https://studio-api.cheqd.net","description":"Main (production) server"},{"url":"https://studio-api-staging.cheqd.net","description":"Staging server for testing"},{"url":"http://localhost:3000","description":"Local server for testing"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"AccreditationRevokeRequest":{"type":"object","properties":{"didUrl":{"description":"Verifiable  Accreditation to be verified as a VC-JWT string or a JSON object.","type":"string"},"did":{"type":"string"},"resourceId":{"type":"string"},"resourceName":{"type":"string"},"resourceType":{"type":"string"},"symmetricKey":{"description":"The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.","type":"string"}}},"RevocationResult":{"properties":{"revoked":{"type":"boolean"}}},"InvalidRequest":{"description":"A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.","type":"object","properties":{"error":{"type":"string"}}},"UnauthorizedError":{"description":"Access token is missing or invalid","type":"object","properties":{"error":{"type":"string"}}},"InternalError":{"description":"An internal error has occurred. Additional state information plus metadata may be available in the response body.","type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/trust-registry/accreditation/revoke":{"post":{"tags":["Trust Registries"],"summary":"Revoke a Verifiable Accreditation.","description":"This endpoint revokes a given Verifiable Accreditation. As input, it can take the didUrl as a string. The StatusList2021 or BitstringStatusList resource should already be setup in the VC and `credentialStatus` property present in the VC.","operationId":"accredit-revoke","parameters":[{"in":"query","name":"publish","description":"Set whether the StatusList2021 or BitstringStatusList resource should be published to the ledger or not. If set to `false`, the StatusList2021 or BitstringStatusList publisher should manually publish the resource.","required":true,"schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccreditationRevokeRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccreditationRevokeRequest"}}}},"responses":{"200":{"description":"The request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevocationResult"}}}},"400":{"$ref":"#/components/schemas/InvalidRequest"},"401":{"$ref":"#/components/schemas/UnauthorizedError"},"500":{"$ref":"#/components/schemas/InternalError"}}}}}}
```
