API Reference

Schemas

JSON Schema record-type definitions that govern the allowed `custom` fields on wallets, anchors, intents, signers, and policies.

List schemas

GET
/schemas

Authorization

BearerAuth LedgerHeader
AuthorizationBearer <token>

Access token obtained from POST /oauth/token

In: header

x-ledger<token>

Handle of the target ledger (e.g. demo-co)

In: header

Query Parameters

limit?integer

Maximum records to return

Default25
Rangevalue <= 100
offset?integer

Records to skip

Default0
filter[data.record]?string
Value in"wallet" | "anchor" | "intent" | "signer" | "policy"

Response Body

application/json

curl -X GET "https://demo-co.ldg-stg.one/api/v2/schemas?filter%5Bdata.record%5D=wallet"
{
  "data": [
    {
      "handle": "banks",
      "record": "wallet",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "network",
      "record": "wallet",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "treasury",
      "record": "wallet",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "fees",
      "record": "wallet",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "merchant",
      "record": "wallet",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "emvco-v14-co",
      "record": "anchor",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "alias",
      "record": "anchor",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "payment",
      "record": "intent",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "limit",
      "record": "intent",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "service",
      "record": "signer",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    },
    {
      "handle": "access",
      "record": "policy",
      "format": "json-schema",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    }
  ],
  "meta": {
    "total": 11,
    "limit": 25,
    "offset": 0
  }
}

Create schema

POST
/schemas

Authorization

BearerAuth LedgerHeader
AuthorizationBearer <token>

Access token obtained from POST /oauth/token

In: header

x-ledger<token>

Handle of the target ledger (e.g. demo-co)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://demo-co.ldg-stg.one/api/v2/schemas" \  -H "Content-Type: application/json" \  -d '{    "data": {      "handle": "banks",      "record": "wallet",      "format": "json-schema",      "schema": {        "type": "object",        "additionalProperties": true,        "description": "ACH participant bank wallets.\\nTypical custom fields: name, country (co), code (ACH participant code),\\nscheme (nit), number (NIT digits without check digit).\\n"      }    }  }'
{
  "data": {
    "handle": "banks",
    "record": "wallet",
    "format": "json-schema",
    "schema": {}
  }
}
{
  "error": {
    "code": "schema-validation-failed",
    "message": "Required field 'schema' is missing from data"
  }
}
{
  "error": {
    "code": "handle-conflict",
    "message": "A record with this handle already exists"
  }
}

Get schema

GET
/schemas/{handle}

Authorization

BearerAuth LedgerHeader
AuthorizationBearer <token>

Access token obtained from POST /oauth/token

In: header

x-ledger<token>

Handle of the target ledger (e.g. demo-co)

In: header

Path Parameters

handle*string

Record handle

Response Body

application/json

application/json

curl -X GET "https://demo-co.ldg-stg.one/api/v2/schemas/pay-20260608-001"
{
  "data": {
    "handle": "banks",
    "record": "wallet",
    "format": "json-schema",
    "schema": {}
  }
}
{
  "error": {
    "code": "not-found",
    "message": "Wallet not found"
  }
}

On this page

No Headings