Skip to main content
POST /v1/issuer/schemas API Key

Create a credential schema

Create a new credential schema for this issuer. Schemas define the structure
and validation rules for credentials. New schemas are created in draft status.

Parameters

Name Location Type Description
X-API-Key * header string Issuer API key for authentication

* Required parameter

Request Body

application/json

Parameters for creating a credential schema

name * string

Display name for the schema

Example: Employee Badge

credential_type * string

PascalCase credential type identifier

Example: EmployeeBadgeCredential

schema_type * string

Schema category

Allowed values: "custom", "education_credential", "employment_credential", "certificate", "open_badge", "clr"

Example: custom

subject_schema * object

JSON Schema for credential claims

Example: {"type":"object","properties":{"name":{"type":"string"},"employee_id":{"type":"string"}},"required":["name","employee_id"]}

supported_formats array[string]

Supported credential formats

Example: ["jwt_vc","sd_jwt_vc"]

Array items:

Allowed values: "jwt_vc", "sd_jwt_vc", "mdoc", "data_integrity"

data_integrity_config object

W3C Data Integrity format configuration for selective disclosure credentials. When using ecdsa-sd-2023 cryptosuite, the issuer can specify which claims are mandatory (always disclosed) vs selectable (holder can hide). Mandatory claims are embedded in the base proof at issuance time. **Cryptosuite compatibility:** - ECDSA suites (ecdsa-rdfc-2019, ecdsa-jcs-2019, ecdsa-sd-2023): Require P-256 or P-384 signing key - EdDSA suites (eddsa-rdfc-2022, eddsa-jcs-2022): Require Ed25519 signing key - Only ecdsa-sd-2023 supports selective disclosure

default_cryptosuite object

Default cryptographic suite for this schema's Data Integrity proofs.

mandatory_pointers array[string]

RFC 6901 JSON Pointers for claims that MUST always be disclosed when using ecdsa-sd-2023. These are embedded in the base proof at issuance and cannot be hidden by the holder. Standard VC fields like /@context, /type, /issuer should typically be mandatory.

Example: ["/@context","/type","/issuer","/issuanceDate","/credentialSubject/type"]

Array items:

selectable_claims array[string]

Claim names that holders can choose to hide (derived from subject_schema minus mandatory_pointers). Read-only.

Example: ["email","dateOfBirth","address"]

Array items:

Response

201 Schema with selective disclosure config

Content-Type: application/json

success boolean
data object

An issuer's credential schema with full details

uuid * string (uuid)

Unique identifier

Example: 3314e46b-0645-4a25-9474-eed0b64277e8

slug * string

URL-friendly identifier

Example: employee-badge

name * string

Display name

Example: Employee Badge

credential_type * string

VC type identifier

Example: EmployeeBadgeCredential

schema_type * string

Schema category

Allowed values: "custom", "education_credential", "employment_credential", "certificate", "open_badge", "clr"

Example: employment_credential

status * string

Schema status

Allowed values: "draft", "active", "archived"

Example: active

supported_formats * array[string]

Example: ["jwt_vc","sd_jwt_vc"]

Array items:

Allowed values: "jwt_vc", "sd_jwt_vc", "mdoc", "data_integrity"

template_key string nullable

Example: employee_badge_v1

credential_count * integer

Number of credentials issued

Example: 150

json_ld_context array[string]

JSON-LD context URLs

Example: ["https://www.w3.org/2018/credentials/v1"]

Array items:

subject_schema object

JSON Schema for claims

sd_jwt_vc_config object
mdoc_config object
data_integrity_config object

W3C Data Integrity format configuration for selective disclosure credentials. When using ecdsa-sd-2023 cryptosuite, the issuer can specify which claims are mandatory (always disclosed) vs selectable (holder can hide). Mandatory claims are embedded in the base proof at issuance time. **Cryptosuite compatibility:** - ECDSA suites (ecdsa-rdfc-2019, ecdsa-jcs-2019, ecdsa-sd-2023): Require P-256 or P-384 signing key - EdDSA suites (eddsa-rdfc-2022, eddsa-jcs-2022): Require Ed25519 signing key - Only ecdsa-sd-2023 supports selective disclosure

default_cryptosuite object

Default cryptographic suite for this schema's Data Integrity proofs.

mandatory_pointers array[string]

RFC 6901 JSON Pointers for claims that MUST always be disclosed when using ecdsa-sd-2023. These are embedded in the base proof at issuance and cannot be hidden by the holder. Standard VC fields like /@context, /type, /issuer should typically be mandatory.

Example: ["/@context","/type","/issuer","/issuanceDate","/credentialSubject/type"]

Array items:

selectable_claims array[string]

Claim names that holders can choose to hide (derived from subject_schema minus mandatory_pointers). Read-only.

Example: ["email","dateOfBirth","address"]

Array items:

render_templates array[object]

Array items:

id string

Template identifier

Example: NpG7KMT8fbgav7VVzypF

name string

Example: Badge Card

template_type string

Allowed values: "custom", "system"

Example: custom

output_format string

Example: svg

created_at * string (date-time)

Example: 2025-01-01T00:00:00Z

updated_at * string (date-time)

Example: 2025-01-15T10:30:00Z

Code Examples

import os
from aho_sdk import AhoSdk

client = AhoSdk.issuer(api_key=os.environ["AHO_API_KEY"])

result = client.schemas.create(
    body={
        "name": "Employee Badge",
        "credential_type": "EmployeeBadgeCredential",
        "schema_type": "custom",
        "subject_schema": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "employee_id": {
                    "type": "string"
                }
            },
            "required": ["name", "employee_id"]
        },
        "supported_formats": ["jwt_vc", "sd_jwt_vc"],
        "data_integrity_config": {
            "default_cryptosuite": "ecdsa-sd-2023",
            "mandatory_pointers": ["/@context", "/type", "/issuer", "/issuanceDate", "/credentialSubject/type", "/credentialSubject/id"],
            "selectable_claims": ["email", "phone", "address"]
        }
    }
)

Try It

Log in to test this endpoint directly from the documentation.

Log in