light-mode-image
Learn
API Reference

Issuance

Sign a CWT credential

POST/v2/credentials/compact/sign

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

CWT credential payload to sign

TypeScript Definitions

Use the request body type in TypeScript.

Sign CWT credential Request

Response Body

application/json

application/json

curl -X POST "https://example.com/v2/credentials/compact/sign" \  -H "Content-Type: application/json" \  -d '{    "payload": {      "iss": "string",      "property1": "string",      "property2": "string"    }  }'
{  "id": "string",  "encoded": "string",  "decoded": {    "iss": "string",    "jti": "string",    "nbf": 0,    "exp": 0,    "iat": 0,    "aud": "string",    "sub": "string",    "type": "string",    "status": {      "url": "string",      "index": 0    },    "property1": "string",    "property2": "string"  }}

Format a CWT credential as a QR code

POST/v2/credentials/compact/qrcode

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

image/png

application/json

curl -X POST "https://example.com/v2/credentials/compact/qrcode" \  -H "Content-Type: application/json" \  -d '{    "payload": "string"  }'
"string"

Format a CWT credential as a PDF

POST/v2/credentials/compact/pdf

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

Credential payload

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/pdf

application/json

application/json

curl -X POST "https://example.com/v2/credentials/compact/pdf" \  -H "Content-Type: application/json" \  -d '{    "templateId": "4eea7654-d4c5-4eba-bd7a-5ca334d54725",    "payload": "{payload}"  }'
null

Format a CWT credential as an Apple Pass

POST/v2/credentials/compact/digital-pass/apple

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*CreateDigitalPassRequest
Formatobject

Response Body

application/vnd.apple.pkpass

application/json

curl -X POST "https://example.com/v2/credentials/compact/digital-pass/apple" \  -H "Content-Type: application/json" \  -d '{    "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378",    "payload": "{payload}"  }'
"string"

Format a CWT credential as a Google Pass

POST/v2/credentials/compact/digital-pass/google

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*CreateDigitalPassRequest
Formatobject

Response Body

application/json

application/json

curl -X POST "https://example.com/v2/credentials/compact/digital-pass/google" \  -H "Content-Type: application/json" \  -d '{    "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378",    "payload": "{payload}"  }'
{  "redirectTo": "string"}

How would you rate this page?

Last updated on

On this page