- References a specific schema by its ledger ID (
schemaLedgerId). - Is tagged so an issuer can have multiple cred defs for the same schema (for example, for different departments or purposes).
- Optionally supports revocation, allowing the issuer to revoke credentials after issuance.
Credential definitions are write-once and ledger-anchored. They cannot be updated after creation.
Base path
All endpoints are rooted at/orgs/:orgId/cred-defs.
Authentication
Every endpoint requires a JWT bearer token.Role-based access
Endpoints
Create credential definition
POST /orgs/:orgId/cred-defs — Register a new credential definition on the ledger.List credential definitions
GET /orgs/:orgId/cred-defs — Retrieve all credential definitions for an organization.Get credential definition
GET /orgs/:orgId/cred-defs/:credDefId — Fetch a specific credential definition by its ledger ID.Create credential definition
POST /orgs/:orgId/cred-defs
Creates a new credential definition and submits it to the ledger. The credential definition is derived from an existing schema.
Required roles: owner, admin
Path parameters
string
required
UUID of the organization creating the credential definition.
Request body
string
required
A tag that distinguishes this credential definition from others using the same schema. Common values:
"default", "revocable", or any custom identifier. Example: "employee-v1".string
required
The ledger ID of the schema this credential definition is derived from. Example:
"WgWxqztrNooG92RXvxSTWv:2:EmployeeCredential:1.0".boolean
required
Whether credentials issued using this definition support revocation. When
true, a revocation registry is also created on the ledger. Defaults to false.string
Override the organization’s DID used to write the credential definition. Defaults to the org’s primary DID.
Response
number
201 on success.string
Human-readable result message.
object
Examples
201 response
List credential definitions
GET /orgs/:orgId/cred-defs
Retrieve all credential definitions belonging to an organization. Supports pagination, search, and sorting.
Required roles: owner, admin, issuer, verifier, member
Path parameters
string
required
UUID of the organization.
Query parameters
number
Page to retrieve. Defaults to
1.number
Records per page. Min
1, max 100. Defaults to 10.string
Free-text search across credential definition tags and schema IDs.
string
Field to sort by. Defaults to
"id".string
Sort direction.
ASC or DESC (default).boolean
Filter by revocability. Defaults to
true (show only revocable cred defs). Pass false to include non-revocable.Examples
200 response
Get credential definition by ID
GET /orgs/:orgId/cred-defs/:credDefId
Fetch the details of a specific credential definition using its ledger ID.
Required roles: owner, admin, issuer, verifier, member
Path parameters
string
required
UUID of the organization.
string
required
The ledger credential definition ID. Example:
"WgWxqztrNooG92RXvxSTWv:3:CL:123:default".Examples
200 response