light-mode-image
Learn
MATTR VII PlatformSemantic CWT credentials

Sign a Semantic CWT credential

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

Analytics Events

CREDENTIAL_COMPACT_SEMANTIC_SIGN_STARTCREDENTIAL_COMPACT_SEMANTIC_SIGN_SUCCESSCREDENTIAL_COMPACT_SEMANTIC_SIGN_FAIL

Roles

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

In: header

Semantic CWT credential payload to sign

payloadCompactSemanticCredentialSignRequest

CompactSemanticCredentialSignRequest

revocable?boolean

When set to true, the created 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-semantic/sign" \  -H "Content-Type: application/json" \  -d '{    "payload": {      "iss": "did:web:organization.com",      "vc": {        "type": "AlumniCredential",        "credentialSubject": {          "property1": "...",          "property2": "..."        }      }    }  }'
{
  "id": "string",
  "encoded": "CSS:/1/BASE_32_ENCODED_PAYLOAD",
  "decoded": {
    "iss": "did:web:example.com",
    "jti": "...",
    "nbf": 1645743759,
    "exp": 1645743759,
    "iat": 1645743759,
    "aud": "...",
    "sub": "...",
    "vc": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://www.w3.org/2018/credentials/examples/v1"
      ],
      "type": [
        "VerifiableCredential",
        "AlumniCredential"
      ],
      "credentialSubject": {
        "property1": "...",
        "property2": "..."
      }
    },
    "status": {
      "url": "...",
      "index": 123
    }
  }
}
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

How would you rate this page?