Create a presentation request
Creates a short lived presentation request based on an existing presentation template. The request is returned in the form of a JWM message and must be signed and sent to the holder via one of the following methods:
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>The presentation request payload
application/json- body
challenge*stringThis unique identifier will be used to validate the presentation response sent to the configured callbackUrl. By comparing challenge with the challengeId value in the response, you can ensure it was sent by the intended MATTR VII tenant.
did*stringThis is the DID associated with the verifier. It must be available on the tenant and have a key type that is able to be used for messaging (e.g. a ed25519 key type).
templateId*stringThe id value of an existing presentation template that will be used to create the presentation request.
expiresTime?numberOnce the time (Unix time) is reached the presentation corresponding to the challenge will not be accepted. For the purpose of testing you may wish to extend this out. Value cannot be more than 30 minutes (1800000ms) in the future, which is the maximal expiry period for a presentation request. Defaults to five minutes if no value is provided.
callbackUrl*stringThis is the path that you want MATTR VII to message (in the form of a JSON body) once it has received and processed the verifiable presentation from the mobile wallet holder:
- Must be a valid URL.
- Must use the HTTPS protocol.
- Must not be an IP address.
- Must be available, accept POST requests and respond with a 200 OK.
uriPresentation request created
application/json- response
id?stringPresentation Request id
callbackUrl?stringEndpoint that will receive the Verifiable Presentation
urirequest?Presentation Request Details
didcommUri?stringA DIDComm URI that is pointing to a shortened presentation request JWS message
uricurl -X POST 'https://example.vii.au01.mattr.global/v2/credentials/web-semantic/presentations/requests' \ -H 'Content-Type: application/json' \ -d '{ "challenge": "64e45290-9980-11ea-b872-f1bee5fb328f", "did": "did:key:z6Mkt7bFYc4V2HdAxwhMtaY6cgJckYXwhYdPLJCcnVqzrkpr", "templateId": "64e45290-9980-11ea-b872-f1bee5fb328f", "callbackUrl": "https://your-website.com/api/callback"}'{ "id": "c74128a0-9949-11ea-9554-b5a630b3c119", "callbackUrl": "https://your-website.com/api/callback", "request": { "id": "c74128a0-9949-11ea-9554-b5a630b3c119", "type": "https://mattr.global/schemas/verifiable-presentation/request/QueryByExample", "from": "did:key:z6MkrYVmyqSA93o4B1GwERM8kaQDMAUKAFV2TC3weQKeg9Gq", "created_time": 1606709582907, "expires_time": 2594859115000, "reply_url": "https://your-website.com/api/callback", "reply_to": [ "did:key:z6MkrYVmyqSA93o4B1GwERM8kaQDMAUKAFV2TC3weQKeg9Gq" ], "body": { "id": "64e45290-9980-11ea-b872-f1bee5fb328f", "domain": "tenant.vii.mattr.global", "name": "alumni_credential_request", "query": [ { "type": "QueryByExample", "credentialQuery": [ { "required": true, "reason": "string", "example": { "@context": [ null ], "type": "AlumniCredential", "trustedIssuer": [ { "required": true, "issuer": "string" } ] } } ] } ], "challenge": "e1b35ae0-9e0e-11ea-9bbf-a387b27c9e60" } }, "didcommUri": "http://example.com"}How would you rate this page?
Delete a presentation template DELETE
Deletes an existing presentation template by its ID.
Verify a verifiable presentation POST
Verifies a provided verifiable presentation that adheres to the [W3C Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model/#presentations): - Ensures the presentation conforms to the VC Data model. - For each `verifiableCredential` objects: - Issuer DID can be resolved. - JSON-LD context is valid for subject claims. - Proof is valid & the credential has not been tampered with. - Is not in a `revoked` status on a `RevocationList2020`. - The proof is valid for each subjectDID to prove ownership. - Valid proof exists for the presentation `holderDID`. The request must include a `presentation` object that adheres to the [W3C Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model/#presentations). If a `challenge` and/or `domain` is provided they are used for credential verification. Otherwise, the `challenge` and/or `domain` within the presentation proof is used instead.