# VC API

## Overview

The VC API provides a collection of [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) request methods that involves Verifiable Credentials (VCs). This API allows a credential issuer to register a new VC with the `vc_register` operation or revoke an exisiting VC the `vc_revoke` operation. When a credential holder presents a VC to a credential verifier, the verifier could then obtain the VC's verification key with a GET request.

In the same way as the [DID API](https://app.gitbook.com/@balll/s/finema-docs/api-tutorials/api), HTTP requests to a IDIN server must be in the JSON format with two attributes `"message"` and `"signature"`. One distinction to the DID API is the GET method for a VC's verification key that requires no request body.

```
{
    "message": "eyJjdXJyZW50X2tleSI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFdDBha0ZjUXE2eklacXpXV3FHY01mMUxIRXNtTVxuanlyb2Vla0lVbVZkRnkzMTVsZHhjbjJmUHpQcXlqSlZvbEpSdm9SYVZvWlpaalpDQnp5NHlBU3hxdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS0iLCAibmV4dF9rZXlfaGFzaCI6ICI1MThiN2U5ZTRmY2EzNjVkZmY3YjZmNmQ0NTA5YmJlMjk5MDAzN2E4OGQ3NjMzZWYwZmFhYWRlYmEzNTEyM2VkIiwgIm9wZXJhdGlvbiI6ICJ2Y19yZWdpc3RlciIsICJkaWRfYWRkcmVzcyI6ICJkaWQ6aWRpbjphZmI3YmE4OGM3NmVkYmRhNTVjMzQ0YjcwYWUwY2YwNTU2ZDc3MGVjMjU2ODIwZDcxODUwMDBkZTM5NTM5MWI1IiwgIm5vbmNlIjogNX0=",
    "signature": "MEUCIFSbmMEUcyjSYwq4QOXWZewn+xS/Jih04DRGKwNKlkQnAiEAuH3Es1opQ3LTTYbwyTJylskbaZOl7vSAF9RFp2Qn3TI="
}
```

## Types of Requests

The table below summarizes all VC-related HTTP requests to the IDIN server.

| Request Method                                                                                                            | Description                     | HTTP Method |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | :---------: |
| [`vc_register`](https://app.gitbook.com/@balll/s/finema-docs/~/drafts/-M8ExDvnDBnoTJneay9S/api/register-a-new-did)        | Register a new VC.              |     POST    |
| [`vc_revoke`](https://app.gitbook.com/@balll/s/finema-docs/~/drafts/-M8ExDvnDBnoTJneay9S/api/add-a-new-public-key-series) | Revoke a VC.                    |    DELETE   |
|                                                                                                                           | Get a verification key of a VC. |     GET     |


---

# 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.finema.co/api-tutorials/vc-api.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.
