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
    • 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
    • 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
  • 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

Credential Schemas

PreviousRevocation StatusNextJobs

Last updated 3 months ago

Was this helpful?

Schemas are useful when enforcing a specific structure on a collection of data like a Verifiable Credential. Data Verification schemas, for example, are used to verify that the structure and contents of a Verifiable Credential conform to a published schema. On the other hand, Data Encoding schemas are used to map the contents of a Verifiable Credential to an alternative representation format, such as a binary format used in a zero-knowledge proof.

Truvera credential schemas are using json schema format and should follow this structure

Create Schema

Schemas are used to describe the structure of credentials, specifically the credential subject. It helps the issuer, holder, and verifier to unambiguously determine the claims contained within the credential. To create a schema, you need to define the object body using JSON schema.

Parameters

Name
In
Type
Required
Description

body

body

object

true

JSON-schema.

List Schemas

Return a list of all schemas created by the authenticated user.

Parameters

Name
In
Type
Required
Description

offset

query

integer

false

How many items to offset by for pagination

limit

query

integer

false

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

Get Schema

Reading a Schema from the blockchain can easily be achieved by using the get method which will return the JSON schema to a specific schema ID. The schemaIdneeds to be URL encoded (e.g. /schemas/https%3A%2F%2Fschema.dock.io%2FTestSchema-V1-1695817897561.json)

Parameters

Name
In
Type
Required
Description

schemaId

path

String

true

A URL encoded schema id.

Delete Schema

https://json-schema.org/understanding-json-schema/reference

List Schemas

get

Get all schemas created by user. More info about List Schemas

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
includeEcosystemsbooleanOptional

Whether to include ecosystems or not

Default: true
Responses
200
All schemas by user
application/json
400
Application error
application/json
get
GET /schemas HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "db0c559035226419b4061d7c725a6d7d8aeebd3acf784fd0d69c9a033f29a8d1",
    "schema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "description": "Truvera Schema Example",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string",
          "format": "email"
        },
        "alumniOf": {
          "type": "string"
        },
        "birthDate": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "emailAddress",
        "alumniOf"
      ],
      "additionalProperties": false
    },
    "author": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "uri": "https://schema.truvera.io/myschema.json"
  },
  {
    "id": "f408d91da3ebab27f2d50150f7cf54ab14099b3ab5f53e2cbf208a90d6adbfd7",
    "schema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "description": "Truvera Schema Example",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string",
          "format": "email"
        },
        "alumniOf": {
          "type": "string"
        },
        "birthDate": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "emailAddress",
        "alumniOf"
      ],
      "additionalProperties": false
    },
    "author": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "uri": "https://schema.truvera.io/myschema.json"
  },
  {
    "id": "37ad6cf1c51a33ba25f50a8f106e2b06f9e1963296c5bfd914c0d71b7bad42e6",
    "schema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "description": "Truvera Schema Example",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string",
          "format": "email"
        },
        "alumniOf": {
          "type": "string"
        },
        "birthDate": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "emailAddress",
        "alumniOf"
      ],
      "additionalProperties": false
    },
    "author": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "uri": "https://schema.truvera.io/myschema.json"
  }
]

Get Schema

get

Returns the JSON schema for a specific ID. More info about Get Schema By ID

Authorizations
Path parameters
schemaIdstring · min: 64 · max: 64Required

32 byte hex string. Ignoring higher base (base64) for simplicity.

Responses
200
Schema
application/json
400
Application error
application/json
404
Schema was not found.
application/json
get
GET /schemas/{schemaId} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "https://schema.truvera.io/ExampleSchema-V5-1722512884923.json",
  "schema": null,
  "uri": "https://schema.truvera.io/ExampleSchema-V5-1722512884923.json",
  "created": "2025-06-02T01:30:16.480Z",
  "isOwner": true,
  "ownerName": "Truvera",
  "ownerLogo": "https://logo.truvera.io/owner"
}

Delete Schema

delete

Deletes a schema from the database

Authorizations
Path parameters
schemaIdstring · min: 64 · max: 64Required

32 byte hex string. Ignoring higher base (base64) for simplicity.

Responses
200
Schema has been deleted
application/json
400
Something went wrong with deleting the schema
application/json
401
Unauthorized.
application/json
404
Schema does not exist
application/json
500
Something went wrong with deleting the schema
application/json
delete
DELETE /schemas/{schemaId} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "2434",
  "data": {
    "status": "pending"
  }
}
  • Create Schema
  • Parameters
  • POSTCreate Credential Schema
  • List Schemas
  • Parameters
  • GETList Schemas
  • Get Schema
  • Parameters
  • GETGet Schema
  • Delete Schema
  • DELETEDelete Schema

Create Credential Schema

post

Creates a JSON schema on the blockchain. More info about Schema Creation

Authorizations
Body

Verifiable Credential Schema

$schemastringOptional

The schema version, generally following the JSON-schema specification.

Example: http://json-schema.org/draft-07/schema#
namestringOptional

Name of the schema.

Example: My Schema
descriptionstringOptional

A brief description of the schema.

Example: Truvera Schema Example
typestringOptional

Defines the type of schema. Usually 'object'.

Example: object
propertiesobjectOptional

The properties that define the schema.

Example: {"id":{"type":"string"},"emailAddress":{"type":"string","format":"email"},"alumniOf":{"type":"string"}}
requiredstring[]Optional

Required fields within the schema.

Example: ["emailAddress","alumniOf"]
additionalPropertiesbooleanOptional

Specifies whether additional properties outside the defined schema are allowed.

Example: true
Responses
200
Schema will be created.
application/json
400
Invalid params like size not supported or not JSON.
application/json
401
Unauthorized
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
post
POST /schemas HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 311

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "name": "My Schema",
  "description": "Truvera Schema Example",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "emailAddress": {
      "type": "string",
      "format": "email"
    },
    "alumniOf": {
      "type": "string"
    }
  },
  "required": [
    "emailAddress",
    "alumniOf"
  ],
  "additionalProperties": true
}
{
  "id": "2549",
  "data": {
    "id": "1a678fe6973f34d2a5c016cbff347161b9a595f5cc44a3e15f1eca2a404f294a",
    "schema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "description": "Truvera Schema Example",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string",
          "format": "email"
        },
        "alumniOf": {
          "type": "string"
        }
      },
      "required": [
        "emailAddress",
        "alumniOf"
      ],
      "additionalProperties": false
    }
  }
}