---
title: "Create a credential schema"
method: POST
path: "/v1/credential-schemas"
tags: ["Credentials"]
---

# Create a credential schema

`POST /v1/credential-schemas`

Create a new credential schema for the authenticated tenant. The schema defines the verifiable-credential type, wire format, claim attributes (and which are selectively disclosable), whether issued credentials are revocable, and optional wallet branding. The combination of name + version must be unique within the tenant. Once created, the schema can be referenced by credential templates. The `revocable` flag is immutable after creation. Requires Authorization: Bearer <tenant API key>.

## Request body

- object
  - `name` string, required — Human-readable name of the schema. Must be unique per tenant together with version.
  - `version` string — Schema version string. Must be unique per tenant together with name. Defaults to "1.0".
  - `vct` string, required — Verifiable Credential Type identifier to embed in every credential issued under this schema. Wallets and verifiers match on this value.
  - `format` 'sd_jwt_vc' | 'mdoc' | 'w3c' — Credential wire format. `sd_jwt_vc` (IETF SD-JWT VC) is the default; `mdoc` is ISO/IEC 18013-5; `w3c` is W3C VC 2.0. Defaults to `sd_jwt_vc`.
  - `attributes` object[] — List of the claim attributes that make up this credential. Each attribute declares a claim name, its value type, and whether it is selectively disclosable. Defaults to an empty list.
    - `name` string, required — Claim name as it will appear in the issued credential payload.
    - `type` string, required — Logical data type of the claim value (e.g. string, number, boolean, date).
    - `sd` boolean — Selective-disclosure flag. When true (the default) the claim is individually disclosable by the holder — hidden behind a salted digest so the holder can choose whether to reveal it at presentation time. When false the claim is always disclosed.
  - `revocable` boolean — Whether credentials issued under this schema can be revoked or suspended through a status list. Immutable after creation. Defaults to true.
  - `branding` object — Optional free-form wallet branding object (e.g. background color, text color, logo URI) used by holder wallets to render the credential. Defaults to an empty object.

## Response `200`

No response body

## Other responses

- `201` — The credential schema was created. Returns the full schema object.

## Changes

- **2026-06-30** `1ee4908e9af4` — 1 breaking
  - request body became required

[Change history](https://skmtc.dev/didit-protocol/apis/didit-credentials-api/changes/v1/credential-schemas/post.md)

---

[API](https://skmtc.dev/didit-protocol/apis/didit-credentials-api.md) · [All operations](https://skmtc.dev/didit-protocol/apis/didit-credentials-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/didit-protocol/didit-credentials-api/revisions/2eeb13158ffa/schema)
