Create a Compact Semantic Credential

The Compact Semantic Credential represents the credential claims inside of a W3C Verifiable Credential data model which is then signed as a Compact Credential.  

If you need a credential that is more compact at the expense of not using a semantic data model, then look at the tutorial for issuing a Compact Credential.


  • Access to MATTR VII APIs. If you’re experiencing any difficulties, contact us.

  • Issuer DID: This is a did:web that identifies the issuer who attests the claims in the credential are accurate. Refer to create a did:web if you need assistance in creating one. You can only sign Compact Credentials using DIDs with a P-256 key type. Note that MATTR VII creates did:webs with this key type by default.

  • Claim values: The claims you wish to include in the credential. This is the information attested by the issuer. Compact Semantic Credentials include two types of claims:

    • Standard claims: These must be in a specific structure and format for the credential to be valid. Refer to the example request below for more information. Standard claims are included in the credential top level.

    • Custom claims: These claims must comply with the W3C Verifiable Credentials Data Model 1.0 and its vocabulary context. Custom claims are included inside a vc object inside the credential.


Make the following request to create and sign a Compact Semantic Credential:

Copy to clipboard.
1POST https://YOUR_TENANT_URL/v2/credentials/compact-semantic/sign
Copy to clipboard.
2    "payload": {
3        "iss": "",
4        "nbf": 1704099600,
5        "exp": 1767258000,
6        "vc": {
7            "type": "Course Credential",
8            "credentialSubject": {
9                "name": "Emma Tasma",
10                "code": "HS.278",
11                "certificationName": "Working at Heights",
12                "certificationLevel": "Level 4",
13                "issuerName": "Advanced Safety Training",
14                "expiry": "2026-01-01"
15            }
16        }
17    },
18    "revocable": true
  • iss: Use the DID that identifies the credential's issuer, which attests the claims in the credential. This must be a publicly available and resolvable did:web for the credential to be valid and verifiable.

  • nbf: Set the time and date the credential will be active from ( in Unix Epoch time) .

  • exp: Set the time and date the credential will expire (in Unix Epoch time).

  • vc: This object includes all custom claims in the credential, which must comply with the W3C Verifiable Credentials Data Model 1.0 and its vocabulary context.

  • revocable: When set to true, the created credential can later be revoked. When set to false, the credential cannot be revoked.


Copy to clipboard.
2    "id": "urn:uuid:78e19496-8521-424b-8315-35fb1ecaf681",
3    "decoded": {
4        "iss": "",
5        "nbf": 1704099600,
6        "vc": {
7            "@context": [
8                ""
9            ],
10            "type": [
11                "VerifiableCredential",
12                "Course Credential"
13            ],
14            "credentialSubject": {
15                "name": "Emma Tasma",
16                "code": "HS.278",
17                "certificationName": "Working at Heights",
18                "certificationLevel": "Level 4",
19                "issuerName": "Advanced Safety Training",
20                "expiry": "2026-01-01"
21            }
22        },
23        "exp": 1767258000,
24        "status": {
25            "index": 0,
26            "url": ""
27        },
28        "jti": "urn:uuid:78e19496-8521-424b-8315-35fb1ecaf681"
29    },
  • id: Unique credential identifier. This is required when revoking a credential.

  • decoded: This is the decoded version of the credential. It includes all the information from the request above, with the addition of the following elements:

    • status: If revocable was set to true in the request, this object is used to provide information required for revocation:

      • index: This indicates the index of this specific credential within the revocation list.

      • url: Every revocable credential will reference a Revocation List that is automatically created and held on the issuer's tenant. This list can be used by external verifiers to validate the credential status. The status.url property references the Revocation List which holds the revocation status for this specific credential.

    • jti: This JWT ID identifies this credential and is identical to the id element. When revocable is set to true, this value is persisted on the tenant to enable revoking this specific credential.

  • encoded: The base32 encoded string representation of the Compact Semantic Credential. CSC stands for COSE_SIGN Compact profile. You will use this element to convert the credential into a format that can be shared with a holder.

What's next?

Now that you have created the credential, you can format it as a QR code, a PDF document, an Apple digital pass or a Google digital pass.