For the complete documentation index, see llms.txt. This page is also available as Markdown.

Credential Management

Retrieve all stored credentials for a DID

get
Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Query parameters
networkstringOptional

The network to use for DID creation

typestringOptional

The type of credential to retrieve

statusstring · enumOptional

The credential status to filter by

Possible values:
issuedAtstringOptional

The credential issuance date to filter by

versionnumber · enumOptional

The credential version to filter by

Possible values:
Responses
200

The credentials have been successfully retrieved

application/json
credentialsstring[]Required

Array of verifiable credentials

Example: [{"@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1"],"id":"http://example.gov/credentials/3732","type":["VerifiableCredential","UniversityDegreeCredential"],"issuer":"did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA","issuanceDate":"2020-03-10T04:24:12.164Z","credentialSubject":{"id":"did:empe:testnet:7UGY6jJ3qLd42Krxgi5QgPGQyLRRUmCgrRX97KDCxYKN","degree":{"type":"BachelorDegree","name":"Bachelor of Science and Arts"}},"proof":{"type":"Ed25519Signature2018","created":"2020-03-10T04:24:12.164Z","jws":"eyJhbGciOiJFZERTQSIsImI2...","proofPurpose":"assertionMethod","verificationMethod":"did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"}}]
get/credentials
GET /credentials HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The credentials have been successfully retrieved

{
  "credentials": [
    {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://www.w3.org/2018/credentials/examples/v1"
      ],
      "id": "http://example.gov/credentials/3732",
      "type": [
        "VerifiableCredential",
        "UniversityDegreeCredential"
      ],
      "issuer": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
      "issuanceDate": "2020-03-10T04:24:12.164Z",
      "credentialSubject": {
        "id": "did:empe:testnet:7UGY6jJ3qLd42Krxgi5QgPGQyLRRUmCgrRX97KDCxYKN",
        "degree": {
          "type": "BachelorDegree",
          "name": "Bachelor of Science and Arts"
        }
      },
      "proof": {
        "type": "Ed25519Signature2018",
        "created": "2020-03-10T04:24:12.164Z",
        "jws": "eyJhbGciOiJFZERTQSIsImI2...",
        "proofPurpose": "assertionMethod",
        "verificationMethod": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
      }
    }
  ]
}

Import a credential from a JSON object

post
Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Body
allowForeignSubjectbooleanRequired

If allowForeignSubject is true allow any credential. If false (default) check if credential has subject Id, if it has it must match one of active DIDs of the wallet

Default: falseExample: true
Responses
201

Credential imported successfully

application/json
idstringRequired

Credential identifier

Example: did:empe:11111111#vc-1761304970049
post/credentials
POST /credentials HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 986

{
  "credential": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "type": [
      "VerifiableCredential",
      "UniversityDegreeCredential"
    ],
    "id": "did:example:issuer#vc-1743067111099",
    "issuer": {
      "id": "did:example:issuer"
    },
    "issuanceDate": "2023-01-01T00:00:00.000Z",
    "credentialSubject": {
      "id": "did:example:subject",
      "degree": {
        "type": "BachelorDegree",
        "name": "BSc"
      }
    },
    "proof": {
      "type": "Ed25519Signature2018",
      "created": "2023-01-01T00:00:00.000Z",
      "proofPurpose": "assertionMethod",
      "verificationMethod": "did:example:issuer#key-1",
      "jws": "eyJhbGciOiJFZERTQSIsImI2..."
    },
    "expirationDate": "2025-12-31T23:59:59Z",
    "credentialSchema": {
      "id": "https://example.com/schemas/degree.json",
      "type": "JsonSchemaValidator2018"
    },
    "credentialStatus": [
      {
        "id": "https://example.com/status/123",
        "type": "RevocationList2020Status"
      }
    ],
    "evidence": {
      "id": "https://example.com/evidence/123",
      "type": "DocumentVerification"
    },
    "_ext": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  },
  "allowForeignSubject": true
}
{
  "id": "did:empe:11111111#vc-1761304970049"
}

Delete all credentials

delete
Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Responses
204

All credentials have been successfully deleted.

No content

delete/credentials
DELETE /credentials HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Retrieve a credential by its ID

get
Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Path parameters
idstringRequired
Responses
200

The credential has been successfully retrieved

application/json
credentialobjectRequired

Verifiable credential

Example: {"@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1"],"id":"http://example.gov/credentials/3732","type":["VerifiableCredential","UniversityDegreeCredential"],"issuer":"did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA","issuanceDate":"2020-03-10T04:24:12.164Z","credentialSubject":{"id":"did:empe:testnet:7UGY6jJ3qLd42Krxgi5QgPGQyLRRUmCgrRX97KDCxYKN","degree":{"type":"BachelorDegree","name":"Bachelor of Science and Arts"}},"proof":{"type":"Ed25519Signature2018","created":"2020-03-10T04:24:12.164Z","jws":"eyJhbGciOiJFZERTQSIsImI2...","proofPurpose":"assertionMethod","verificationMethod":"did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"}}
get/credentials/{id}
GET /credentials/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The credential has been successfully retrieved

{
  "credential": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "id": "http://example.gov/credentials/3732",
    "type": [
      "VerifiableCredential",
      "UniversityDegreeCredential"
    ],
    "issuer": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "issuanceDate": "2020-03-10T04:24:12.164Z",
    "credentialSubject": {
      "id": "did:empe:testnet:7UGY6jJ3qLd42Krxgi5QgPGQyLRRUmCgrRX97KDCxYKN",
      "degree": {
        "type": "BachelorDegree",
        "name": "Bachelor of Science and Arts"
      }
    },
    "proof": {
      "type": "Ed25519Signature2018",
      "created": "2020-03-10T04:24:12.164Z",
      "jws": "eyJhbGciOiJFZERTQSIsImI2...",
      "proofPurpose": "assertionMethod",
      "verificationMethod": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    }
  }
}

Delete a specific credential

delete
Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Path parameters
idstringRequired

Credential identifier to delete

Example: did:empe:11111111#vc-1761304970049
Responses
204

The credential has been successfully deleted.

No content

delete/credentials/{id}
DELETE /credentials/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated