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: 1RequiredExample:
Type of credential to be created
ProofOfPurchase
Pattern: ^[a-zA-Z0-9_]+$
Responses
201
Created
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
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"
}
}
Retrieve a credential by ID
Authorizations
Path parameters
idstringRequired
The unique identifier of the credential
Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
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"
}
}
Mark a credential’s status (e.g. revoke)
Authorizations
Path parameters
idstringRequired
The credential ID to update
Responses
200
OK
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
post
POST /v1/credentials/{id}/revoke HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Accept: */*
No content