light-mode-image
Learn
MATTR VII PlatformCWT credentials

Sign a CWT credential

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.

Analytics Events

CREDENTIAL_COMPACT_SIGN_STARTCREDENTIAL_COMPACT_SIGN_SUCCESSCREDENTIAL_COMPACT_SIGN_FAIL

Roles

adminissuer
POST/v2/credentials/compact/sign
AuthorizationBearer <token>

In: header

CWT credential payload to sign

payloadCompactCredentialSignRequest

CompactCredentialSignRequest

revocable?boolean

When set to true, the signed credential can later be revoked. When set to false, the credential cannot be revoked.

Defaultfalse
isRevoked?boolean

When 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.

Defaultfalse

Response Body

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

How would you rate this page?