light-mode-image
Learn
API ReferenceJSON

Create a presentation request

Roles

adminverifier

Analytics Events

PRESENTATION_WEB_SEMANTIC_REQUEST_CREATE_STARTPRESENTATION_WEB_SEMANTIC_REQUEST_CREATE_SUCCESSPRESENTATION_WEB_SEMANTIC_REQUEST_CREATE_FAIL
POST/v2/credentials/web-semantic/presentations/requests

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:

  • QR code.
  • Deeplink.
  • Encrypted and sent as a wallet notification.

Analytic events

  • PRESENTATION_WEB_SEMANTIC_REQUEST_CREATE_START
  • PRESENTATION_WEB_SEMANTIC_REQUEST_CREATE_SUCCESS
  • PRESENTATION_WEB_SEMANTIC_REQUEST_CREATE_FAIL

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

The presentation request payload

Response Body

application/json

application/json

curl -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"
}
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

How would you rate this page?