light-mode-image
Learn
API ReferenceJSON

Create a presentation template

Roles

adminverifier

Analytics Events

PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_STARTPRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_SUCCESSPRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_FAIL
POST/v2/credentials/web-semantic/presentations/templates

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.

Analytic events

  • PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_START
  • PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_SUCCESS
  • PRESENTATION_WEB_SEMANTIC_TEMPLATE_CREATE_FAIL

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

The template

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/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?