Truvera Documentation portal
WebsiteTruvera Workspace
  • Truvera overview
    • Decentralized identity explained
    • Roadmap
    • Subscription plans & billing
  • Solutions
    • Biometric-Bound Credentials
  • Truvera Workspace
    • Create an organization profile (DID)
    • Issue verifiable credentials
      • Filtering, downloading and deleting credentials
    • Verify credentials
    • Create a schema
    • Create a design
    • Team management
      • Inviting a team member
      • Removing a team member
      • Changing team member roles
      • Data retention policies
      • Sub-accounts
    • Revoking credentials
    • Ecosystem Tools
      • Ecosystem set up
      • Ecosystem example
    • Monetizing credentials
      • Setting up monetizable credentials
    • Creating API keys and webhook endpoints
    • Transaction history
    • Custom branded distribution emails
    • Truvera Workspace release notes
      • 2025 Release notes
        • Release notes Q1 2025
      • 2024 Release notes
        • Release Notes February 2024
        • Release Notes March 2024
        • Release Notes April 2024
        • Release Notes May 2024
        • Release Notes June 2024
        • Release Notes July 2024
        • Release Notes August 2024
        • Release Notes September 2024
        • Release Notes October 2024
        • Release notes November 2024
        • Release notes December 2024
  • Truvera API
    • Getting started
    • Webhooks
      • Webhooks API endpoints
    • Sample Postman collections
      • Issue-Store-Verify sample flow
      • Create ecosystems
      • Issue monetizable credentials
      • Create sub-accounts
      • Issue OpenID credentials
    • Truvera Swagger UI
    • DIDs
    • Profiles
    • Credentials
    • Presentations
      • Proof templates
      • Proof requests
      • Other proof endpoints
    • Registries
    • Revocation Status
    • Credential Schemas
    • Jobs
    • Templates
    • Sub-accounts
    • Teams
    • Messaging
    • OpenID
      • OpenID Issuance and Verification Integration Guide
    • iden3comm
    • Ecosystem Tools
      • Trust Registry Integration Guide
      • Creating a Trust Registry
      • Inviting participants
      • Verifiers and Public info
      • Trust Registry Schemas
      • Trust Registry Proof Templates
      • Reports
      • Updating and Deleting Trust Registry
    • Issuing paid credentials (KVAC algorithm integration)
    • Data
    • Verify
    • Keys
    • Schemas
  • System architecture
    • Proposed architecture with Truvera
    • Revocation
    • System scalability
    • Security policies
    • How data is processed and stored
  • Supported standards
    • Interoperability with OpenID
  • Credential wallet
    • Create and manage DIDs in the Truvera Wallet
    • Truvera Wallet release notes
      • Release Notes 2025Q1
      • Release Notes 2024Q4
      • Release Notes 2024Q3
        • Release Notes September 2024
        • Release Notes August 2024
        • Release Notes July 2024
      • Release Notes June 2024
      • Release Notes May 2024
      • Release Notes April 2024
    • White label wallet
      • Configuration
        • Enabling and Disabling Features
        • Customizing the Styling
        • Configuring for Android Builds
        • Configuring iOS Builds
      • Publishing in App Stores
        • Android Build Testing and Publishing
        • iOS Build Testing and Publishing
    • Wallet SDK
      • Getting started
        • Example Credential
        • Presentation definition
        • Verify credentials
      • Cloud wallet
      • Biometric plugin
      • Ecosystem Tools
    • Download Truvera Wallet
  • Open source community
    • Code of Conduct
    • Truvera Credential SDK
    • Blockchain archives
      • DOCK token
        • Migration terms and conditions
  • Support
    • System Status
    • Discord
    • Support services
    • Security policy
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Truvera API

Credentials

PreviousProfilesNextPresentations

Last updated 23 days ago

Was this helpful?

You can create and sign Verifiable Credentials using Truvera API. By default, Truvera does not store the credential - only its metadata. You can choose to persist a credential, in which case we will encrypt and store the credential for later retrieval using a password. Verifiable Credentials are cryptographically secure and tamper-proof. Once issued, they cannot be edited.

Issue Credential

Creates and issues a JSON-LD Verifiable Credential that conforms to the . The type values and subject properties must be represented by a schema URI in the context property. If you do not specify a context property, the API will automatically generate an embedded JSON-LD context based on the properties within your credential. You can read more about JSON-LD and contexts .

The https://www.w3.org/2018/credentials/v1 context URI is always required and will be supplied by default at all times as mandated by the spec. If you pass a custom context, you must ensure that you define all the required JSON-LD terms. Please also note that the request format here is not the same as an issued verifiable credential. You can issue to multiple subjects per credential by passing an array of objects.

To sign a credential, an issuer must be supplied as either a fully qualified DID string or an object with at least an id property which is a fully qualified DID. (e.g: did:dock:xyz)

The issuer property must be a DID that you control with your Truvera account.

By default, Truvera does not store the credential contents at all - only minimal credential metadata. You can choose to set the persist value to true and provide a password string which will store the credential contents encrypted on our platform. The following metadata is stored on each issuance:

  • Credential ID property

  • Credential size in bytes

  • Issuer DID

  • Issuance date

Zero Knowledge Proofs (ZKP)

Truvera credentials support using Zero Knowledge Proofs and by using the BBS2023 signing algorithm when issuing the credential. To enable this functionality, simply set the algorithm field in the request to dockbbs.

Credential Distribution

Truvera's API has built in credential distribution on issuance, allowing you to send credentials directly to a holder's email and/or Truvera-compatible wallet. You can achieve this by supplying the recipientEmail field and distribute: true in your request. For DID distribution, simply set the credentialSubject.id property to the holder's DID.

Revocation

One time use credentials can be created, but automating the revocation based on tracking the verification of the credential ID and revoking the credential associated with it.

Attaching files

At the moment it is not possible to add a file to the credential itself. If a credential has to have a file associated with it, the file will need to be placed in public storage and the link to that location and a hash of the content should be added to the attributes of the credential.

List Credentials

When you issue a credential with us, persistent or not, we will store certain metadata about the credential to make it easier for you to reference. You can pull a list of credential metadata using this route. To return the content of a persisted credential, you should use the GET /credentials/{id} route.

Get credentials metadata and contents

When a credential has been persisted on our systems, you can fetch the credential data by supplying a credential ID and the password used at issuance to encrypt the credential.

Create request claims

Creates a request to gather certain claims and then issues the holder a credential after submission. The claims are user provided and type is based on the schema provided. This can be useful to catch a subject's DID without knowing it beforehand, name or other field. It should only be used when you do not already know this data or cannot find it by other means. There is a risk that a user may enter false data - so use it sparingly and not for fields that are important.

Typically, once the request has been created, you would show the holder the QR URL as an image or deep link for them to scan with a wallet and enter claims. After the holder submits the requested information the credential is automatically issued.

Get request claims

Lists all created request claims that are open (the holders have not submitted the requested information).

Delete Credential

A credential can have its metadata deleted, and if persisted the contents will also be deleted. Deleting a credential will remove any reference to it and its contents from our systems. This action cannot be undone. This action will not revoke or invalidate the credential in any way.

In order to support revocation the credential must be linked to a at the time of issuance. To link the revocation registry to the credential set the status field in the body to the registry.id value.

W3C VCDM specification
here
anonymous credentials
Selective Disclosure
revocation registry
Credential

List Credentials

get

Get all credential metadata

Authorizations
Query parameters
offsetinteger · int32Optional

How many items to offset by for pagination

Default: 0
limitinteger · int32 · min: 1 · max: 100Optional

How many items to return at one time (max 100)

Default: 64
filterstringOptional

Filter by specific Credential ID, Subject Ref, Issuer, Type, Created Date or Issue Date

Responses
200
The request was successful and will return the credential metadata.
application/json
400
Application error
application/json
get
GET /credentials HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "https://creds.truvera.io/521bb7...",
    "issuerKey": "did:key:z6Mk...dsmK",
    "issuerName": "Truvera Issuer",
    "type": "VerifiableCredential",
    "revocationRegistry": "e6d3...59d1",
    "revoked": false,
    "createdAt": "2024-09-20T11:13:03.445Z",
    "expiryDate": "2024-09-20T11:13:03.445Z",
    "expirationDate": "2024-09-20T11:13:03.445Z",
    "issuanceDate": "2024-09-20T11:13:02.648Z",
    "byteSize": 1003,
    "persist": false,
    "index": "1004",
    "subjectRef": "Truvera Ref",
    "whitelabel": null,
    "algorithm": "dockbbs",
    "credential": {
      "@context": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
      "id": "text",
      "type": [
        "text"
      ],
      "credentialSubject": {},
      "issuer": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
      "issuanceDate": "2025-05-16T13:02:22.134Z",
      "expirationDate": "2025-05-16T13:02:22.134Z",
      "credentialStatus": {},
      "proof": {
        "type": "Ed25519Signature2018",
        "proofPurpose": "assertionMethod",
        "verificationMethod": "text",
        "created": "2025-05-16T13:02:22.134Z",
        "proofValue": "text"
      }
    }
  }
]

Get credential metadata and contents if persistent

get

Get credential metadata and contents if persistent

Authorizations
Path parameters
idstring · uri · min: 8Required

Valid URI

Example: https://credentials.truvera.io/1234
Query parameters
passwordstring · min: 4 · max: 64Optional

The encryption password used when issuing/storing the credential

Responses
200
The request was successful and will return the credential metadata and its JSON contents (if password was supplied).
application/json
400
Error retrieving the credential
application/json
404
Credential was not found.
application/json
get
GET /credentials/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "https://creds.truvera.io/521bb7...",
  "issuerKey": "did:key:z6Mk...dsmK",
  "issuerName": "Truvera Issuer",
  "type": "VerifiableCredential",
  "revocationRegistry": "e6d3...59d1",
  "revoked": false,
  "createdAt": "2024-09-20T11:13:03.445Z",
  "expiryDate": "2024-09-20T11:13:03.445Z",
  "expirationDate": "2024-09-20T11:13:03.445Z",
  "issuanceDate": "2024-09-20T11:13:02.648Z",
  "byteSize": 1003,
  "persist": false,
  "index": "1004",
  "subjectRef": "Truvera Ref",
  "whitelabel": null,
  "algorithm": "dockbbs",
  "credential": {
    "@context": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
    "id": "text",
    "type": [
      "text"
    ],
    "credentialSubject": {},
    "issuer": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "issuanceDate": "2025-05-16T13:02:22.134Z",
    "expirationDate": "2025-05-16T13:02:22.134Z",
    "credentialStatus": {},
    "proof": {
      "type": "Ed25519Signature2018",
      "proofPurpose": "assertionMethod",
      "verificationMethod": "text",
      "created": "2025-05-16T13:02:22.134Z",
      "proofValue": "text"
    }
  }
}

Delete a Credential

delete

Deletes all credential metadata and contents from the client. More info about Delete Credentials

Authorizations
Path parameters
idstring · uri · min: 8Required

Valid URI

Example: https://credentials.truvera.io/1234
Query parameters
passwordstring · min: 4 · max: 64Optional

The encryption password used when issuing/storing the credential

Responses
200
Credential has been deleted.
application/json
Responseobject
400
Error retrieving the credential
application/json
404
Credential was not found.
application/json
delete
DELETE /credentials/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{}

Issue a Credential

post

Creates and issues a verifiable credential with supplied data. More info about Issue a Credential

Authorizations
Body
persistbooleanOptional

Whether to store an encrypted version of this credential with us. Defaults to false, if true you must supply password.

Default: falseExample: true
passwordstring · min: 4 · max: 32Optional

Password used to encrypt the credential if you choose to store it. The same password must be used to retrieve the credential contents. Truvera does not store this password.

Example: securepass
anchorbooleanOptionalDeprecated

Anchor the credential on the blockchain or not

Default: falseExample: false
templatestring · uuidOptional

The credential template UUID, only required for PDF and web rendering customization

recipientEmailstringOptional

The holder's email for email distribution, optional. Not required for OpenID flows.

algorithmstring · min: 4 · max: 32Optional

Optional. Specifies which signing algorithm to use to sign the issued credential. Defaults to ed25519, for ZKP credendials use dockbbs.

Default: ed25519Example: dockbbs
distributebooleanOptional

Whether to distribute the credential or not based on subject DID or email address. Not required for OpenID flows.

Default: falseExample: false
formatstring · enumOptional

Specifies the output format of the credential, either jsonld or jwt. Defaults to jsonld.

Example: jsonldPossible values:
revocablebooleanOptional

Whether the credential can be revoked or not. If true the revocation registry will be automatically provisioned.

Default: falseExample: true
Responses
200
The request was successful and returns the created Verifiable Credential.
application/json
400
The request was unsuccessful, because of invalid/insufficient credential params.
application/json
401
The request was unsuccessful, either because the authorization token was missing/invalid or you don't own the DID.
application/json
402
Transaction limit reached or upgrade required to proceed.
application/json
404
Resource was not found.
application/json
post
POST /credentials HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 675

{
  "persist": true,
  "password": "securepass",
  "template": "",
  "recipientEmail": "",
  "algorithm": "dockbbs",
  "distribute": false,
  "format": "jsonld",
  "credential": {
    "id": "",
    "name": "Basic Credential",
    "description": "My first credential",
    "schema": "https://docknetwork.github.io/vc-schemas/basic-credential.json",
    "context": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
    "type": [
      "BasicCredential"
    ],
    "subject": {
      "id": "did:key:z6MkqBcwvYurNSSqyBkxavv4fkaq2iu3v3YGMbdyfa4bVNxD",
      "name": "A. Holder"
    },
    "issuer": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "issuanceDate": "2025-05-16T13:02:22.134Z",
    "expirationDate": "2030-09-20T00:13:59.270Z",
    "status": null
  },
  "revocable": true
}
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "id": "http://example.com/123",
  "type": [
    "VerifiableCredential",
    "UniversityDegreeCredential"
  ],
  "credentialSubject": {
    "id": "did:sample:subject2",
    "degree": {
      "type": "BachelorDegree",
      "name": "Bachelor of Science and Arts"
    }
  },
  "issuanceDate": "2020-08-24T14:15:22Z",
  "proof": {
    "type": "Sr25519Signature2020",
    "created": "2022-01-14T19:45:12Z",
    "verificationMethod": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "z7zTs4pVjGyj68WwsnJ6bCoK2CnWFBW5xmSBin7LxcgoYfzET4YXAZcTF9qQBTVhfVC5hK4FUWp9XAedq8Tep8J6"
  },
  "issuer": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59"
}

Issue a Credential after requesting claims from the user

post

Creates and issues a verifiable credential with supplied data + claims from the user.

Authorizations
Body
singleUsebooleanOptionalDefault: true
schemastringOptionalExample: https://docknetwork.github.io/vc-schemas/basic-credential.json
claimsstring[]OptionalExample: name
Responses
200
OpenID issuer and claim request created
application/json
400
The request was unsuccessful, because of invalid/insufficient credential parameters.
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
post
POST /credentials/request-claims HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 806

{
  "singleUse": true,
  "schema": "https://docknetwork.github.io/vc-schemas/basic-credential.json",
  "claims": [
    "name"
  ],
  "credentialOptions": {
    "persist": true,
    "password": "securepass",
    "template": "",
    "recipientEmail": "",
    "algorithm": "dockbbs",
    "distribute": false,
    "format": "jsonld",
    "credential": {
      "id": "",
      "name": "Basic Credential",
      "description": "My first credential",
      "schema": "https://docknetwork.github.io/vc-schemas/basic-credential.json",
      "context": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
      "type": [
        "BasicCredential"
      ],
      "subject": {
        "id": "did:key:z6MkqBcwvYurNSSqyBkxavv4fkaq2iu3v3YGMbdyfa4bVNxD",
        "name": "A. Holder"
      },
      "issuer": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
      "issuanceDate": "2025-05-16T13:02:22.134Z",
      "expirationDate": "2030-09-20T00:13:59.270Z",
      "status": null
    },
    "revocable": true
  }
}
{
  "credentialOptions": {
    "persist": true,
    "password": "securepass",
    "template": "",
    "recipientEmail": "",
    "algorithm": "dockbbs",
    "distribute": false,
    "format": "jsonld",
    "credential": {
      "id": "",
      "name": "Basic Credential",
      "description": "My first credential",
      "schema": "https://docknetwork.github.io/vc-schemas/basic-credential.json",
      "context": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
      "type": [
        "BasicCredential"
      ],
      "subject": {
        "id": "did:key:z6MkqBcwvYurNSSqyBkxavv4fkaq2iu3v3YGMbdyfa4bVNxD",
        "name": "A. Holder"
      },
      "issuer": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
      "issuanceDate": "2025-05-16T13:02:22.134Z",
      "expirationDate": "2030-09-20T00:13:59.270Z",
      "status": null
    },
    "revocable": true
  },
  "authProvider": {
    "url": "https://creds.truvera.io/claims",
    "scope": [
      "openid"
    ],
    "clientId": "eyAic2NoZW1hIjogImh0dHBzOi8vZG9ja25ldHdvcmsuZ2l0aHViLmlvL3ZjLXNjaGVtYXMvYmFzaWMtY3JlZGVudGlhbC5qc29uIiwgImNsYWltcyI6IFsibmFtZSJdIH0=",
    "clientSecret": "gpO2IVK+OALL8W+DcFlIfFhJtNA=",
    "claimsSource": "idToken",
    "requestParameters": {
      "login_hint": "user@example.com",
      "prompt": "login"
    }
  },
  "claimMap": {
    "name": "name"
  },
  "singleUse": false,
  "issuer": "text",
  "protocol": "default"
}

List Credentials

get

Get all credential metadata

Authorizations
Query parameters
offsetinteger · int32Optional

How many items to offset by for pagination

Default: 0
limitinteger · int32 · min: 1 · max: 64Optional

How many items to return at one time (max 64)

Default: 64
Responses
200
A paged array of OpenID issuers
application/json
400
Application error
application/json
get
GET /credentials/request-claims HTTP/1.1
Host: api-testnet.dock.io
DOCK-API-TOKEN: YOUR_API_KEY
Accept: */*
[
  {
    "credentialOptions": {
      "persist": true,
      "password": "securepass",
      "anchor": false,
      "template": "",
      "recipientEmail": "",
      "algorithm": "dockbbs",
      "distribute": false,
      "format": "jsonld",
      "credential": {
        "id": "",
        "name": "Basic Credential",
        "description": "My first credential",
        "schema": "https://docknetwork.github.io/vc-schemas/basic-credential.json",
        "context": "https://docknetwork.github.io/vc-schemas/basic-credential.json-ld",
        "type": [
          "BasicCredential"
        ],
        "subject": {
          "id": "did:key:123",
          "name": "A. Holder"
        },
        "issuer": "did:dock:xyz",
        "issuanceDate": "2025-05-16T13:02:22.134Z",
        "expirationDate": "2030-09-20T00:13:59.270Z",
        "status": null
      }
    },
    "authProvider": {
      "url": "https://creds.dock.io/claims",
      "scope": [
        "openid"
      ],
      "clientId": "eyAic2NoZW1hIjogImh0dHBzOi8vZG9ja25ldHdvcmsuZ2l0aHViLmlvL3ZjLXNjaGVtYXMvYmFzaWMtY3JlZGVudGlhbC5qc29uIiwgImNsYWltcyI6IFsibmFtZSJdIH0=",
      "clientSecret": "gpO2IVK+OALL8W+DcFlIfFhJtNA=",
      "claimsSource": "idToken",
      "requestParameters": {
        "login_hint": "user@example.com",
        "prompt": "login"
      }
    },
    "claimMap": {
      "name": "name"
    },
    "singleUse": false,
    "issuer": "text",
    "protocol": "default"
  }
]
  • Issue Credential
  • POSTIssue a Credential
  • List Credentials
  • GETList Credentials
  • Get credentials metadata and contents
  • GETGet credential metadata and contents if persistent
  • Create request claims
  • POSTIssue a Credential after requesting claims from the user
  • Get request claims
  • GETList Credentials
  • Delete Credential
  • DELETEDelete a Credential