Signatory API - For Issuers
Signatory REST API functions.
The Signatory API exposes the "issuance" endpoint, which provides flexible integration possibilities for anyone intending to act as an "Issuer" (i.e. create, sign and issue Verifiable Credentials), as follows:
Credentials - issue credentials
Templates - create and mange credential templates
Revocations - revocation related functions
Credentials
If you're new to VCs, check out the intro section for an overview.
The /v1/credentials/issue
endpoint issues a specified credential.
curl -X 'POST' \
'https://signatory.ssikit.walt.id/v1/credentials/issue' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '<request-body>'
E.g. Issue a UniversityDegree
credential in the default JSON-LD format. In case you don't have the DID for the Issuer and or the Holder, you can create one here.
curl -X 'POST' \
'https://signatory.ssikit.walt.id/v1/credentials/issue' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "UniversityDegree",
"config":
{
"issuerDid": "did:web:walt.id",
"subjectDid": "did:web:my.domain"
},
"credentialData":
{
"credentialSubject":
{
"degree":
{
"name": "Bachelor of Science and Arts",
"type": "BachelorDegree"
}
}
}
}'
Check out the Issue with status section to learn about how to issue a verifiable credential with a credentialStatus property.
Templates
The currently available template functions are:
list - display the list of Templates
import - import a custom template
load - display the content of the template having the specified
id
List templates
The /v1/templates
endpoint returns the list of the available template id
s
curl -X 'GET' \
'https://signatory.ssikit.walt.id/v1/templates' \
-H 'accept: application/json'
E.g. List the templates
curl -X 'GET' \
'https://signatory.ssikit.walt.id/v1/templates' \
-H 'accept: application/json'
Import template
The /v1/templates/{id}
endpoint to import your custom credential template
id path parameter (required) -
id
of the template, e.g.MyCustomCredential
curl -X 'POST' \
'https://signatory.ssikit.walt.id/v1/templates/{id}' \
-H 'accept: application/json'
-H 'Content-Type: application/json' \
-d '<request-body>'
Load template
The /v1/templates/{id}
endpoint displays the content of the template having the parameters:
id path parameter (required) -
id
of the template
curl -X 'GET' \
'https://signatory.ssikit.walt.id/v1/templates/{id}' \
-H 'accept: application/json'
E.g. Load the template for the id
set to UniversityDegree.
curl -X 'GET' \
'https://signatory.ssikit.walt.id/v1/templates/UniversityDegree' \
-H 'accept: application/json'
Revocations
Refer to Credential Statuses section for more details on verifiable credential revocations.
Last updated
Was this helpful?