Schema Management
Credential schemas define the structure and required claims of the credentials an issuer can produce, ensuring consistency and interoperability across wallets and verifiers. Each schema is stored by the service under a stable identifier and, once assigned to an issuer, becomes one or more credential configurations that credential offers reference.
All schema endpoints require authentication: send an OIDC JWT in the Authorization: Bearer <token> header. These endpoints validate the token but do not enforce a specific realm role, so any authenticated caller may use them (see Authentication).
1. Schema Identifiers and Credential Configurations
A schema is identified by its name and version joined with @:
Both name and version are caller-supplied tokens matching ^[A-Za-z0-9][A-Za-z0-9._-]*$ (no spaces).
Each active schema produces a credential configuration id for every format it declares, in the form <name>@<version>:<format>:
[email protected]:sd-jwt[email protected]:jwt-vc-json
These configuration ids are what you pass to the credential-offer endpoint. The direct-signing endpoint does not take a configuration id; it instead takes a format value (sd-jwt-vc or jwt_vc_json) plus a payload. The available schema formats are sd-jwt (SD-JWT VC) and jwt-vc-json (JWT-VC-JSON); if formats is omitted, both are generated.
2. Create Schema
POST /schemas
Authorization: Bearer <token>
Content-Type: application/jsonRequest Body
name(string, required): Schema name. Token-like (^[A-Za-z0-9][A-Za-z0-9._-]*$), max 120 characters. Example:"EmployeeBadge"version(string, required): Schema version. Token-like, max 50 characters. Supplied explicitly by the caller (it is not auto-incremented). Example:"1.0"description(string, optional): Human-readable description, max 500 characters. Example:"Employee access badge credential."formats(array of strings, optional): Credential formats this schema supports. Each value must be"sd-jwt"or"jwt-vc-json", and at least one value is required when the field is present. Defaults to["sd-jwt", "jwt-vc-json"].schema(object, required): A JSON Schema describing the credential claims. If a top-leveltypeis present it must be (or include)"object";properties(if present) must be an object;required(if present) must be an array, and every key it lists must exist inproperties.vct(string, optional): VCT (Verifiable Credential Type) identifier used for SD-JWT credential configurations, max 500 characters. Example:"https://issuer.example.com/vct/employee-badge"jwtVcTypes(array of strings, optional): Credentialtypevalues for JWT-VC-JSON configurations. If omitted while a JWT-VC-JSON format is enabled, it defaults to["VerifiableCredential", "<name>"].defaultValues(object, optional): Default claim values applied during issuance when not supplied per offer. Example:{ "company": "EMPE" }disclosureFrame(array of strings, optional): Claim keys that are selectively disclosable for SD-JWT issuance.display(array of objects, optional): Display metadata used by wallets to render the credential. Each entry requiresnameand may also includelocale,description,backgroundColor, andtextColor.
Example Request
Response Body
On success the API responds with the stored schema record:
schemaId(string): Thename@versionidentifier.name(string): The schema name.version(string): The caller-supplied version.status(string): Either"active"or"superseded"(see Versioning).schema(object): The normalized schema definition, including any defaults the service applied (such asformatsandjwtVcTypes).createdAt/updatedAt(string): ISO 8601 timestamps.
Creating a schema whose name@version already exists is rejected with HTTP 409 Conflict. A malformed schema definition is rejected with HTTP 400 Bad Request.
3. Assign a Schema to an Issuer
Creating a schema stores its definition but does not yet expose it for issuance. To make a schema's credential configurations available on an issuer, assign it. This refreshes the issuer's metadata so it advertises the configurations derived from active schemas.
Request Body
schemaId(string, required): The schema identifier inname@versionformat. Example:"[email protected]"
Example Request
Response Body
After assignment, the issuer exposes [email protected]:sd-jwt (and [email protected]:jwt-vc-json if that format is enabled), which can then be referenced when creating credential offers. Assignment fails with HTTP 404 Not Found if the schema does not exist, and HTTP 410 Gone if the referenced version has been superseded.
4. List Schemas
name(query, optional): Filter to schemas with this exact name.includeInactive(query, optional): Whentrue, superseded schemas are also returned. Defaults tofalse(active only).
Results are returned newest-first by creation time.
Example Response
5. List Schema Versions
Returns every stored version for a schema name, including superseded ones — useful for auditing or migrating schema changes.
Example Response
6. Get a Schema by ID
schemaId(path): Thename@versionidentifier, e.g.[email protected].includeInactive(query, optional): Whentrue, a superseded version is still returned. Defaults tofalse.
A missing schema returns HTTP 404 Not Found. A superseded version returns HTTP 410 Gone unless includeInactive=true.
7. Versioning
Versions are explicit string versions supplied by the caller, not auto-incrementing integers. To evolve a schema, create a new version under the same name:
Creating the same
name@versiontwice is rejected with HTTP 409 Conflict.Creating a new version of an existing name automatically marks the previously active version as
superseded; the new version becomesactive.A superseded version returns HTTP 410 Gone from
GET /schemas/:schemaIdunlessincludeInactive=trueis supplied. Assignment (POST /issuers/:issuerDid/schemas) always rejects a superseded version with 410 — it accepts noincludeInactiveoption. (The versions list always includes superseded entries.)Credentials already issued against an older version remain valid — superseding only affects which configurations an issuer advertises going forward. Re-assign the new version to an issuer to advertise its configurations.
8. Note on Deletion
There is no delete endpoint for schemas. Schemas are retired by creating a newer version that supersedes them, which preserves an auditable history of every definition.
Security
Schema creation, assignment, listing, and retrieval all require a valid OIDC JWT Bearer token; these endpoints require authentication but do not enforce a specific realm role. This ensures only authenticated operators can define and assign credential definitions, preserving the integrity and trustworthiness of what an issuer can issue.
Last updated