Credential

Create a credential without a recipient Creates a standalone credential without specifying a recipient

post

Create a standalone credential

Authorizations
Body

Request containing credential type and subject data

typestring · min: 1Required

Type of credential to be created

Example: ProofOfPurchasePattern: ^[a-zA-Z0-9_]+$
Responses
201
Created
application/json
post
POST /v1/credentials HTTP/1.1
Host: api
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 116

{
  "type": "ProofOfPurchase",
  "credential_subject": {
    "id": "did:empe:0x123456789",
    "name": "John Doe",
    "purchaseId": "12345"
  }
}
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "vc": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "type": [
      "VerifiableCredential"
    ],
    "id": "urn:uuid:d290f1ee-6c54-4b01-90e6-d701748f0851",
    "issuer": "did:empe:0x1234567890abcdef",
    "issuanceDate": "2023-01-01T00:00:00Z"
  }
}

Get a credential by its ID Gets a credential by its ID for the authenticated holder

get

Retrieve a credential by ID

Authorizations
Path parameters
idstringRequired

The unique identifier of the credential

Responses
200
OK
application/json
get
GET /v1/credentials/{id} HTTP/1.1
Host: api
Authorization: Bearer JWT
Accept: */*
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "vc": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "type": [
      "VerifiableCredential"
    ],
    "id": "urn:uuid:d290f1ee-6c54-4b01-90e6-d701748f0851",
    "issuer": "did:empe:0x1234567890abcdef",
    "issuanceDate": "2023-01-01T00:00:00Z"
  }
}

Update a single credential’s status bit

post

Mark a credential’s status (e.g. revoke)

Authorizations
Path parameters
idstringRequired

The credential ID to update

Responses
200
OK
post
POST /v1/credentials/{id}/revoke HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Accept: */*

No content