Issuance
Sign a CWT credential
/v2/credentials/compact/signAuthorization
bearerAuth In: header
Request Body
application/json
CWT credential payload to sign
CompactCredentialSignRequest
When set to true, the signed credential can later be revoked. When set to false, the credential cannot be revoked.
falseWhen set to true, the signed credential is issued as revoked, and must be unrevoked to become valid. If isRevoked is provided (e.g. set to either true or false), revocable must be set to true.
falseResponse Body
application/json
application/json
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact/sign" \ -H "Content-Type: application/json" \ -d '{ "payload": { "iss": "did:web:organization.com", "property1": "...", "property2": "..." } }'{
"id": "string",
"encoded": "CSC:/1/2KCE3IQEJB5DCMSLN5KWKZABE2QFQRVDAF4CIZDJMQ5HOZLCHIYDGOJUFUYTENJNGIZTOLJVGIWTCMJQFZXGO4TPNMXGS33ENZQW2ZLEJJXWQ3QH3BAFB3LISHKGQ2KBJ6Q35NXZFD6LGZ2YIAYHZAKCF7NKTIUZUTZQ3PWDBALAWVRG5XL2H4P4WFK25X3Y5X5RTN7NOZUST67KLCEFS3EPXQU5KM7VUGOPXJLQ6K5U676PMQNWRZCZ",
"decoded": {
"iss": "did:web:organization.com",
"nbf": 1645743759,
"exp": 1646743759,
"iat": 1645743759,
"jti": "6tVMmKodQNaLywW6NGA2aA",
"type": "CredentialType",
"property1": "...",
"property2": "..."
}
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}Format a CWT credential as a QR code
/v2/credentials/compact/qrcodeAuthorization
bearerAuth In: header
Request Body
application/json
String representation of the encoded CWT credential.
Optionally specify the desired width of the output QR code. When no width is specified MATTR VII will generate a QR code with an optimised width based on the size of the payload. Maximal value is 1000px.
Response Body
image/png
application/json
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact/qrcode" \ -H "Content-Type: application/json" \ -d '{ "payload": "CSS:/1/2KCE3IQEJB5DCMSMGRKXI3IBE2QFSANKVACBUYQYB2HQKGTCDAHI6BQ2MIMA5DYBPAUWI2L..." }'"string"{
"code": "BadRequest",
"message": "Validation Error",
"details": [
{
"value": "1",
"msg": "must be a string",
"param": "payload",
"location": "body"
}
]
}Format a CWT credential as a PDF
/v2/credentials/compact/pdfAuthorization
bearerAuth In: header
Request Body
application/json
Credential payload
Use the ID element of the PDF template to be used to format this credential.
1 <= lengthString payload representation of the encoded CWT credential.
1 <= length <= 1024Response Body
application/pdf
application/json
application/json
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact/pdf" \ -H "Content-Type: application/json" \ -d '{ "templateId": "4eea7654-d4c5-4eba-bd7a-5ca334d54725", "payload": "{payload}" }'null{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}Format a CWT credential as an Apple Pass
/v2/credentials/compact/digital-pass/appleAuthorization
bearerAuth In: header
Request Body
application/json
objectResponse Body
application/vnd.apple.pkpass
application/json
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact/digital-pass/apple" \ -H "Content-Type: application/json" \ -d '{ "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378", "payload": "{payload}" }'"string"{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}Format a CWT credential as a Google Pass
/v2/credentials/compact/digital-pass/googleAuthorization
bearerAuth In: header
Request Body
application/json
objectResponse Body
application/json
application/json
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact/digital-pass/google" \ -H "Content-Type: application/json" \ -d '{ "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378", "payload": "{payload}" }'{
"redirectTo": "https://pay.google.com/gp/v/save/{jwt}"
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}How would you rate this page?