# Verifiable Credential

Please [generate access token](/hypersign-ssi/api-doc/authentication.md) before proceeding.  Once you generated the `access_token`, you can pass this token as  *<mark style="background-color:yellow;">bearer authorization token</mark>*  in the header for all APIs.&#x20;

### Issue a verifiable credential

An issuer may issue a [verifiable credential](/core-concepts/verifiable-credential-vc.md) to a subject using this API. The credential document is signed by issuer's identity key and its status is registered on the blockchain.&#x20;

{% hint style="info" %}
Entity Studio SSI API base URL: <https://api.entity.hypersign.id>
{% endhint %}

{% openapi src="/files/tqG2a4N1nThnaYfUMlnm" path="/api/v1/credential/issue" method="post" %}
[api-json.json](https://1497651738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOLDOibYYcG4PCSEDDL%2Fuploads%2F7SWcw0078CGMGkrodrYh%2Fapi-json.json?alt=media\&token=10361f3f-4c5b-44d6-b6af-39fbac2cc67e)
{% endopenapi %}

{% hint style="info" %}
NOTE: A developer may choose to store the verifiable credential in application's data vault securely or they may not to. Pass `true` for request body property `persist` to store the credential document, `false` otherwise.
{% endhint %}

### Verify an issued verifiable credential document

A signed verifiable credential must has signature of the issuer. Any one may verify an issued credential document. The verification result state the following facts:

> * *This document was issued by intended issuer*
> * *This document have not been tampered*
> * *This document have not been revoked*

{% openapi src="/files/vgw0vjv4rN8E1Tf2vbDp" path="/api/v1/credential/verify" method="post" %}
[api-json.json](https://1497651738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOLDOibYYcG4PCSEDDL%2Fuploads%2FjYVydJufhHpdtxi9oslY%2Fapi-json.json?alt=media\&token=695305b2-cc3b-400b-9c46-54606891a2d7)
{% endopenapi %}

{% hint style="info" %}
NOTE: Verifying a credential document is different than verifying a [verifiable presentatio](/hypersign-ssi/api-doc/verifiable-presentation.md)n. Verification result of later, also states that "*Only intended subject holds this document and not one else*".&#x20;
{% endhint %}

### Fetch a verifiable credential and/or its status by Id

{% openapi src="/files/vgw0vjv4rN8E1Tf2vbDp" path="/api/v1/credential/{credentialId}" method="get" %}
[api-json.json](https://1497651738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOLDOibYYcG4PCSEDDL%2Fuploads%2FjYVydJufhHpdtxi9oslY%2Fapi-json.json?alt=media\&token=695305b2-cc3b-400b-9c46-54606891a2d7)
{% endopenapi %}

{% hint style="info" %}
Pass `false` value to parameter `retrieveCredential` to only retrieve status of  the credential
{% endhint %}

### Fetch list of verifiable credentials

{% openapi src="/files/vgw0vjv4rN8E1Tf2vbDp" path="/api/v1/credential" method="get" %}
[api-json.json](https://1497651738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOLDOibYYcG4PCSEDDL%2Fuploads%2FjYVydJufhHpdtxi9oslY%2Fapi-json.json?alt=media\&token=695305b2-cc3b-400b-9c46-54606891a2d7)
{% endopenapi %}

### Update credential status of a verifiable credential

{% openapi src="/files/vgw0vjv4rN8E1Tf2vbDp" path="/api/v1/credential/status/{credentialId}" method="patch" %}
[api-json.json](https://1497651738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOLDOibYYcG4PCSEDDL%2Fuploads%2FjYVydJufhHpdtxi9oslY%2Fapi-json.json?alt=media\&token=695305b2-cc3b-400b-9c46-54606891a2d7)
{% endopenapi %}


---

# 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.hypersign.id/hypersign-ssi/api-doc/verifiable-credential.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.
