Trust Registries

Publish a verifiable accreditation for a DID.

post

Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.

Authorizations
Query parameters
accreditationTypestring · enumRequired

Select the type of accreditation to be issued.

Possible values:
Body

Input fields for the creating a Verifiable Accreditation.

issuerDidstringRequired

DID of the Verifiable Accreditation issuer. This needs to be a did:cheqd DID.

Example: did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
subjectDidstringRequired

DID of the Verifiable Accreditation holder/subject. This needs to be a did:cheqd DID.

Example: did:cheqd:testnet:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
accreditationNamestringRequired

Unique name of the Verifiable Accreditation.

attributesobjectOptional

JSON object containing the attributes to be included in the Accreditation.

@contextstring[]Optional

Optional properties to be included in the @context property of the Accreditation.

Example: ["https://schema.org/schema.jsonld","https://veramo.io/contexts/profile/v1"]
parentAccreditationstringOptional

DID URL of the parent Verifiable Accreditation, required for accredit/attest operation.

rootAuthorizationstringOptional

DID URL of the root Verifiable Accreditation, required for accredit/attest operation.

trustFrameworkstringOptional

Name or Type of the Trust Framework, required for authorize operation.

trustFrameworkIdstringOptional

Url of the Trust Framework, required for authorize operation.

typestring[]Optional

Optional properties to be included in the type property of the Accreditation.

Example: ["Person"]
expirationDatestring · date-timeOptional

Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.

Example: 2023-06-08T13:49:28.000Z
formatstring · enumOptional

Format of the Verifiable Accreditation. Defaults to VC-JWT.

Example: jwtPossible values:
termsOfUseobject[]Optional

Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.

Example: {"type":"IssuerPolicy","id":"http://example.com/policies/credential/4","profile":"http://example.com/profiles/credential","prohibition":[{"assigner":"https://example.edu/issuers/14","assignee":"AllVerifiers","target":"http://example.edu/credentials/3732","action":["Archival"]}]}
refreshServiceobject[]Optional

RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.

Example: {"type":"ManualRefreshService2018","id":"https://example.edu/refresh/3732"}
evidenceobject[]Optional

Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.

Example: {"type":["DocumentVerification"],"id":"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231","verifier":"https://example.edu/issuers/14","evidenceDocument":"DriversLicense","subjectPresence":"Physical","documentPresence":"Physical","licenseNumber":"123AB4567"}
Responses
200

The request was successful.

application/json
post
POST /trust-registry/accreditation/issue HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 955

"issuerDid='did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0'&subjectDid='did:cheqd:testnet:2582fe17-9b25-45e4-8104-1cfca430f0c3'&schemas=[{'type':'MuseumPassCredential','url':'https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018'}]&format='jwt'&accreditationName='authorizeAccreditation'&trustFramework='https://learn.cheqd.io/governance/start'&trustFrameworkId='cheqd Governance Framework'&parentAccreditation='did:cheqd:testnet:15b74787-6e48-4fd5-8020-eab24e990578?resourceName=accreditAccreditation&resourceType=VerifiableAccreditationToAccredit'&rootAuthorization='did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorizationForTrustChain'&credentialStatus={'statusPurpose':'revocation','statusListName':'employee-credentials','statusListIndex':10}"
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://schema.org",
    "https://veramo.io/contexts/profile/v1"
  ],
  "credentialSubject": {
    "gender": "male",
    "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
    "name": "Bob"
  },
  "credentialStatus": {
    "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20",
    "statusIndex": 20,
    "statusPurpose": "suspension",
    "type": "StatusList2021Entry"
  },
  "issuanceDate": "2023-06-08T13:49:28.000Z",
  "issuer": {
    "id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
  },
  "proof": {
    "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6Y2hlcWQ6dGVzdG5ldDo3YmY4MWEyMC02MzNjLTRjYzctYmM0YS01YTQ1ODAxMDA1ZTAiLCJuYmYiOjE2ODYyMzIxNjgsInN1YiI6ImRpZDprZXk6ejZNa2hhWGdCWkR2b3REa0w1MjU3ZmFpenRpR2lDMlF0S0xHcGJubkVHdGEyZG9LIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3NjaGVtYS5vcmciLCJodHRwczovL3ZlcmFtby5pby9jb250ZXh0cy9wcm9maWxlL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImdlbmRlciI6Im1hbGUiLCJuYW1lIjoiQm9iIn0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQZXJzb24iXX19.wMfdR6RtyAZA4eoWya5Aw97wwER2Cm5Guk780Xw8H9fA3sfudIJeLRLboqixpTchqSbYeA7KbuCTAnLgXTD_Cg",
    "type": "JwtProof2020"
  },
  "type": [
    "VerifiableCredential",
    "Person"
  ]
}

Verify a verifiable accreditation for a DID.

post

Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.

Authorizations
Query parameters
verifyStatusbooleanOptional

If set to true the verification will also check the status of the accreditation. Requires the VC to have a credentialStatus property.

Default: false
allowDeactivatedDidbooleanOptional

If set to true allow to verify accreditation which based on deactivated DID.

Default: false
Body
subjectDidstringRequired

DID of the Verifiable Accreditation holder/subject. This needs to be a did:key DID.

Example: did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92
didUrlstringOptional

DID URL of the Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
didstringOptional

DID of the Verifiable Accreditation holder/subject

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
resourceIdstringOptional

Unique resource identifier of the Verifiable Accreditation

Example: 398cee0a-efac-4643-9f4c-74c48c72a14b
resourceNamestringOptional

Resource name of the Verifiable Accreditation

Example: cheqd-issuer-logo
resourceTypestringOptional

Resource type of the Verifiable Accreditation

Example: CredentialArtwork
Responses
200

The request was successful.

application/json
post
POST /trust-registry/accreditation/verify HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 498

"subjectDid='did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92'&didUrl='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork'&did='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e'&resourceId='398cee0a-efac-4643-9f4c-74c48c72a14b'&resourceName='cheqd-issuer-logo'&resourceType='CredentialArtwork'&schemas=[{'types':'text','url':'text'}]&policies={'issuanceDate':true,'expirationDate':true,'audience':false}"
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://schema.org",
    "https://veramo.io/contexts/profile/v1"
  ],
  "credentialSubject": {
    "gender": "male",
    "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
    "name": "Bob"
  },
  "credentialStatus": {
    "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20",
    "statusIndex": 20,
    "statusPurpose": "suspension",
    "type": "StatusList2021Entry"
  },
  "issuanceDate": "2023-06-08T13:49:28.000Z",
  "issuer": {
    "id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
  },
  "proof": {
    "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6Y2hlcWQ6dGVzdG5ldDo3YmY4MWEyMC02MzNjLTRjYzctYmM0YS01YTQ1ODAxMDA1ZTAiLCJuYmYiOjE2ODYyMzIxNjgsInN1YiI6ImRpZDprZXk6ejZNa2hhWGdCWkR2b3REa0w1MjU3ZmFpenRpR2lDMlF0S0xHcGJubkVHdGEyZG9LIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3NjaGVtYS5vcmciLCJodHRwczovL3ZlcmFtby5pby9jb250ZXh0cy9wcm9maWxlL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImdlbmRlciI6Im1hbGUiLCJuYW1lIjoiQm9iIn0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQZXJzb24iXX19.wMfdR6RtyAZA4eoWya5Aw97wwER2Cm5Guk780Xw8H9fA3sfudIJeLRLboqixpTchqSbYeA7KbuCTAnLgXTD_Cg",
    "type": "JwtProof2020"
  },
  "type": [
    "VerifiableCredential",
    "Person"
  ]
}

Revoke a Verifiable Accreditation.

post

This endpoint revokes a given Verifiable Accreditation. As input, it can take the didUrl as a string. The StatusList2021 or BitstringStatusList resource should already be setup in the VC and credentialStatus property present in the VC.

Authorizations
Query parameters
publishbooleanRequired

Set whether the StatusList2021 or BitstringStatusList resource should be published to the ledger or not. If set to false, the StatusList2021 or BitstringStatusList publisher should manually publish the resource.

Default: true
Body
didUrlstringOptional

Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
didstringOptionalExample: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
resourceIdstringOptionalExample: 398cee0a-efac-4643-9f4c-74c48c72a14b
resourceNamestringOptionalExample: cheqd-issuer-logo
resourceTypestringOptionalExample: CredentialArtwork
symmetricKeystringOptional

The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.

Responses
200

The request was successful.

application/json
post
POST /trust-registry/accreditation/revoke HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 336

"didUrl='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork'&did='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e'&resourceId='398cee0a-efac-4643-9f4c-74c48c72a14b'&resourceName='cheqd-issuer-logo'&resourceType='CredentialArtwork'&symmetricKey='text'"
{
  "revoked": true
}

Suspend a Verifiable Accreditation.

post

This endpoint suspends a given Verifiable Accreditation. As input, it can take the didUrl as a string. The StatusList2021 or BitstringStatusList resource should already be setup in the VC and credentialStatus property present in the VC.

Authorizations
Query parameters
publishbooleanRequired

Set whether the StatusList2021 or BitstringStatusList resource should be published to the ledger or not. If set to false, the StatusList2021 or BitstringStatusList publisher should manually publish the resource.

Default: true
Body
didUrlstringOptional

Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
didstringOptionalExample: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
resourceIdstringOptionalExample: 398cee0a-efac-4643-9f4c-74c48c72a14b
resourceNamestringOptionalExample: cheqd-issuer-logo
resourceTypestringOptionalExample: CredentialArtwork
symmetricKeystringOptional

The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.

Responses
200

The request was successful.

application/json
post
POST /trust-registry/accreditation/suspend HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 336

"didUrl='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork'&did='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e'&resourceId='398cee0a-efac-4643-9f4c-74c48c72a14b'&resourceName='cheqd-issuer-logo'&resourceType='CredentialArtwork'&symmetricKey='text'"
{
  "revoked": true
}

Reinstate a Verifiable Accreditation.

post

This endpoint reinstates a given Verifiable Accreditation. As input, it can take the didUrl as a string. The StatusList2021 or BitstringStatusList resource should already be setup in the VC and credentialStatus property present in the VC.

Authorizations
Query parameters
publishbooleanRequired

Set whether the StatusList2021 or BitstringStatusList resource should be published to the ledger or not. If set to false, the StatusList2021 or BitstringStatusList publisher should manually publish the resource.

Default: true
Body
didUrlstringOptional

Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
didstringOptionalExample: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
resourceIdstringOptionalExample: 398cee0a-efac-4643-9f4c-74c48c72a14b
resourceNamestringOptionalExample: cheqd-issuer-logo
resourceTypestringOptionalExample: CredentialArtwork
symmetricKeystringOptional

The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.

Responses
200

The request was successful.

application/json
post
POST /trust-registry/accreditation/reinstate HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 336

"didUrl='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork'&did='did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e'&resourceId='398cee0a-efac-4643-9f4c-74c48c72a14b'&resourceName='cheqd-issuer-logo'&resourceType='CredentialArtwork'&symmetricKey='text'"
{
  "revoked": true
}

Was this helpful?