Verifiable Credentials Endpoints

This page covers the end points related to Verifiable Credentials in the API.

This page introduces working with Verifiable Credentials through the API. The full set of relevant endpoints are listed on the OpenAPI Spec, notably in these sections:

Issuing Verifiable Credentials

Basic, standards-compliant Verifiable Credentials can be issued with the /api/credentials/issue endpoint:

curl --location 'https://platform.transmute.industries/api/credentials/issue' \
--header 'accept: application/json' \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data-raw '{
  "credential": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "type": [
      "VerifiableCredential",
      "UniversityDegreeCredential"
    ],
    "issuer": "did:web:vc.transmute.world",
    "issuanceDate": "2020-03-10T04:24:12.164Z",
    "credentialSubject": {
      "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
      "degree": {
        "type": "BachelorDegree",
        "name": "Bachelor of Science and Arts"
      }
    }
  },
  "options": {
    "revocable": true,
    "suspendable": false
  }
}'

Note that if you are using the request payload example from the OpenAPI Spec, the issuer must be changed to one of your organization’s DIDs – you can only sign with your own private keys.

Note!

Remember that the issuer must be a DID, not a DID URL – the issuer must not contain a fragment (#).

It is important to understand the content of this request payload. Below is a brief introduction to get started, please see the VC specification for a complete reference.

The response of this call is a Verifiable Credential:

{
    "verifiableCredential": "ey..."
}

Last updated