Credential Schemas
Credential schemas define the structure and validation rules for Verifiable Credentials in IDA. Schemas are registered on the ADI blockchain via the Schema Registry smart contract and validated at issuance time.
Schema Lifecycle
Schema Structure
A credential schema in IDA follows the JSON Schema (draft 2020-12) format:
Built-in Schema Templates
IDA ships with six built-in schema templates located in packages/api/internal/schemas/.
Education Degree (education_degree.json)
For university and educational institution credentials.
KYC Verification (kyc_verification.json)
For Know Your Customer verification credentials.
Vaccination Record (vaccination_record.json)
For healthcare vaccination credentials.
Address Proof (address_proof.json)
For address verification credentials.
Agent Capability (agent_capability.json)
For AI Agent capability attestation credentials. Attests that an agent possesses specific capabilities as evaluated by a trusted authority.
Agent Delegation (agent_delegation.json)
For AI Agent delegation credentials. Grants specific permissions from a delegator to a delegate agent with constraints and chain-of-delegation support.
Schema Registration
Create Schema via API
List Schemas
Get Schema by ID
Schema Versioning
Schemas are immutable once registered. To update a schema, create a new version:
Version 1.1 credentials can be verified against 1.0 verifiers (optional fields ignored). Version 2.0 credentials require updated verifiers.
Schema Validation
When a VC is issued with a schemaId, IDA validates the credentialSubject against the declared schema:
- All
requiredattributes must be present - Attribute types must match the schema definition
- Enum values must be in the allowed set
- Numeric values must satisfy min/max constraints
- String lengths must not exceed defined maximums
- Nested objects are validated recursively
Validation errors return a 422 Unprocessable Entity with details:
Custom Schema Creation
Organizations can define custom schemas for any use case. The schema must follow JSON Schema draft 2020-12 and include:
- A
typefield (usually"object") - A
propertiesobject defining each field’s type and constraints - A
requiredarray listing mandatory fields
The schema is validated at registration time and enforced at credential issuance time when the schemaId is provided in the issuance request.