light-mode-image
Learn
API ReferenceCWT credentials

Sign a CWT credential

Roles

adminissuermanaged-issuer

Analytics Events

CREDENTIAL_COMPACT_SIGN_STARTCREDENTIAL_COMPACT_SIGN_SUCCESSCREDENTIAL_COMPACT_SIGN_FAIL
POST/v2/credentials/compact/sign

Returns a signed CWT credential generated from a provided valid payload.

The payload can include any number of custom claims, as CWT credentials do not comply with any specific standard or specification.

Analytic events

  • CREDENTIAL_COMPACT_SIGN_START
  • CREDENTIAL_COMPACT_SIGN_SUCCESS
  • CREDENTIAL_COMPACT_SIGN_FAIL

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"  }}

How would you rate this page?