# Issue an Accreditation

## Publish 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":{"AccreditationIssueRequest":{"description":"Input fields for the creating a Verifiable Accreditation.","type":"object","additionalProperties":false,"properties":{"issuerDid":{"description":"DID of the Verifiable Accreditation issuer. This needs to be a `did:cheqd` DID.","type":"string"},"subjectDid":{"description":"DID of the Verifiable Accreditation holder/subject. This needs to be a `did:cheqd` DID.","type":"string"},"schemas":{"description":"The list of schemas the subject DID is accredited for.","type":"array","items":{"$ref":"#/components/schemas/SchemaUrl"}},"accreditationName":{"description":"Unique name of the Verifiable Accreditation.","type":"string"},"attributes":{"description":"JSON object containing the attributes to be included in the Accreditation.","type":"object"},"@context":{"description":"Optional properties to be included in the `@context` property of the Accreditation.","type":"array","items":{"type":"string"}},"parentAccreditation":{"description":"DID URL of the parent Verifiable Accreditation, required for accredit/attest operation.","type":"string"},"rootAuthorization":{"description":"DID URL of the root Verifiable Accreditation, required for accredit/attest operation.","type":"string"},"trustFramework":{"description":"Name or Type of the Trust Framework, required for authorize operation.","type":"string"},"trustFrameworkId":{"description":"Url of the Trust Framework, required for authorize operation.","type":"string"},"type":{"description":"Optional properties to be included in the `type` property of the Accreditation.","type":"array","items":{"type":"string"}},"expirationDate":{"description":"Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification</a>.","type":"string","format":"date-time"},"format":{"description":"Format of the Verifiable Accreditation. Defaults to VC-JWT.","type":"string","enum":["jwt","jsonld"]},"credentialStatus":{"description":"Optional `credentialStatus` properties for VC revocation or suspension. Takes `statusListName` and `statusListPurpose` as inputs.","type":"object","required":["statusPurpose","statusListName"],"properties":{"statusPurpose":{"type":"string","enum":["revocation","suspension"]},"statusListName":{"type":"string"},"statusListIndex":{"type":"number"},"statusListVersion":{"type":"string","format":"date-time"},"statusListRangeStart":{"type":"number"},"statusListRangeEnd":{"type":"number"},"indexNotIn":{"type":"number"}}},"termsOfUse":{"description":"Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.","type":"array","items":{"type":"object"}},"refreshService":{"description":"RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.","type":"array","items":{"type":"object"}},"evidence":{"description":"Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.","type":"array","items":{"type":"object"}}},"required":["issuerDid","subjectDid","schemas","accreditationName"]},"SchemaUrl":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"url":{"type":"string"}}},"Credential":{"description":"Input fields for revoking/suspending a Verifiable Credential.","type":"object","additionalProperties":false,"properties":{"@context":{"type":"array","items":{"type":"string"}},"type":{"type":"array","items":{"type":"string"}},"expirationDate":{"type":"string","format":"date-time"},"issuer":{"type":"object","properties":{"id":{"type":"string","format":"DID"}}},"credentialSubject":{"type":"object","properties":{"id":{"type":"string","format":"DID"}}},"credentialStatus":{"type":"object","properties":{"id":{"type":"string"},"statusListIndex":{"type":"number"},"statusPurpose":{"type":"string","enum":["revocation","suspension"]},"type":{"type":"string","enum":["StatusList2021Entry","BitstringStatusListEntry"]}}},"issuanceDate":{"type":"string","format":"date-time"},"proof":{"type":"object","properties":{"type":{"type":"string"},"jwt":{"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/issue":{"post":{"tags":["Trust Registries"],"summary":"Publish a verifiable accreditation for a DID.","description":"Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.","operationId":"accredit-issue","parameters":[{"in":"query","name":"accreditationType","description":"Select the type of accreditation to be issued.","schema":{"type":"string","enum":["authorize","accredit","attest"]},"required":true}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccreditationIssueRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccreditationIssueRequest"}}}},"responses":{"200":{"description":"The request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"400":{"$ref":"#/components/schemas/InvalidRequest"},"401":{"$ref":"#/components/schemas/UnauthorizedError"},"500":{"$ref":"#/components/schemas/InternalError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cheqd.io/product/api-reference/trust-registries/issue-accreditation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
