- 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
| Operation | Required roles |
|---|---|
| Create credential definition | owner, admin |
| Read credential definitions | owner, admin, issuer, verifier, member |
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
UUID of the organization creating the credential definition.
Request body
A tag that distinguishes this credential definition from others using the same schema. Common values:
"default", "revocable", or any custom identifier. Example: "employee-v1".The ledger ID of the schema this credential definition is derived from. Example:
"WgWxqztrNooG92RXvxSTWv:2:EmployeeCredential:1.0".Whether credentials issued using this definition support revocation. When
true, a revocation registry is also created on the ledger. Defaults to false.Override the organization’s DID used to write the credential definition. Defaults to the org’s primary DID.
Response
201 on success.Human-readable result message.
Examples
201 response
| Status | Description |
|---|---|
400 Bad Request | orgId is not a valid UUID, or required fields are missing or invalid. |
401 Unauthorized | Missing or invalid bearer token. |
403 Forbidden | User does not have owner or admin role. |
409 Conflict | A credential definition with the same schema and tag already exists on the ledger. |
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
UUID of the organization.
Query parameters
Page to retrieve. Defaults to
1.Records per page. Min
1, max 100. Defaults to 10.Free-text search across credential definition tags and schema IDs.
Field to sort by. Defaults to
"id".Sort direction.
ASC or DESC (default).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
UUID of the organization.
The ledger credential definition ID. Example:
"WgWxqztrNooG92RXvxSTWv:3:CL:123:default".Examples
200 response
| Status | Description |
|---|---|
400 Bad Request | credDefId is empty or malformed. |
401 Unauthorized | Missing or invalid bearer token. |
403 Forbidden | Authenticated user lacks the required role. |
404 Not Found | No credential definition found with that ID. |