# Verify a Verifiable Accreditation

Users are able to **issue Verifiable Accreditations** to determine the validity of the accreditation, as well to traverse the trust chain to a root of trust.&#x20;

## Step 1: Issue Accreditation

Make sure you have already created at least one Verifiable Accreditation that you are able to query in the verify API.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Issue Verifiable Accreditation</strong></mark></td><td>Issue a Verifiable Accreditation as a DID-Linked Resource from an "issuer" DID to a recipient "subject" DID.</td><td><a href="issue-accreditation">issue-accreditation</a></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## Step 2: Use the Verify Accreditation API

## Verify a verifiable accreditation for a DID.

> Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.

```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":{"AccreditationVerifyRequest":{"type":"object","properties":{"subjectDid":{"description":"DID of the Verifiable  Accreditation holder/subject. This needs to be a `did:key` DID.","type":"string"},"didUrl":{"description":"DID URL of the Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.","type":"string"},"did":{"description":"DID of the Verifiable Accreditation holder/subject","type":"string"},"resourceId":{"description":"Unique resource identifier of the Verifiable Accreditation","type":"string"},"resourceName":{"description":"Resource name of the Verifiable Accreditation","type":"string"},"resourceType":{"description":"Resource type of the Verifiable Accreditation","type":"string"},"schemas":{"description":"The list of schemas the subject DID is accredited for.","type":"array","items":{"$ref":"#/components/schemas/SchemaUrl"}},"policies":{"description":"Custom verification policies to execute when verifying  Accreditation.","type":"object","properties":{"issuanceDate":{"description":"Policy to skip the `issuanceDate` (`nbf`) timestamp check when set to `false`.","type":"boolean","default":true},"expirationDate":{"description":"Policy to skip the `expirationDate` (`exp`) timestamp check when set to `false`.","type":"boolean","default":true},"audience":{"description":"Policy to skip the audience check when set to `false`.","type":"boolean","default":false}}}},"required":["subjectDid"]},"SchemaUrl":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"url":{"type":"string"}}},"AccreditationVerifyResponse":{"type":"object","properties":{"verified":{"type":"boolean"},"issuer":{"type":"string"},"signer":{"type":"object"},"jwt":{"type":"string"},"verifiableCredential":{"type":"object"},"accreditorDids":{"type":"array","items":{"type":"string"}},"rootAuthorization":{"type":"object"},"termsOfUse":{"type":"object","properties":{"type":{"type":"string"},"trustFrameworkId":{"type":"string"},"trustFramework":{"type":"string"}}}}},"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/verify":{"post":{"tags":["Trust Registries"],"summary":"Verify a verifiable accreditation for a DID.","description":"Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.","operationId":"accredit-verify","parameters":[{"in":"query","name":"verifyStatus","description":"If set to `true` the verification will also check the status of the accreditation. Requires the VC to have a `credentialStatus` property.","schema":{"type":"boolean","default":false}},{"in":"query","name":"allowDeactivatedDid","description":"If set to `true` allow to verify accreditation which based on deactivated DID.","schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccreditationVerifyRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccreditationVerifyRequest"}}}},"responses":{"200":{"description":"The request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccreditationVerifyResponse"}}}},"400":{"$ref":"#/components/schemas/InvalidRequest"},"401":{"$ref":"#/components/schemas/UnauthorizedError"},"500":{"$ref":"#/components/schemas/InternalError"}}}}}}
```
