Create a presentation template
Roles
Analytics Events
/v2/credentials/web-semantic/presentations/templatesCreates a presentation template defining what type of credential is required for a particular verification workflow. Presentation templates are used to create presentation requests that are shared with a specific holder.
Analytic events
- PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_START
- PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_SUCCESS
- PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_FAIL
Authorization
bearerAuth In: header
Request Body
application/json
The template
Response Body
application/json
application/json
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/presentations/templates" \ -H "Content-Type: application/json" \ -d '{ "domain": "tenant.vii.mattr.global", "name": "alumni_credential_request", "query": [ { "type": "QueryByExample", "credentialQuery": [ { "required": true, "reason": "We need you to prove your alumni membership.", "example": { "@context": [ "https://optionalschema.example/" ], "type": "AlumniCredential", "trustedIssuer": [ { "required": true, "issuer": "did:key:z6MkjBWPPa1njEKygyr3LR3pRKkqv714vyTkfnUdP6ToFSH5" } ] } } ] } ] }'{
"id": "364b6a1b-3600-4927-a6ac-4d66aa6bbac3",
"domain": "tenant.vii.mattr.global",
"name": "alumni_credential_request",
"query": [
{
"type": "QueryByExample",
"credentialQuery": [
{
"required": true,
"reason": "We need you to prove your alumni membership.",
"example": {
"@context": [
"https://optionalschema.example/"
],
"type": "AlumniCredential",
"trustedIssuer": [
{
"required": true,
"issuer": "did:key:z6MkjBWPPa1njEKygyr3LR3pRKkqv714vyTkfnUdP6ToFSH5"
}
]
}
}
]
}
]
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}How would you rate this page?
Verify a JSON credential POST
Verify a JSON credential by providing its payload. The credential is verified against the following criteria: - Issuer DID can be resolved, so that the referenced DID Document is available and valid and the public key is obtainable. - Proof is valid and the credential has not been tampered with. - JSON-LD context is valid for subject claims. Optional verification checks: - If `assertExpiry` is set to `true` and the credential has a set expiration date, verification will fail if the expiration date has passed. - If `checkRevocation` is set to `true` and the provided credential contains a revocation status list, verification will fail if the credential has been set to `revoked`. ### **Analytic events** * CREDENTIAL_WEB_SEMANTIC_VERIFY_START * CREDENTIAL_WEB_SEMANTIC_VERIFY_SUCCESS * CREDENTIAL_WEB_SEMANTIC_VERIFY_FAIL
Retrieve all presentation templates GET
Returns a list of all presentation templates on your tenant. ### **Analytic events** * PRESENTATION_WEB_SEMANTIC_TEMPLATE_RETRIEVE_LIST_START * PRESENTATION_WEB_SEMANTIC_TEMPLATE_RETRIEVE_LIST_SUCCESS * PRESENTATION_WEB_SEMANTIC_TEMPLATE_RETRIEVE_LIST_FAIL