Create receipt type
Receipts
Create Receipt Type
Registers a custom receipt type with a JSON Schema for payload validation.
POST
Create receipt type
Creates a tenant-custom receipt type with a JSON Schema for payload validation. Platform-defined types (
payment_receipt, security_event_receipt, delivery_receipt, compliance_receipt, custom_receipt) are read-only and cannot be overridden or replaced.
Custom types are isolated to the authenticated tenant by row-level security. Other tenants cannot see or use your custom types.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique snake_case identifier (e.g. invoice_receipt). Must not conflict with platform type names. |
display_name | string | Yes | Human-readable label shown in the console UI. |
version | string | No | SemVer string (default 1.0.0). Create multiple versions to manage schema evolution. |
schema | object | Yes | Valid JSON Schema (draft 2020-12) describing the required payload structure. |
description | string | No | Plain-text description for documentation. |
Schema Requirements
Theschema field must be a valid JSON Schema (draft 2020-12). Include a required array to enforce mandatory payload fields when minting.
Versioning
Create multiple versions of the same type by passing differentversion values (1.0.0, 2.0.0, etc.). Receipts always pin the version at mint time so existing receipts are unaffected when you introduce a new version.
To deprecate an old version, use PATCH /v1/receipt-types/{name} with {"status": "deprecated"}.
Responses
Authorizations
API key for machine-to-machine authentication
Body
application/json

