Create a presentation template
Creates 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.
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>The template
application/json- body
domain*stringInforms the wallet holder what domain is the verification request coming from. The value must match your tenant URL or your custom domain (if you have one set up). If the domain validation is unsuccessful, the wallet will not let the user proceed with the verification workflow.
name*stringUnique value that is used internally to manage your templates. It must be unique across all presentation templates on your tenant, but is not shown to the holder.
query*array<||>Indicates what type of query method would be used by presentation requests created from this presentation template:
- QueryByExample: This query method uses the credential
typeandtrustedIssuerto only accept verifiable presentations that match these parameters. - QueryByFrame: This query method is used to create presentation requests that only require specific claims in the verifiable presentations and thus enable selective disclosure.
- DidAuth: This query method id used to authenticate with the tenant and provide the holder's DID.
You can request multiple credentials in one request by adding additional
credentialQueryobjects to thequeryarray.
Presentation template created
application/json- response
id*stringUnique identifier for this presentation template. You will need it to create a presentation request based on this template. You can also use it to retrieve, update or remove this presentation template.
domain*stringname*stringquery*array<||>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" } ] } } ] } ]}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`.
Retrieve all presentation templates GET
Returns a list of all presentation templates on your tenant.