{
  "openapi": "3.1.0",
  "info": {
    "title": "XKOVA Customer API",
    "version": "1.0.0",
    "summary": "Customer-server operations supported by @xkova/sdk."
  },
  "servers": [
    {
      "url": "https://sandbox-api.xkova.com/v1"
    },
    {
      "url": "https://api.xkova.com/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "tenant"
    },
    {
      "name": "account_holders"
    },
    {
      "name": "funding"
    },
    {
      "name": "payment"
    },
    {
      "name": "platform"
    },
    {
      "name": "tokenization"
    },
    {
      "name": "wallets"
    },
    {
      "name": "embedded:member_auth"
    },
    {
      "name": "embedded:avatar"
    }
  ],
  "paths": {
    "/branding": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Get this tenant's resolved branding + the raw tenant-wide theme",
        "operationId": "getBranding",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantBranding"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "put": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Upsert this tenant's branding (tenant-wide)",
        "operationId": "upsertBranding",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBranding"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantBranding"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/branding/logo/upload-url": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Presigned PUT URL for a brand logo upload",
        "operationId": "brandingLogoUploadUrl",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogoUploadUrlRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoUploadUrlResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/branding/logo": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Confirm this tenant's brand logo upload",
        "operationId": "confirmBrandingLogo",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogoConfirmRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantBranding"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Remove the brand logo",
        "operationId": "deleteBrandingLogo",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantBranding"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/branding/email-domains": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List this tenant's custom sending domains + their DNS records",
        "operationId": "listEmailDomains",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailDomainList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Register a custom sending domain",
        "operationId": "addEmailDomain",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddEmailDomainRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailDomain"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/branding/email-domains/{id}/verify": {
      "post": {
        "tags": [
          "tenant"
        ],
        "summary": "Trigger + refresh verification for a sending domain",
        "operationId": "verifyEmailDomain",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailDomain"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/branding/email-domains/{id}": {
      "delete": {
        "tags": [
          "tenant"
        ],
        "summary": "Remove a custom sending domain",
        "operationId": "removeEmailDomain",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {},
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/public/branding": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Public branding for a hosted claim page (pre-auth)",
        "operationId": "getPublicBranding",
        "security": [],
        "parameters": [
          {
            "in": "query",
            "name": "claim_token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBranding"
                }
              }
            }
          }
        }
      }
    },
    "/tenant": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Get tenant config",
        "operationId": "getTenant",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSelf"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/tenant/policies": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Get tenant policy registry (ToS, privacy, marketing)",
        "operationId": "getTenantPolicies",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantPolicies"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/onboarding/status": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Onboarding state for the calling tenant's sandbox workspace",
        "operationId": "getOnboardingStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/onboarding/setup": {
      "post": {
        "tags": [
          "tenant"
        ],
        "summary": "Record onboarding intent and activate the workspace",
        "operationId": "completeOnboardingSetup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnboardingSetupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/workspaces": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List the workspace pair under this tenant",
        "operationId": "listWorkspaces",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/workspaces/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/pathId"
        }
      ],
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Get a single workspace",
        "operationId": "getWorkspace",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "tenant"
        ],
        "summary": "Update mutable workspace fields (name and status)",
        "operationId": "updateWorkspace",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/workspace-tokens": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List Rails-authorized tokens for the calling workspace",
        "operationId": "listWorkspaceTokens",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceTokenList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhook-endpoints": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "List webhook endpoints",
        "operationId": "listWebhookEndpoints",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Create a webhook endpoint",
        "operationId": "createWebhookEndpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/webhook-endpoints/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/webhookEndpointPathId"
        }
      ],
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "Get webhook endpoint",
        "operationId": "getWebhookEndpoint",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "platform"
        ],
        "summary": "Update webhook endpoint",
        "operationId": "updateWebhookEndpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      },
      "delete": {
        "tags": [
          "platform"
        ],
        "summary": "Delete webhook endpoint",
        "operationId": "deleteWebhookEndpoint",
        "responses": {
          "204": {},
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhook-endpoints/{id}/rotate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/webhookEndpointPathId"
        }
      ],
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Rotate the HMAC signing secret for this endpoint",
        "operationId": "rotateWebhookEndpointSecret",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "overlap_sec": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 2592000,
                    "default": 86400
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/webhook-endpoints/{id}/test": {
      "parameters": [
        {
          "$ref": "#/components/parameters/webhookEndpointPathId"
        }
      ],
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Send a test event to this endpoint",
        "operationId": "testWebhookEndpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/webhook-deliveries": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "List recent webhook deliveries (last 30 days)",
        "operationId": "listWebhookDeliveries",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/WebhookEndpointId"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "delivered",
                "failed",
                "dlq"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhook-deliveries/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/webhookDeliveryPathId"
        }
      ],
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "Fetch a single webhook delivery",
        "operationId": "getWebhookDelivery",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhook-deliveries/{id}/replay": {
      "parameters": [
        {
          "$ref": "#/components/parameters/webhookDeliveryPathId"
        }
      ],
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Re-fire a past delivery (preserves original Idempotency-Key)",
        "operationId": "replayWebhookDelivery",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhook-deliveries/bulk-replay": {
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Bulk re-fire terminal deliveries",
        "operationId": "bulkReplayWebhookDeliveries",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkReplayWebhookDeliveries"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookBulkReplayResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/webhook-event-types": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "List subscribable webhook event types",
        "operationId": "listWebhookEventTypes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventTypeList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/integration-gateways": {
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "List integration gateways",
        "operationId": "listIntegrationGateways",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGatewayList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Register a deployed integration gateway",
        "operationId": "registerIntegrationGateway",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterGatewayWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGateway"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/integration-gateways/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/integrationGatewayPathId"
        }
      ],
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "Get an integration gateway",
        "operationId": "getIntegrationGateway",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGateway"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "platform"
        ],
        "summary": "Edit gateway registration (name / base_url)",
        "operationId": "updateIntegrationGateway",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGatewayRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGateway"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/integration-gateways/{id}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/integrationGatewayPathId"
        }
      ],
      "get": {
        "tags": [
          "platform"
        ],
        "summary": "List a gateway's invocation events",
        "operationId": "listIntegrationGatewayEvents",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayEventList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/integration-gateways/{id}/pin-cert": {
      "parameters": [
        {
          "$ref": "#/components/parameters/integrationGatewayPathId"
        }
      ],
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Pin or rotate the gateway's mTLS cert fingerprint",
        "operationId": "pinIntegrationGatewayCert",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinCertWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGateway"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/integration-gateways/{id}/status": {
      "parameters": [
        {
          "$ref": "#/components/parameters/integrationGatewayPathId"
        }
      ],
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Enable or disable an integration gateway",
        "operationId": "setIntegrationGatewayStatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGatewayStatusWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGateway"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/integration-gateways/{id}/conformance": {
      "parameters": [
        {
          "$ref": "#/components/parameters/integrationGatewayPathId"
        }
      ],
      "post": {
        "tags": [
          "platform"
        ],
        "summary": "Record a contract-conformance result for the gateway",
        "operationId": "recordIntegrationGatewayConformance",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayConformanceWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGateway"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/wallets/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/walletPathId"
        }
      ],
      "get": {
        "tags": [
          "wallets"
        ],
        "summary": "Get a wallet",
        "operationId": "getWallet",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wallet"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/wallets/{id}/history": {
      "parameters": [
        {
          "$ref": "#/components/parameters/walletPathId"
        }
      ],
      "get": {
        "tags": [
          "wallets"
        ],
        "summary": "Wallet-scoped payment history (same shape as GET /payments with wallet filter)",
        "operationId": "listWalletHistory",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletTransactionList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/wallets/{id}/ledger": {
      "parameters": [
        {
          "$ref": "#/components/parameters/walletPathId"
        }
      ],
      "get": {
        "tags": [
          "wallets"
        ],
        "summary": "Bank-statement timeline for a wallet (atomic debits + credits across every token movement)",
        "operationId": "listWalletLedger",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          },
          {
            "name": "chain_id",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "transfer_in",
                "transfer_out",
                "fee_earned",
                "fee_withdrawn",
                "fee_withdrawn_destination",
                "external_in",
                "external_out"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "debit",
                "credit"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/wallets/{id}/balance": {
      "parameters": [
        {
          "$ref": "#/components/parameters/walletPathId"
        }
      ],
      "get": {
        "tags": [
          "wallets"
        ],
        "summary": "Materialized running balance for a (wallet, chain, token)",
        "operationId": "getWalletBalance",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          },
          {
            "name": "chain_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletBalanceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/contacts": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "List account holder's address book",
        "operationId": "listContacts",
        "parameters": [
          {
            "name": "account_holder_id",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Add a contact",
        "operationId": "createContact",
        "parameters": [
          {
            "name": "account_holder_id",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/contacts/search": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "tags": [
          "account_holders"
        ],
        "summary": "Look up a contact by email or phone hash",
        "operationId": "searchContacts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "account_holder_id"
                ],
                "properties": {
                  "account_holder_id": {
                    "$ref": "#/components/schemas/AccountHolderId"
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email"
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/contacts/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/contactPathId"
        }
      ],
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get a contact",
        "operationId": "getContact",
        "parameters": [
          {
            "name": "account_holder_id",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "account_holders"
        ],
        "summary": "Update a contact",
        "operationId": "updateContact",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "name": "account_holder_id",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      },
      "delete": {
        "tags": [
          "account_holders"
        ],
        "summary": "Delete a contact",
        "operationId": "deleteContact",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "name": "account_holder_id",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          }
        ],
        "responses": {
          "204": {},
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/funding-requests": {
      "get": {
        "tags": [
          "funding"
        ],
        "summary": "List funding requests for the tenant (paginated, recent first)",
        "operationId": "listFundingRequests",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_holder_id",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          },
          {
            "name": "ramp_profile",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mock",
                "sandbox",
                "coinbase"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "next_cursor",
                    "has_more"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FundingRequest"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "funding"
        ],
        "summary": "Create a funding request (fiat → stablecoin via [X] partner)",
        "operationId": "createFundingRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xSandboxScenario"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FundingRequestCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundingRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/funding-requests/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/fundingRequestPathId"
        }
      ],
      "get": {
        "tags": [
          "funding"
        ],
        "summary": "Get a funding request",
        "operationId": "getFundingRequest",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundingRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/off-ramp-requests": {
      "get": {
        "tags": [
          "funding"
        ],
        "summary": "List off-ramp requests for the tenant (paginated, recent first)",
        "operationId": "listOffRampRequests",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_holder_id",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          },
          {
            "name": "ramp_profile",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mock",
                "sandbox",
                "coinbase"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "next_cursor",
                    "has_more"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OffRampRequest"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "funding"
        ],
        "summary": "Create an off-ramp request (stablecoin → fiat via [X] partner)",
        "operationId": "createOffRampRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xSandboxScenario"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OffRampRequestCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OffRampRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/off-ramp-requests/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/offRampRequestPathId"
        }
      ],
      "get": {
        "tags": [
          "funding"
        ],
        "summary": "Get an off-ramp request",
        "operationId": "getOffRampRequest",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OffRampRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/off-ramp-requests/burn-address": {
      "get": {
        "tags": [
          "funding"
        ],
        "summary": "The on-chain address to burn stablecoin TO when redeeming (off-ramp)",
        "operationId": "getOffRampBurnAddress",
        "parameters": [
          {
            "name": "chain_ref",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "burn_address",
                    "stablecoin",
                    "chain"
                  ],
                  "properties": {
                    "burn_address": {
                      "type": "string"
                    },
                    "stablecoin": {
                      "type": "string",
                      "enum": [
                        "USDC",
                        "dUSDC"
                      ]
                    },
                    "chain": {
                      "type": "object",
                      "required": [
                        "kind",
                        "chain_id"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "example": "evm"
                        },
                        "chain_id": {
                          "type": "integer",
                          "example": 43113
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/payments/quote": {
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Get a fee + compliance quote for a prospective payment",
        "operationId": "quotePayment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentQuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentQuote"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/payments/simulate": {
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Simulate a payment's chain feasibility before signing (dry-run)",
        "operationId": "simulatePayment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentQuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSimulation"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "Tenant-wide payment list (cursor-paginated, rich filters, FTS on memo)",
        "operationId": "listPayments",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "ids",
            "in": "query",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            }
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "amount"
              ],
              "default": "created_at"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status_canonical",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatusCanonical"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "in",
                "out",
                "internal"
              ]
            }
          },
          {
            "name": "counterparty",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount_min",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Money"
            }
          },
          {
            "name": "amount_max",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Money"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TimestampUtc"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TimestampUtc"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Create a payment",
        "operationId": "createPayment",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xOptionalMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xOptionalXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/payments/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentPathId"
        }
      ],
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "Get a payment",
        "operationId": "getPayment",
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/payments/{id}/cancel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentPathId"
        }
      ],
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Cancel a payment (pre-sign only)",
        "operationId": "cancelPayment",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentPathId"
        }
      ],
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "Timeline of state transitions for a payment",
        "operationId": "listPaymentEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentEventList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/escrows": {
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "List the calling tenant's escrows (cursor-paginated, newest first)",
        "operationId": "listEscrows",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "name": "ids",
            "in": "query",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "claimed",
                "cancelled",
                "expired"
              ]
            }
          },
          {
            "name": "recipient_ref",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "claim_path",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "external_wallet",
                "wait"
              ]
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TimestampUtc"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TimestampUtc"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscrowList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "payment"
        ],
        "summary": "Create an escrow (sender-side)",
        "operationId": "createEscrow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EscrowCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscrowCreateResponse"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/escrows/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/escrowPathId"
        }
      ],
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "Get a single escrow",
        "operationId": "getEscrow",
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Escrow"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/escrows/{id}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/escrowPathId"
        }
      ],
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "Audit-trail timeline for a single escrow",
        "operationId": "listEscrowEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscrowEventList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/escrows/{id}/cancel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/escrowPathId"
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "payment"
        ],
        "summary": "Validate that an escrow is ready for a sender-cancel action",
        "operationId": "initEscrowCancel",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscrowCancelInit"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transactions": {
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "List the calling tenant's transactions across every payment-flow kind",
        "operationId": "listTransactions",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "direct",
                "escrow"
              ]
            }
          },
          {
            "name": "status_canonical",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatusCanonical"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TimestampUtc"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TimestampUtc"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionList"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/payment-requests": {
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "List payment requests",
        "operationId": "listPaymentRequests",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "declined",
                "expired",
                "cancelled"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequestList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Create a payment request (recipient-initiated; inbound pay ask)",
        "operationId": "createPaymentRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRequestCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/payment-requests/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentRequestPathId"
        }
      ],
      "get": {
        "tags": [
          "payment"
        ],
        "summary": "Get a payment request",
        "operationId": "getPaymentRequest",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/payment-requests/{id}/cancel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentRequestPathId"
        }
      ],
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Cancel a payment request (verb-noun alias for DELETE /:id)",
        "operationId": "cancelPaymentRequestByPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/payment-requests/{id}/approve": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentRequestPathId"
        }
      ],
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Approve a payment request (spawns a payment on the payer side)",
        "operationId": "approvePaymentRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "name": "X-Sender-Wallet-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WalletId"
            }
          },
          {
            "name": "X-Account-Holder-Id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AccountHolderId"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/payment-requests/{id}/decline": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentRequestPathId"
        }
      ],
      "post": {
        "tags": [
          "payment"
        ],
        "summary": "Decline a payment request",
        "operationId": "declinePaymentRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/payment-requests/{id}/remind": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentRequestPathId"
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "payment"
        ],
        "summary": "Nudge the payer with a reminder",
        "operationId": "remindPaymentRequest",
        "responses": {
          "204": {},
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/wallets/{id}/qr": {
      "parameters": [
        {
          "$ref": "#/components/parameters/walletPathId"
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "wallets"
        ],
        "summary": "Generate a receive QR (EIP-681 + XKOVA extensions) for an explicit wallet",
        "operationId": "generateReceiveQr",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveQrRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiveQr"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Search account holders (staff)",
        "operationId": "listAccountHolders",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "name": "ids",
            "in": "query",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Create an account holder (staff)",
        "operationId": "createAccountHolder",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountHolderCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/self/wallets": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "List the current member's wallets",
        "operationId": "listAccountHolderSelfWallets",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Wallet"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/product-enrollments/{product}": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Read the member's product enrollment",
        "operationId": "getAccountHolderSelfProductEnrollment",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$"
            }
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberProductEnrollment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Record product terms acceptance",
        "operationId": "acceptAccountHolderSelfProductEnrollment",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$"
            }
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "terms_version"
                ],
                "properties": {
                  "terms_version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "require_passkey": {
                    "type": "boolean",
                    "default": false
                  },
                  "sandbox_credit": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "token_deployment_id",
                      "amount"
                    ],
                    "properties": {
                      "token_deployment_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "amount": {
                        "type": "string",
                        "pattern": "^(?!0+(\\.0+)?$)\\d{1,4}(\\.\\d{1,2})?$"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberProductEnrollment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/account-holders/self/wallet-readiness": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current member's wallet readiness",
        "operationId": "getAccountHolderSelfWalletReadiness",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "wallets"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "not_registered",
                        "provisioning",
                        "ready"
                      ]
                    },
                    "wallets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Wallet"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/wallet-auth": {
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Connect the current member's registered wallet",
        "operationId": "issueAccountHolderSelfWalletAuth",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/WalletAdmissionBootstrap"
                    },
                    {
                      "type": "object",
                      "required": [
                        "expected_address"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/wallet-provision": {
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Ensure wallet provisioning for the current member",
        "operationId": "ensureAccountHolderSelfWalletProvisioning",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "processing",
                        "reconciling",
                        "retry",
                        "ready",
                        "paused",
                        "manual_review",
                        "cancelled"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/self/sandbox-banking-context": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the member's sandbox banking references",
        "operationId": "getAccountHolderSelfSandboxBankingContext",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "account_holder_id",
                    "savings_bank_account_id",
                    "checking_bank_account_id",
                    "pool_bank_account_id",
                    "settlement_bank_account_id",
                    "destination_account"
                  ],
                  "properties": {
                    "account_holder_id": {
                      "$ref": "#/components/schemas/AccountHolderId"
                    },
                    "savings_bank_account_id": {
                      "type": "string"
                    },
                    "checking_bank_account_id": {
                      "type": "string"
                    },
                    "pool_bank_account_id": {
                      "type": "string"
                    },
                    "settlement_bank_account_id": {
                      "type": "string"
                    },
                    "destination_account": {
                      "$ref": "#/components/schemas/CuPayoutAccountRef"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/self/bank-balance": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current account holder's USD bank (savings) balance",
        "operationId": "getAccountHolderSelfBankBalance",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderSelfBankBalance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/checking-balance": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current account holder's USD share-draft (checking) balance",
        "operationId": "getAccountHolderSelfCheckingBalance",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderSelfBankBalance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/bank-transfers": {
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Move USD between the account holder's own share savings and share draft",
        "operationId": "createAccountHolderSelfBankTransfer",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "direction",
                  "amount"
                ],
                "additionalProperties": false,
                "properties": {
                  "direction": {
                    "type": "string",
                    "enum": [
                      "savings_to_checking",
                      "checking_to_savings"
                    ]
                  },
                  "amount": {
                    "type": "string",
                    "example": "100.00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "transfer_ref",
                    "status",
                    "as_of"
                  ],
                  "properties": {
                    "transfer_ref": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "posted",
                        "reversed",
                        "rejected"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current account holder's profile",
        "operationId": "getAccountHolderSelf",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/self/balance": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current account holder's wallet balances",
        "operationId": "getAccountHolderSelfBalance",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderSelfBalance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/payments/{id}/recovery": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentPathId"
        },
        {
          "$ref": "#/components/parameters/xMemberSessionId"
        },
        {
          "$ref": "#/components/parameters/xXkovaPublishableKey"
        }
      ],
      "get": {
        "tags": [
          "payment"
        ],
        "operationId": "getMemberPaymentRecovery",
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Read a member payment and its available actions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberPaymentRecovery"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/self/payments/{id}/cancel": {
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentPathId"
        },
        {
          "$ref": "#/components/parameters/xMemberSessionId"
        },
        {
          "$ref": "#/components/parameters/xXkovaPublishableKey"
        }
      ],
      "post": {
        "tags": [
          "payment"
        ],
        "operationId": "cancelMemberPayment",
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Cancel the current member's unsigned payment",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberPaymentRecovery"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/account-holders/self/transactions": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "List the current account holder's transactions",
        "operationId": "listAccountHolderSelfTransactions",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderSelfTransactionList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/bank-transactions": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "List the current account holder's internal bank transfers",
        "operationId": "listAccountHolderSelfBankTransactions",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "transfer_ref",
                          "amount",
                          "currency",
                          "status",
                          "from_account",
                          "to_account",
                          "occurred_at"
                        ],
                        "properties": {
                          "transfer_ref": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "posted",
                              "reversed",
                              "rejected"
                            ]
                          },
                          "from_account": {
                            "type": "string",
                            "enum": [
                              "savings",
                              "checking",
                              "other"
                            ]
                          },
                          "to_account": {
                            "type": "string",
                            "enum": [
                              "savings",
                              "checking",
                              "other"
                            ]
                          },
                          "memo": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "occurred_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/verification": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current member's identity verification status",
        "operationId": "getAccountHolderSelfVerification",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "required",
                    "status",
                    "verified_via",
                    "verified_at",
                    "verification_expires_at",
                    "required_kinds",
                    "sessions",
                    "verification_url"
                  ],
                  "properties": {
                    "required": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string"
                    },
                    "verified_via": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "verified_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "verification_expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "required_kinds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "kyc",
                          "kyb"
                        ]
                      }
                    },
                    "sessions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "status",
                          "vendor",
                          "vendor_detail_url",
                          "initiated_at",
                          "completed_at",
                          "expires_at"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "kyc",
                              "kyb"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "vendor_detail_url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri"
                          },
                          "initiated_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "completed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "expires_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "verification_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/account-holders/self/consents": {
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get the current account holder's consent state",
        "operationId": "getAccountHolderConsentState",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderConsentState"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Accept current tenant policies for the current account holder",
        "operationId": "acceptAccountHolderConsents",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentAcceptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderConsentState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/self/data-exports": {
      "post": {
        "tags": [
          "account_holders"
        ],
        "summary": "Request a right-to-access data export for the current account holder",
        "operationId": "requestAccountHolderDataExport",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/self/data-exports/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/dataExportPathId"
        }
      ],
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get data export status for the current account holder",
        "operationId": "getAccountHolderDataExport",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExport"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/accountHolderPathId"
        }
      ],
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Get account holder (staff view; broader than /users/{id})",
        "operationId": "getAccountHolder",
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "account_holders"
        ],
        "summary": "Update mutable account-holder fields",
        "operationId": "updateAccountHolder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "held",
                      "closed",
                      "closed_uncooperative",
                      "provisioning_failed"
                    ]
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "tier_1",
                      "tier_2"
                    ]
                  },
                  "state_reason": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "auto_save_contacts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/{id}/history": {
      "parameters": [
        {
          "$ref": "#/components/parameters/accountHolderPathId"
        }
      ],
      "get": {
        "tags": [
          "account_holders"
        ],
        "summary": "Account-holder tx history (staff)",
        "operationId": "listAccountHolderHistory",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletTransactionList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/self/avatar/upload-url": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Create a short-lived avatar upload URL",
        "operationId": "presignAccountHolderSelfAvatarUpload",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountHolderAvatarUploadUrl"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderAvatarUploadUrlResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/self/avatar/confirm": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Confirm an avatar upload for the account holder",
        "operationId": "confirmAccountHolderSelfAvatar",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountHolderAvatarConfirm"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/self/avatar": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Get a short-TTL presigned GET URL for the holder's avatar",
        "operationId": "getAccountHolderSelfAvatarUrl",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderAvatarUrl"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Delete the account holder avatar",
        "operationId": "deleteAccountHolderSelfAvatar",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/{id}/avatar/upload-url": {
      "parameters": [
        {
          "$ref": "#/components/parameters/accountHolderPathId"
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Create a short-lived avatar upload URL",
        "operationId": "presignAccountHolderAvatarUpload",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountHolderAvatarUploadUrl"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderAvatarUploadUrlResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/{id}/avatar/confirm": {
      "parameters": [
        {
          "$ref": "#/components/parameters/accountHolderPathId"
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Confirm an avatar upload for the account holder",
        "operationId": "confirmAccountHolderAvatar",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountHolderAvatarConfirm"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/account-holders/{id}/avatar": {
      "parameters": [
        {
          "$ref": "#/components/parameters/accountHolderPathId"
        }
      ],
      "get": {
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Get a short-TTL presigned GET URL for the holder's avatar",
        "operationId": "getAccountHolderAvatarUrl",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolderAvatarUrl"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "embedded:avatar"
        ],
        "summary": "Delete the account holder avatar",
        "operationId": "deleteAccountHolderAvatar",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/authorities": {
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List this workspace's token authorities",
        "operationId": "listTokenAuthorities",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenAuthorityList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Register a token authority (server-key EOA or treasury Safe)",
        "operationId": "registerTokenAuthority",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterAuthorityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenAuthority"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/authorities/control-safes": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Create a token-control Safe and register it as an authority",
        "operationId": "createTokenControlSafe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateControlSafeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenAuthority"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/authorities/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get one token authority with its role matrix",
        "operationId": "getTokenAuthority",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenAuthorityDetail"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/authorities/{id}/proof-challenge": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Issue a proof-of-possession challenge for a server-key authority",
        "operationId": "issueTokenAuthorityProofChallenge",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorityProofChallengeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/authorities/{id}/proof": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Submit a proof-of-possession for a server-key authority",
        "operationId": "submitTokenAuthorityProof",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitAuthorityProofRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenAuthority"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens": {
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List this workspace's customer-deployed tokens",
        "operationId": "listCustomerTokens",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerTokenList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a customer-deployed token",
        "operationId": "getCustomerToken",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerToken"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}/contracts": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List a token's explorable control contracts",
        "operationId": "listTokenizationContracts",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorableContractsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}/read": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "contract",
          "in": "query",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "token",
              "access_registry",
              "roles_modifier"
            ]
          }
        },
        {
          "name": "function",
          "in": "query",
          "required": true,
          "schema": {
            "type": "string"
          },
          "example": "balanceOf"
        },
        {
          "name": "args",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "default": "[]"
          },
          "example": "[\"0x91De3939ffe81F121Dc192ef1419d353100822bB\"]"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Read a view function on a token's control contract",
        "operationId": "readTokenizationContract",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractReadResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/provenance/verify": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "on_chain_token_id",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "default": ""
          },
          "example": "7"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Verify a token's metadata provenance chain",
        "operationId": "verifyTokenProvenance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvenanceVerifyResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/log/sth": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "on_chain_token_id",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "default": ""
          }
        },
        {
          "name": "tree_size",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 1
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a token's signed tree head (public transparency log)",
        "operationId": "getRwaTokenLogSth",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogSthResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/log/proof/inclusion": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "version_seq",
          "in": "query",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        },
        {
          "name": "on_chain_token_id",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "default": ""
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get an RFC-6962 inclusion proof (public transparency log)",
        "operationId": "getRwaTokenLogInclusionProof",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogInclusionResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/log/proof/consistency": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "from",
          "in": "query",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 1
          }
        },
        {
          "name": "to",
          "in": "query",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 1
          }
        },
        {
          "name": "on_chain_token_id",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "default": ""
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get an RFC-6962 consistency proof (public transparency log)",
        "operationId": "getRwaTokenLogConsistencyProof",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogConsistencyResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/witnesses": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Register a trusted third-party transparency witness",
        "operationId": "registerRwaWitness",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "witnessAddress",
                  "label"
                ],
                "properties": {
                  "witnessAddress": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "onChainTokenId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "witness_address"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "witness_address": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/log/witness": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Submit a third-party witness co-signature for an STH",
        "operationId": "submitRwaWitnessCoSignature",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "treeSize",
                  "signature"
                ],
                "properties": {
                  "treeSize": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "signature": {
                    "type": "string"
                  },
                  "onChainTokenId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "witness_address",
                    "signed_tree_head_id"
                  ],
                  "properties": {
                    "witness_address": {
                      "type": "string"
                    },
                    "signed_tree_head_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/documents/upload-url": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Presign an RWA document upload",
        "operationId": "presignRwaDocumentUpload",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fieldPath",
                  "contentType",
                  "contentLength"
                ],
                "properties": {
                  "fieldPath": {
                    "type": "string"
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "contentLength": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 52428800
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUploadUrlResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/documents/confirm": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Confirm an uploaded RWA document (integrity + provenance)",
        "operationId": "confirmRwaDocument",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "objectKey",
                  "fieldPath",
                  "visibility",
                  "contentType",
                  "expectedContentHash"
                ],
                "properties": {
                  "objectKey": {
                    "type": "string"
                  },
                  "fieldPath": {
                    "type": "string"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "gated"
                    ]
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "expectedContentHash": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/documents/{docId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "docId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "grantee",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Resolve an RWA document to a fetch URL",
        "operationId": "getRwaDocument",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentAccessResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/document-entitlements": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Grant a recipient access to a token's gated documents",
        "operationId": "grantRwaDocumentEntitlement",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grantee"
                ],
                "properties": {
                  "grantee": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "grantee"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "grantee": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/document-entitlements/{grantee}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "grantee",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "tokenization"
        ],
        "summary": "Revoke a recipient's gated-document access",
        "operationId": "revokeRwaDocumentEntitlement",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "revoked"
                  ],
                  "properties": {
                    "revoked": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/metadata": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "version",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 1
          }
        },
        {
          "name": "as-of",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "format": "date-time"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a token's metadata (ERC-721 tokenURI target)",
        "operationId": "getRwaTokenMetadata",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaTokenMetadata"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/metadata/{tokenId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "tokenId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "version",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 1
          }
        },
        {
          "name": "as-of",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "format": "date-time"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get per-instance metadata (ERC-1155 uri {id} target)",
        "operationId": "getRwaTokenInstanceMetadata",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaTokenMetadata"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/placeholder": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "token_id",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a token's branded placeholder image",
        "operationId": "getRwaTokenPlaceholder",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/contracts/{id}/contract-metadata": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "version",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 1
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a collection's contract metadata (contractURI target)",
        "operationId": "getRwaContractMetadata",
        "security": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaContractMetadata"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/cap-table": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a token's cap-table summary",
        "operationId": "getRwaTokenCapTable",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapTableSummaryResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/holders": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List a token's cap-table holders",
        "operationId": "listRwaTokenHolders",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapTableHoldersResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/instances": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List a token's per-instance ownership (NFT gallery)",
        "operationId": "listRwaTokenInstances",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapTableInstancesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/rwa/tokens/{id}/distributions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Create a pro-rata cap-table distribution",
        "operationId": "createRwaTokenDistribution",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDistributionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaDistributionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/rwa/tokens/{id}/distributions/{distId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "distId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/RwaDistributionId"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a distribution + its payouts",
        "operationId": "getRwaTokenDistribution",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaDistributionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/distributions/{distId}/execute": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "distId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/RwaDistributionId"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Execute a draft distribution (treasury-Safe multiSend payout)",
        "operationId": "executeRwaTokenDistribution",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteDistributionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaDistributionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/tokenization/erc20": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Deploy a customer gasless ERC-20 (ERC20X) on-chain",
        "operationId": "deployCustomerErc20",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeployErc20Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeployErc20Response"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/erc721": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Deploy a customer gasless ERC-721 (ERC721X) collection on-chain",
        "operationId": "deployCustomerErc721",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeployErc721Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeployErc20Response"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/erc1155": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Deploy a customer gasless ERC-1155 (ERC1155X) contract on-chain",
        "operationId": "deployCustomerErc1155",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeployErc1155Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeployErc20Response"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/mint": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Mint a customer token via its admin Safe (SAFE-PATH)",
        "operationId": "mintCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/burn": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Burn a customer token via its admin Safe (SAFE-PATH)",
        "operationId": "burnCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BurnTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/recover": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Recover (claw back) tokens from a blocked account (SAFE-PATH)",
        "operationId": "recoverCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoverTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/roles/grant": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Grant an ERC20X role via the admin Safe (SAFE-PATH)",
        "operationId": "grantCustomerTokenRole",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/roles/revoke": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Revoke an ERC20X role via the admin Safe (SAFE-PATH)",
        "operationId": "revokeCustomerTokenRole",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/access-registry": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Attach an access registry to an open token (post-deploy)",
        "operationId": "enableAccessRegistryCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnableAccessRegistryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnableAccessRegistryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/access-registry/disable": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Detach the access registry from a token (SAFE-PATH → open transfers)",
        "operationId": "disableAccessRegistryCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisableAccessRegistryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/access-list/add": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Add addresses to a customer token's access list (SAFE-PATH)",
        "operationId": "accessListAddCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessListMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/access-list/remove": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Remove addresses from a customer token's access list (SAFE-PATH)",
        "operationId": "accessListRemoveCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessListMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/treasury-status": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Read a customer token's current treasury-eligibility state",
        "operationId": "getCustomerTokenTreasuryStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreasuryEligibilityResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}/treasury-enable": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Enable a customer token for treasury custody + transfers (workspace-scoped)",
        "operationId": "enableCustomerTokenForTreasury",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TreasuryEnableRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreasuryEligibilityResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/treasury-disable": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Remove a customer token from this workspace's treasury readers",
        "operationId": "disableCustomerTokenForTreasury",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreasuryEligibilityResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/pause": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Pause a customer token via its admin Safe (SAFE-PATH circuit breaker)",
        "operationId": "pauseCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PauseTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/unpause": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Unpause a customer token via its admin Safe (SAFE-PATH circuit breaker)",
        "operationId": "unpauseCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PauseTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/raw-safe-tx": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Build a raw governance SafeTx on one of the token's own contracts (SAFE-PATH escape hatch)",
        "operationId": "rawSafeTxCustomerToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RawSafeTxRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/policies": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Set a mint-cap policy for a server-key authority (SAFE-PATH)",
        "operationId": "setCustomerTokenMintPolicy",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMintPolicyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/policies/revoke": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Revoke a server-key authority's mint-cap policy (SAFE-PATH)",
        "operationId": "revokeCustomerTokenMintPolicy",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeMintPolicyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/policy-mint": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Build a policy-scoped gasless mint (ModuleTx)",
        "operationId": "buildCustomerTokenPolicyMint",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyMintRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyMintBuildResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/operations/{opId}/module-signature": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "opId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Submit the authority's ModuleTx signature for a policy mint",
        "operationId": "submitCustomerTokenModuleSignature",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitModuleSignatureRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationOperation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/gasless/transfer-request": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Build a gasless holder-transfer ForwardRequest",
        "operationId": "buildCustomerTokenGaslessTransferRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GaslessTransferRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GaslessTransferRequestBuildResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/gasless/relay": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Relay a signed gasless holder-transfer ForwardRequest",
        "operationId": "relayCustomerTokenGaslessTransfer",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GaslessRelayRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationOperation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/deprecate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Deprecate a customer token (off-chain retire)",
        "operationId": "deprecateCustomerToken",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeprecateTokenResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/deploy/resume": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Resume a failed_resumable deploy",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "operationId": "resumeCustomerTokenDeploy",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeployErc20Response"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/operations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List a customer token's privileged operations",
        "operationId": "listTokenizationOperations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationOperationList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}/operations/{opId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "opId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get one tokenization operation",
        "operationId": "getTokenizationOperation",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationOperation"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}/operations/{opId}/signatures": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "opId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          }
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tokenization"
        ],
        "summary": "Submit a Safe-owner signature for a tokenization operation",
        "operationId": "submitTokenizationOperationSignature",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitMintSignatureRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationOperation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/fee-schedules": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List fee schedules for this tenant",
        "operationId": "listFeeSchedules",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "committed",
                "superseded"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeScheduleList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "tenant"
        ],
        "summary": "Propose a new fee schedule (validates floor enforcement)",
        "operationId": "proposeFeeSchedule",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeeScheduleProposal"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeSchedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/fee-schedules/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/feeSchedulePathId"
        }
      ],
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Get a single fee schedule (with effective rules)",
        "operationId": "getFeeSchedule",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeSchedule"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/fee-schedules/platform-fee": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "Read-only XKOVA platform-fee rule for this workspace",
        "operationId": "getPlatformFee",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "rule"
                  ],
                  "properties": {
                    "rule": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/FeeRule"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/account-holders/{id}/wallets": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/AccountHolderId"
          }
        }
      ],
      "get": {
        "tags": [
          "wallets"
        ],
        "summary": "List wallets for an account holder",
        "operationId": "listAccountHolderWallets",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Wallet"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/wallets/{id}/decommission": {
      "parameters": [
        {
          "$ref": "#/components/parameters/walletPathId"
        }
      ],
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "wallets"
        ],
        "summary": "Decommission a wallet (state=decommissioned; not deleted)",
        "operationId": "decommissionWallet",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wallet"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/chains/available": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List every chain automatically available to the calling workspace",
        "operationId": "listAvailableChains",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Chain"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/member-auth/hosted/authorizations": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Begin an XKOVA Hosted Auth authorization transaction",
        "operationId": "beginMemberAuthHostedAuthorization",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthHostedAuthorizationStartRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthHostedAuthorizationStart"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/member-auth/hosted/authorizations/exchange": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Exchange a Hosted Auth result for an XKOVA member session",
        "operationId": "completeMemberAuthHostedAuthorization",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthHostedAuthorizationExchange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthSessionMaterial"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/member-actions": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Begin exact authorization for a protected member action",
        "operationId": "beginMemberAction",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberActionStartRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberActionAuthorizationStart"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/member-actions/external/complete": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Complete a protected member action with a fresh FI OIDC proof",
        "operationId": "completeExternalMemberAction",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberActionExternalCompletionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberActionCompletion"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/account-center/handoffs": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Begin an XKOVA Hosted Account Center handoff",
        "operationId": "beginAccountCenterHandoff",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCenterHandoffStartRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCenterHandoffStart"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/account-center/handoffs/exchange": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Complete an XKOVA Hosted Account Center handoff",
        "operationId": "completeAccountCenterHandoff",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          },
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCenterHandoffExchange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCenterHandoffCompletion"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/member-auth/proof/challenges": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Issue a one-time nonce for a registered member-auth application",
        "operationId": "memberAuthProofChallenge",
        "parameters": [
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthProofChallengeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthProofChallenge"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/member-auth/proof/exchange": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Exchange a verified provider proof for an XKOVA member session",
        "operationId": "memberAuthProofExchange",
        "parameters": [
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthProofExchange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthSessionMaterial"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/member-auth/refresh": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Rotate a BFF-held XKOVA member-session refresh credential",
        "operationId": "memberAuthRefresh",
        "parameters": [
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthRefresh"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthSessionMaterial"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member-auth/sign-out": {
      "post": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Revoke the exact XKOVA member session or all current member sessions",
        "operationId": "memberAuthSignOut",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthSignOut"
              }
            }
          }
        },
        "responses": {
          "204": {},
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member-auth/session": {
      "get": {
        "tags": [
          "embedded:member_auth"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Resolve the active XKOVA member session",
        "operationId": "memberAuthSession",
        "parameters": [
          {
            "$ref": "#/components/parameters/xMemberSessionId"
          },
          {
            "$ref": "#/components/parameters/xXkovaPublishableKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthSessionInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/tenant/member-auth/applications": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List member-auth applications in the active workspace",
        "operationId": "listMemberAuthApplications",
        "parameters": [
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "next_cursor",
                    "has_more"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MemberAuthApplicationSummary"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/tenant/member-auth/applications/hosted": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Enable an XKOVA Hosted Auth application",
        "operationId": "createMemberAuthHostedApplication",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthHostedApplicationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthApplicationSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/tenant/member-auth/applications/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/pathId"
        }
      ],
      "patch": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Update a member-auth application",
        "operationId": "updateMemberAuthApplication",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthApplicationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthApplicationSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Disable a member-auth application",
        "operationId": "deleteMemberAuthApplication",
        "responses": {
          "204": {},
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/tenant/member-auth/application": {
      "put": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Register or update the calling backend's BYO OIDC application",
        "operationId": "configureMemberAuthOidcApplication",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAuthOidcApplicationUpsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthApplication"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/tenant/member-auth/redirect-urls": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List redirect URLs for the active member-auth application",
        "operationId": "listMemberAuthRedirectUrls",
        "parameters": [
          {
            "$ref": "#/components/parameters/memberAuthApplicationId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MemberAuthRedirectUrlEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Allowlist a new redirect URL for member authentication",
        "operationId": "createMemberAuthRedirectUrl",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "application_id",
                  "purpose",
                  "url"
                ],
                "properties": {
                  "application_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "email_confirm",
                      "password_reset",
                      "magic_link",
                      "authorization_result"
                    ]
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthRedirectUrlEntry"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/tenant/member-auth/redirect-urls/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/pathId"
        }
      ],
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/memberAuthApplicationId"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Soft-delete an allowed redirect URL",
        "operationId": "deleteMemberAuthRedirectUrl",
        "responses": {
          "204": {},
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tenant/member-auth/allowed-origins": {
      "get": {
        "tags": [
          "tenant"
        ],
        "summary": "List allowed browser Origin values for member-auth flows",
        "operationId": "listMemberAuthAllowedOrigins",
        "parameters": [
          {
            "$ref": "#/components/parameters/memberAuthApplicationId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MemberAuthAllowedOriginEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Allowlist a new browser Origin for member-auth flows",
        "operationId": "createMemberAuthAllowedOrigin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "application_id",
                  "origin"
                ],
                "properties": {
                  "application_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "origin": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberAuthAllowedOriginEntry"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/tenant/member-auth/allowed-origins/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/pathId"
        }
      ],
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          },
          {
            "$ref": "#/components/parameters/memberAuthApplicationId"
          }
        ],
        "tags": [
          "tenant"
        ],
        "summary": "Soft-delete an allowed Origin",
        "operationId": "deleteMemberAuthAllowedOrigin",
        "responses": {
          "204": {},
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/asset-schemas": {
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List the workspace's asset schemas",
        "operationId": "listRwaAssetSchemas",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RwaAssetSchemaSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/templates": {
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List the forkable platform templates",
        "operationId": "listRwaAssetSchemaTemplates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RwaAssetSchemaTemplate"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/compile-preview": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Compile a field-palette and report the publish-gate verdict",
        "operationId": "compileRwaAssetSchemaPreview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "palette"
                ],
                "properties": {
                  "palette": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaCompilePreviewResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/draft": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Save a palette as the workspace schema's editable draft",
        "operationId": "saveRwaAssetSchemaDraft",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "schema_key",
                  "display_name",
                  "palette"
                ],
                "properties": {
                  "asset_schema_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "schema_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "display_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "palette": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaAssetSchemaRef"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/upload-publish": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Publish a raw JSON Schema through the publish gate",
        "operationId": "uploadPublishRwaAssetSchema",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "schema_key",
                  "display_name",
                  "raw_schema"
                ],
                "properties": {
                  "schema_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "display_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "raw_schema": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaAssetSchemaRef"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/fork": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Fork a platform template into a workspace draft",
        "operationId": "forkRwaAssetSchema",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "source_schema_key"
                ],
                "properties": {
                  "source_schema_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "new_schema_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "new_display_name": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RwaAssetSchemaRef"
                    },
                    {
                      "type": "object",
                      "required": [
                        "schema_key"
                      ],
                      "properties": {
                        "schema_key": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/{id}": {
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get one workspace asset schema and its version history",
        "operationId": "getRwaAssetSchema",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaAssetSchemaDetail"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/asset-schemas/{id}/publish": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Publish the workspace schema's open draft",
        "operationId": "publishRwaAssetSchema",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaAssetSchemaRef"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/schema-rebinds": {
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Propose an attested schema-evolution rebind ceremony",
        "operationId": "proposeRwaSchemaRebind",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "asset_schema_id",
                  "from_version",
                  "to_version",
                  "token_set",
                  "transform"
                ],
                "properties": {
                  "asset_schema_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "from_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "to_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "token_set": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "items": {
                      "$ref": "#/components/schemas/CustomerTokenId"
                    }
                  },
                  "transform": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ceremony_id"
                  ],
                  "properties": {
                    "ceremony_id": {
                      "$ref": "#/components/schemas/SchemaRebindId"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/schema-rebinds/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/schemaRebindPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Read a rebind ceremony's lifecycle state",
        "operationId": "getRwaSchemaRebind",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "status",
                    "asset_schema_id",
                    "from_version",
                    "to_version",
                    "token_set",
                    "transform_hash",
                    "dry_run_result_hash",
                    "signer_address",
                    "created_at",
                    "committed_at"
                  ],
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/SchemaRebindId"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "proposed",
                        "dry_run_passed",
                        "dry_run_failed",
                        "attested",
                        "committed",
                        "failed"
                      ]
                    },
                    "asset_schema_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "from_version": {
                      "type": "integer"
                    },
                    "to_version": {
                      "type": "integer"
                    },
                    "token_set": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerTokenId"
                      }
                    },
                    "transform_hash": {
                      "type": "string"
                    },
                    "dry_run_result_hash": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "signer_address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "committed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/schema-rebinds/{id}/dry-run": {
      "parameters": [
        {
          "$ref": "#/components/parameters/schemaRebindPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Dry-run a rebind against the target schema (no write)",
        "operationId": "dryRunRwaSchemaRebind",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "results",
                    "dry_run_result_hash"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "customer_token_id",
                          "ok"
                        ],
                        "properties": {
                          "customer_token_id": {
                            "$ref": "#/components/schemas/CustomerTokenId"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "dry_run_result_hash": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/schema-rebinds/{id}/attest": {
      "parameters": [
        {
          "$ref": "#/components/parameters/schemaRebindPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Record an EIP-712 attestation over the rebind proposal digest",
        "operationId": "attestRwaSchemaRebind",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "signature",
                    "signer_address"
                  ],
                  "properties": {
                    "signature": {
                      "type": "string"
                    },
                    "signer_address": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/schema-rebinds/{id}/commit": {
      "parameters": [
        {
          "$ref": "#/components/parameters/schemaRebindPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Commit a rebind - move bindings + re-commit metadata",
        "operationId": "commitRwaSchemaRebind",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "committed_at",
                    "affected_token_count"
                  ],
                  "properties": {
                    "committed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "affected_token_count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/attesters": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List a token's registered attesters",
        "operationId": "listRwaAttesters",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RwaAttesterView"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Register a token-pinned external attester",
        "operationId": "registerRwaAttester",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "display_name",
                  "attester_address",
                  "role_label"
                ],
                "properties": {
                  "display_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "attester_address": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "role_label": {
                    "type": "string",
                    "enum": [
                      "auditor",
                      "appraiser",
                      "custodian",
                      "escrow_agent",
                      "oracle",
                      "legal_counsel",
                      "other"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaAttesterView"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/attesters/{attesterId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "attesterId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/RwaAttesterId"
          }
        }
      ],
      "delete": {
        "tags": [
          "tokenization"
        ],
        "summary": "Revoke a registered attester (soft)",
        "operationId": "revokeRwaAttester",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaAttesterView"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/fields/{fieldPath}/attested-entry": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "fieldPath",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Submit an attested append-log fact",
        "operationId": "submitRwaAttestedEntry",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "attester_id",
                  "signature",
                  "payload"
                ],
                "properties": {
                  "attester_id": {
                    "$ref": "#/components/schemas/RwaAttesterId"
                  },
                  "signature": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]+$",
                    "maxLength": 400
                  },
                  "payload": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "on_chain_token_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "committed",
                    "deduped",
                    "attester_id",
                    "attester_address",
                    "attested_digest"
                  ],
                  "properties": {
                    "committed": {
                      "type": "boolean"
                    },
                    "deduped": {
                      "type": "boolean"
                    },
                    "attester_id": {
                      "$ref": "#/components/schemas/RwaAttesterId"
                    },
                    "attester_address": {
                      "type": "string",
                      "pattern": "^0x[0-9a-fA-F]{40}$"
                    },
                    "attested_digest": {
                      "type": "string",
                      "pattern": "^0x[0-9a-fA-F]+$"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/fields": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Describe the token's bound-schema fields + current values",
        "operationId": "describeRwaTokenFields",
        "parameters": [
          {
            "name": "on_chain_token_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "fields"
                  ],
                  "properties": {
                    "fields": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RwaFieldDescriptor"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/fields/{fieldPath}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "fieldPath",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Commit an operator-authored field value",
        "operationId": "commitRwaTokenField",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value",
                  "idempotency_key"
                ],
                "properties": {
                  "value": {},
                  "on_chain_token_id": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "committed",
                    "deduped",
                    "field_path",
                    "storage_backend"
                  ],
                  "properties": {
                    "committed": {
                      "type": "boolean"
                    },
                    "deduped": {
                      "type": "boolean"
                    },
                    "field_path": {
                      "type": "string"
                    },
                    "storage_backend": {
                      "type": "string",
                      "enum": [
                        "inline",
                        "frozen",
                        "versioned",
                        "append-log"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/schema-binding": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Read the token's bound asset schema",
        "operationId": "getRwaSchemaBinding",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaSchemaBinding"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Bind a published asset schema to the token",
        "operationId": "bindRwaSchema",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "asset_schema_id",
                  "version"
                ],
                "properties": {
                  "asset_schema_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RwaSchemaBinding"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/eligibility/{holderRef}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "holderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Read the (token, holder) transfer-eligibility context",
        "operationId": "getRwaHolderEligibility",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "holder_ref",
                    "accreditation",
                    "jurisdiction",
                    "lockup_until"
                  ],
                  "properties": {
                    "holder_ref": {
                      "type": "string"
                    },
                    "accreditation": {
                      "type": "string",
                      "enum": [
                        "none",
                        "self_attested",
                        "verified",
                        "expired"
                      ]
                    },
                    "jurisdiction": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lockup_until": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/lockups/{holderRef}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "holderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "tokenization"
        ],
        "summary": "Set a per-holding lockup on an RWA token",
        "operationId": "setRwaHolderLockup",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lockup_until",
                  "reason"
                ],
                "properties": {
                  "lockup_until": {
                    "type": "string",
                    "format": "date-time",
                    "maxLength": 40
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "holder_ref",
                    "customer_token_id",
                    "lockup_until",
                    "reason"
                  ],
                  "properties": {
                    "holder_ref": {
                      "type": "string"
                    },
                    "customer_token_id": {
                      "$ref": "#/components/schemas/CustomerTokenId"
                    },
                    "lockup_until": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/holders/{holderRef}/eligibility": {
      "parameters": [
        {
          "name": "holderRef",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "tokenization"
        ],
        "summary": "Upsert a holder's global eligibility attributes",
        "operationId": "setRwaHolderEligibility",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "accreditation_status",
                  "jurisdiction",
                  "source"
                ],
                "properties": {
                  "accreditation_status": {
                    "type": "string",
                    "enum": [
                      "none",
                      "self_attested",
                      "verified",
                      "expired"
                    ]
                  },
                  "accreditation_expires_at": {
                    "type": "string",
                    "format": "date-time",
                    "maxLength": 40
                  },
                  "jurisdiction": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 3
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "kyc_provider",
                      "operator_attested",
                      "integrator_supplied"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "holder_ref",
                    "accreditation_status",
                    "accreditation_expires_at",
                    "jurisdiction",
                    "source",
                    "updated_at"
                  ],
                  "properties": {
                    "holder_ref": {
                      "type": "string"
                    },
                    "accreditation_status": {
                      "type": "string",
                      "enum": [
                        "none",
                        "self_attested",
                        "verified",
                        "expired"
                      ]
                    },
                    "accreditation_expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "jurisdiction": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "kyc_provider",
                        "operator_attested",
                        "integrator_supplied"
                      ]
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rwa/tokens/{id}/corporate-actions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Open a corporate action on an RWA token",
        "operationId": "createRwaCorporateAction",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "redemption",
                      "split",
                      "consolidation",
                      "additional_issuance",
                      "capital_call",
                      "mandatory_conversion"
                    ]
                  },
                  "payout_token_deployment_id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "payout_account_holder_id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "payout_from_wallet_id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "price_per_unit_raw": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  "ratio_numerator": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  "ratio_denominator": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  "recipients": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "to"
                      ],
                      "properties": {
                        "to": {
                          "type": "string",
                          "pattern": "^0x[0-9a-fA-F]{40}$"
                        },
                        "token_id": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        },
                        "amount": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        }
                      }
                    }
                  },
                  "target_token_id": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorporateActionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/rwa/tokens/{id}/corporate-actions/{caId}/advance": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "caId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CorporateActionId"
          }
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Advance a corporate action's state machine",
        "operationId": "advanceRwaCorporateAction",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorporateActionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/rwa/tokens/{id}/corporate-actions/{caId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        },
        {
          "name": "caId",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CorporateActionId"
          }
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "Get a corporate action + its leg progress",
        "operationId": "getRwaCorporateAction",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorporateActionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/rwa/tokens/{id}/relationships": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "get": {
        "tags": [
          "tokenization"
        ],
        "summary": "List a token's outgoing relationship edges",
        "operationId": "listRwaTokenRelationships",
        "parameters": [
          {
            "name": "field_path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_path",
                          "targets"
                        ],
                        "properties": {
                          "field_path": {
                            "type": "string"
                          },
                          "targets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "rel_kind",
                                "cardinality_seq"
                              ],
                              "properties": {
                                "rel_kind": {
                                  "type": "string",
                                  "enum": [
                                    "token",
                                    "identity",
                                    "external"
                                  ]
                                },
                                "to_customer_token_id": {
                                  "type": "string",
                                  "pattern": "^ctk_[0-9A-Za-z]{22}$"
                                },
                                "to_identity_ref": {
                                  "type": "string"
                                },
                                "to_external_ref": {
                                  "type": "object",
                                  "required": [
                                    "system",
                                    "id"
                                  ],
                                  "properties": {
                                    "system": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                },
                                "cardinality_seq": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/tokenization/tokens/{id}/nft-transfers/build": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Build a gasless holder NFT-transfer ForwardRequest",
        "operationId": "buildCustomerTokenNftTransferRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to",
                  "token_id"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "pattern": "^0x[a-fA-F0-9]{40}$",
                    "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^0x[a-fA-F0-9]{40}$",
                    "example": "0xa7DA7ceB2a3286Da8bea63c43dB1D19da9109b28"
                  },
                  "token_id": {
                    "type": "string",
                    "pattern": "^[0-9]{1,78}$",
                    "example": "1"
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^[0-9]{1,78}$",
                    "example": "1"
                  },
                  "idempotencyKey": {
                    "type": "string"
                  },
                  "sandbox_scenario": {
                    "type": "string",
                    "enum": [
                      "allow",
                      "review",
                      "block"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GaslessTransferRequestBuildResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenization/tokens/{id}/nft-transfers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerTokenPathId"
        }
      ],
      "post": {
        "tags": [
          "tokenization"
        ],
        "summary": "Relay a signed gasless holder NFT transfer",
        "operationId": "relayCustomerTokenNftTransfer",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GaslessRelayRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationOperation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TenantBranding": {
        "type": "object",
        "required": [
          "resolved",
          "theme",
          "logo_upload_limits",
          "has_logo_override"
        ],
        "properties": {
          "logo_upload_limits": {
            "$ref": "#/components/schemas/LogoUploadLimits"
          },
          "has_logo_override": {
            "type": "boolean"
          },
          "resolved": {
            "type": "object",
            "required": [
              "brand_name",
              "legal_name",
              "from_name",
              "from_email",
              "support_email"
            ],
            "properties": {
              "brand_name": {
                "type": "string"
              },
              "legal_name": {
                "type": "string"
              },
              "from_name": {
                "type": "string"
              },
              "from_email": {
                "type": "string",
                "format": "email"
              },
              "reply_to_email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "support_email": {
                "type": "string",
                "format": "email"
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "primary_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "secondary_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "accent_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "primary_color_dark": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "secondary_color_dark": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "accent_color_dark": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email_button_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email_bg_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email_text_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "app_title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "footer_text": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "terms_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "privacy_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_term_preset": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "member",
                      "customer",
                      "user",
                      "client"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "theme": {
            "$ref": "#/components/schemas/TenantBrandingTheme"
          }
        }
      },
      "UpdateBranding": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "brand_name": {
            "type": "string",
            "maxLength": 120
          },
          "legal_name": {
            "type": "string",
            "maxLength": 160
          },
          "from_name": {
            "type": "string",
            "maxLength": 120
          },
          "from_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "reply_to_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "support_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "secondary_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "accent_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "primary_color_dark": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "secondary_color_dark": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "accent_color_dark": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "email_button_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "email_bg_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "email_text_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "app_title": {
            "type": "string",
            "maxLength": 120
          },
          "footer_text": {
            "type": "string",
            "maxLength": 400
          },
          "terms_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "privacy_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "subject_override": {
            "type": "string",
            "maxLength": 200
          },
          "intro_override": {
            "type": "string",
            "maxLength": 400
          },
          "display_term_preset": {
            "type": "string",
            "enum": [
              "member",
              "customer",
              "user",
              "client"
            ]
          },
          "copy_overrides": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "singular": {
                "type": "string",
                "maxLength": 60
              },
              "plural": {
                "type": "string",
                "maxLength": 60
              },
              "possessive": {
                "type": "string",
                "maxLength": 60
              }
            }
          }
        }
      },
      "LogoUploadUrlRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "content_type",
          "content_length"
        ],
        "properties": {
          "content_type": {
            "type": "string",
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/gif"
            ]
          },
          "content_length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5242880
          }
        }
      },
      "LogoUploadUrlResponse": {
        "type": "object",
        "required": [
          "upload_url",
          "object_key",
          "expires_at"
        ],
        "properties": {
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "object_key": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LogoConfirmRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object_key"
        ],
        "properties": {
          "object_key": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "EmailDomainList": {
        "type": "object",
        "required": [
          "provider_configured",
          "domains"
        ],
        "properties": {
          "provider_configured": {
            "type": "boolean"
          },
          "domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailDomain"
            }
          }
        }
      },
      "AddEmailDomainRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "domain"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "format": "hostname"
          }
        }
      },
      "EmailDomain": {
        "type": "object",
        "required": [
          "id",
          "domain",
          "status",
          "region",
          "dns_records",
          "verified_at",
          "last_synced_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "not_started",
              "pending",
              "verified",
              "failed",
              "temporary_failure"
            ]
          },
          "region": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "dns_records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailDnsRecord"
            }
          },
          "verified_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublicBranding": {
        "type": "object",
        "required": [
          "brand_name",
          "support_email",
          "logo_url",
          "primary_color",
          "secondary_color",
          "accent_color",
          "primary_color_dark",
          "secondary_color_dark",
          "accent_color_dark",
          "app_title",
          "footer_text",
          "terms_url",
          "privacy_url"
        ],
        "properties": {
          "brand_name": {
            "type": "string"
          },
          "support_email": {
            "type": "string",
            "format": "email"
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_color": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_color": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "accent_color": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_color_dark": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_color_dark": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "accent_color_dark": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "app_title": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "footer_text": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "terms_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "privacy_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TenantSelf": {
        "type": "object",
        "required": [
          "id",
          "partner_id",
          "name",
          "type",
          "status",
          "regulator_type",
          "bill_to",
          "provider",
          "custody_model",
          "send_initiation_locked",
          "contacts_feature_enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "partner_id": {
            "$ref": "#/components/schemas/PartnerId"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "cu_federal",
              "cu_state",
              "community_bank",
              "fintech",
              "other"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "provisioning",
              "active",
              "read_only",
              "suspended"
            ]
          },
          "regulator_type": {
            "type": "string",
            "enum": [
              "ncua",
              "occ",
              "fdic",
              "fintech",
              "other"
            ]
          },
          "bill_to": {
            "type": "string",
            "enum": [
              "partner",
              "tenant"
            ]
          },
          "provider": {
            "type": "string",
            "enum": [
              "thirdweb",
              "turnkey",
              "fireblocks",
              "privy",
              "crossmint"
            ]
          },
          "custody_model": {
            "type": "string",
            "enum": [
              "custodial",
              "non_custodial"
            ]
          },
          "ip_allowlist": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "send_initiation_locked": {
            "type": "boolean"
          },
          "contacts_feature_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "TenantPolicies": {
        "type": "object",
        "properties": {
          "tos": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "privacy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "marketing_consent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "required": {
                "type": "boolean"
              }
            }
          },
          "required": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "tos",
                "privacy",
                "marketing"
              ]
            }
          }
        }
      },
      "OnboardingStatus": {
        "type": "object",
        "required": [
          "workspace_id",
          "workspace_type",
          "status",
          "setup_complete",
          "intent"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_type": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_setup",
              "active",
              "archived"
            ]
          },
          "setup_complete": {
            "type": "boolean"
          },
          "intent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OnboardingIntent"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OnboardingSetupRequest": {
        "type": "object",
        "required": [
          "intent"
        ],
        "properties": {
          "intent": {
            "$ref": "#/components/schemas/OnboardingIntent"
          }
        }
      },
      "WorkspaceList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workspace"
            }
          }
        }
      },
      "Workspace": {
        "type": "object",
        "required": [
          "id",
          "tenant_id",
          "type",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_setup",
              "active",
              "archived"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "WorkspaceUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        }
      },
      "WorkspaceTokenList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceToken"
            }
          }
        }
      },
      "WebhookEndpointList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CursorPage"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          }
        ]
      },
      "WebhookEndpointCreate": {
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WebhookEndpointCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEndpoint"
          },
          {
            "type": "object",
            "properties": {
              "secret": {
                "type": "string"
              }
            }
          }
        ]
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/WebhookEndpointId"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hmac_secret_fingerprint": {
            "type": "string"
          },
          "previous_hmac_secret_fingerprint": {
            "type": [
              "string",
              "null"
            ]
          },
          "previous_secret_retired_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "WebhookEndpointUpdate": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "WebhookTestResult": {
        "type": "object",
        "required": [
          "delivered",
          "status_code",
          "duration_ms",
          "error"
        ],
        "properties": {
          "delivered": {
            "type": "boolean"
          },
          "status_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "duration_ms": {
            "type": "integer"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "WebhookEndpointId": {
        "type": "string",
        "pattern": "^whe_[0-9A-Za-z]{22}$",
        "example": "whe_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "WebhookDeliveryList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CursorPage"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          }
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/WebhookDeliveryId"
          },
          "webhook_endpoint_id": {
            "$ref": "#/components/schemas/WebhookEndpointId"
          },
          "event": {
            "type": "string"
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookEventEnvelope"
          },
          "attempt_count": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed",
              "dlq"
            ]
          },
          "last_status_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_response_body": {
            "type": [
              "string",
              "null"
            ]
          },
          "next_retry_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "correlation_id": {
            "$ref": "#/components/schemas/CorrelationId"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "BulkReplayWebhookDeliveries": {
        "type": "object",
        "required": [
          "delivery_ids"
        ],
        "properties": {
          "delivery_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryId"
            }
          }
        }
      },
      "WebhookBulkReplayResult": {
        "type": "object",
        "required": [
          "data",
          "replayed_count",
          "skipped_count"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "replayed_count": {
            "type": "integer"
          },
          "skipped_count": {
            "type": "integer"
          }
        }
      },
      "WebhookEventTypeList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            }
          }
        }
      },
      "IntegrationGatewayList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationGateway"
            }
          }
        }
      },
      "RegisterGatewayWrite": {
        "type": "object",
        "required": [
          "name",
          "base_url"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "base_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          }
        }
      },
      "IntegrationGateway": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/IntegrationGatewayId"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "base_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string",
            "enum": [
              "registered",
              "active",
              "disabled"
            ]
          },
          "pinned_cert_fingerprint": {
            "type": [
              "string",
              "null"
            ]
          },
          "previous_cert_fingerprint": {
            "type": [
              "string",
              "null"
            ]
          },
          "cert_rotated_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "conformance_status": {
            "type": "string",
            "enum": [
              "unknown",
              "passing",
              "failing"
            ]
          },
          "conformance_checked_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by_staff_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaffId"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "pending_approval_request_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApprovalRequestId"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateGatewayRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "base_url": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "GatewayEventList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GatewayEvent"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "PinCertWrite": {
        "type": "object",
        "required": [
          "fingerprint"
        ],
        "properties": {
          "fingerprint": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "SetGatewayStatusWrite": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "registered",
              "active",
              "disabled"
            ]
          }
        }
      },
      "GatewayConformanceWrite": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "unknown",
              "passing",
              "failing"
            ]
          }
        }
      },
      "Wallet": {
        "type": "object",
        "required": [
          "id",
          "tenant_id",
          "account_holder_id",
          "address",
          "chain_id",
          "chain",
          "custody_model",
          "provider",
          "state",
          "monitoring_status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "address": {
            "type": "string"
          },
          "chain_id": {
            "type": "string",
            "deprecated": true
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "custody_model": {
            "type": "string",
            "enum": [
              "custodial",
              "non_custodial"
            ]
          },
          "provider": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "decommissioned"
            ]
          },
          "monitoring_status": {
            "type": "string",
            "enum": [
              "pending_live",
              "catching_up",
              "ready",
              "halted"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "WalletTransactionList": {
        "type": "object",
        "required": [
          "data",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletTransactionSummary"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "LedgerList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CursorPage"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LedgerEntry"
                }
              }
            }
          }
        ]
      },
      "WalletBalanceResult": {
        "type": "object",
        "required": [
          "chain_id",
          "wallet",
          "token",
          "balance",
          "last_updated_block",
          "last_updated_tx"
        ],
        "properties": {
          "chain_id": {
            "type": "integer"
          },
          "wallet": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "token": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "balance": {
            "type": "string"
          },
          "last_updated_block": {
            "type": "string"
          },
          "last_updated_tx": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{64}$"
          }
        }
      },
      "AccountHolderId": {
        "type": "string",
        "pattern": "^ah_[0-9A-Za-z]{22}$",
        "example": "ah_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ContactList": {
        "type": "object",
        "required": [
          "data",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "ContactWrite": {
        "type": "object",
        "required": [
          "display_name"
        ],
        "properties": {
          "display_name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "wallet_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ContactId"
          },
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "display_name": {
            "type": "string"
          },
          "email_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "wallet_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_sent_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "pending_resolution": {
            "type": "boolean"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "code",
          "message",
          "correlation_id"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "compliance_blocked"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object"
          },
          "correlation_id": {
            "$ref": "#/components/schemas/CorrelationId"
          }
        }
      },
      "FundingRequest": {
        "type": "object",
        "required": [
          "id",
          "tenant_id",
          "workspace_id",
          "chain",
          "account_holder_id",
          "amount",
          "currency",
          "state",
          "failure_reason_code",
          "x_partner_reference",
          "quote_id",
          "quote_rate",
          "quote_stablecoin_amount",
          "quote_partner_fee_fiat",
          "bank_debit_transfer_id",
          "partner_status",
          "last_event_at",
          "metadata",
          "settlement_order",
          "idempotency_key",
          "correlation_id",
          "ramp_profile",
          "hosted_redirect_url",
          "created_at",
          "updated_at",
          "settled_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/FundingRequestId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          },
          "currency": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending_compliance",
              "pending_issuance",
              "settled",
              "failed"
            ]
          },
          "failure_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "x_partner_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "quote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quote_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "quote_stablecoin_amount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "quote_partner_fee_fiat": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "bank_debit_transfer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "partner_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_event_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "settlement_order": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "hold_first",
              "debit_first",
              null
            ]
          },
          "idempotency_key": {
            "type": "string"
          },
          "correlation_id": {
            "type": "string"
          },
          "ramp_profile": {
            "type": "string",
            "enum": [
              "mock",
              "sandbox",
              "coinbase"
            ]
          },
          "hosted_redirect_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "settled_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "FundingRequestCreate": {
        "type": "object",
        "required": [
          "account_holder_id",
          "fiat_amount",
          "fiat",
          "stablecoin",
          "chain",
          "source_bank_account_id",
          "pool_bank_account_id",
          "destination_address"
        ],
        "properties": {
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "fiat_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "fiat": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "stablecoin": {
            "type": "string",
            "enum": [
              "USDC",
              "dUSDC",
              "USDT",
              "RLUSD"
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/ChainRef"
          },
          "source_bank_account_id": {
            "type": "string"
          },
          "source_bank_account_type": {
            "type": "string",
            "enum": [
              "savings",
              "checking"
            ]
          },
          "pool_bank_account_id": {
            "type": "string"
          },
          "destination_address": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "return_url": {
            "type": "string"
          },
          "settlement_order": {
            "type": "string",
            "enum": [
              "hold_first",
              "debit_first"
            ]
          }
        }
      },
      "OffRampRequest": {
        "type": "object",
        "required": [
          "chain"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/OffRampRequestId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          },
          "currency": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending_compliance",
              "pending_burn",
              "awaiting_institution_credit",
              "settled",
              "failed"
            ]
          },
          "failure_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "x_partner_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_credit_transfer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "partner_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_event_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "idempotency_key": {
            "type": "string"
          },
          "correlation_id": {
            "type": "string"
          },
          "ramp_profile": {
            "type": "string",
            "enum": [
              "mock",
              "sandbox",
              "coinbase"
            ]
          },
          "hosted_redirect_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "settled_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OffRampRequestCreate": {
        "type": "object",
        "required": [
          "account_holder_id",
          "stablecoin_amount",
          "stablecoin",
          "chain",
          "burn_tx_hash",
          "source_address",
          "settlement_bank_account_id",
          "savings_bank_account_id",
          "destination_account"
        ],
        "properties": {
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "stablecoin_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "stablecoin": {
            "type": "string",
            "enum": [
              "USDC",
              "dUSDC",
              "USDT",
              "RLUSD"
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/ChainRef"
          },
          "burn_tx_hash": {
            "type": "string"
          },
          "source_address": {
            "type": "string"
          },
          "settlement_bank_account_id": {
            "type": "string"
          },
          "savings_bank_account_id": {
            "type": "string"
          },
          "destination_bank_account_type": {
            "type": "string",
            "enum": [
              "savings",
              "checking"
            ]
          },
          "destination_account": {
            "$ref": "#/components/schemas/CuPayoutAccountRef"
          },
          "memo": {
            "type": "string"
          },
          "return_url": {
            "type": "string"
          }
        }
      },
      "PaymentQuoteRequest": {
        "type": "object",
        "required": [
          "account_holder_id",
          "from_wallet_id",
          "to_address",
          "token_deployment_id",
          "gross_amount"
        ],
        "properties": {
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "from_wallet_id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "to_address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "gross_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "chain_ref": {
            "type": "string",
            "maxLength": 32
          },
          "channel": {
            "type": "string",
            "enum": [
              "end_user_mobile",
              "end_user_web",
              "ecommerce",
              "api",
              "external_wallet"
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          }
        }
      },
      "PaymentQuote": {
        "type": "object",
        "properties": {
          "quote_id": {
            "type": "string"
          },
          "gross_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "net_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "fee_snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "beneficiary": {
                  "type": "string"
                },
                "basis": {
                  "type": "string",
                  "enum": [
                    "flat",
                    "bps",
                    "percent"
                  ]
                },
                "rate": {
                  "$ref": "#/components/schemas/Money"
                },
                "computed_amount": {
                  "$ref": "#/components/schemas/Money"
                }
              }
            }
          },
          "fee_fingerprint": {
            "type": "string"
          },
          "compliance_fingerprint": {
            "type": "string"
          },
          "compliance_decision": {
            "type": "string",
            "enum": [
              "allow",
              "review",
              "block"
            ]
          },
          "compliance_reason_code": {
            "type": "string"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "within_limits": {
            "type": "boolean"
          },
          "daily_remaining": {
            "type": "object",
            "properties": {
              "tx_count": {
                "type": "integer"
              },
              "gross_amount": {
                "$ref": "#/components/schemas/Money"
              }
            }
          }
        }
      },
      "PaymentSimulation": {
        "type": "object",
        "required": [
          "would_succeed",
          "revert_reason",
          "balance_sufficient",
          "allowance_sufficient",
          "gas_estimate",
          "fees"
        ],
        "properties": {
          "would_succeed": {
            "type": "boolean"
          },
          "revert_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "balance_sufficient": {
            "type": "boolean"
          },
          "allowance_sufficient": {
            "type": "boolean"
          },
          "gas_estimate": {
            "type": "string"
          },
          "fees": {
            "type": "object",
            "required": [
              "gross_amount",
              "net_amount",
              "total_fee_amount"
            ],
            "properties": {
              "gross_amount": {
                "$ref": "#/components/schemas/Money"
              },
              "net_amount": {
                "$ref": "#/components/schemas/Money"
              },
              "total_fee_amount": {
                "$ref": "#/components/schemas/Money"
              }
            }
          }
        }
      },
      "StatusCanonical": {
        "type": "string",
        "enum": [
          "queued",
          "pending",
          "success",
          "failed"
        ]
      },
      "Money": {
        "type": "string",
        "example": "25.00"
      },
      "TimestampUtc": {
        "type": "string",
        "format": "date-time"
      },
      "PaymentList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CursorPage"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          }
        ]
      },
      "PaymentCreate": {
        "type": "object",
        "required": [
          "account_holder_id",
          "from_wallet_id",
          "to_address",
          "token_deployment_id",
          "gross_amount"
        ],
        "properties": {
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "from_wallet_id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "to_address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "gross_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "chain_ref": {
            "type": "string",
            "maxLength": 32
          },
          "channel": {
            "type": "string",
            "enum": [
              "end_user_mobile",
              "end_user_web",
              "ecommerce",
              "api",
              "external_wallet"
            ]
          },
          "display_type": {
            "type": "string",
            "enum": [
              "p2p_send",
              "external_send",
              "escrow_create",
              "escrow_release",
              "funding",
              "off_ramp",
              "receive"
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          },
          "sandbox_scenario": {
            "type": "string",
            "enum": [
              "allow",
              "review",
              "block"
            ]
          }
        }
      },
      "Payment": {
        "type": "object",
        "required": [
          "id",
          "tenant_id",
          "status",
          "status_canonical",
          "channel",
          "chain_id",
          "chain",
          "tx_ref",
          "from_wallet_id",
          "from_wallet_address",
          "from_account_holder_id",
          "to_account_holder_id",
          "open_compliance_case_id",
          "to_wallet_id",
          "to_address",
          "token_deployment_id",
          "token_symbol",
          "gross_amount",
          "net_amount",
          "fee_snapshot",
          "fee_schedule_ref",
          "memo",
          "display_type",
          "failure_reason_code",
          "failure_reason_detail",
          "is_retryable",
          "idempotency_key",
          "correlation_id",
          "created_at",
          "finalized_at",
          "signing_expires_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PaymentId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "chain_id": {
            "type": "string",
            "deprecated": true
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "tx_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "from_wallet_id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "from_wallet_address": {
            "type": "string"
          },
          "to_account_holder_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AccountHolderId"
              },
              {
                "type": "null"
              }
            ]
          },
          "open_compliance_case_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ComplianceCaseId"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_account_holder_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AccountHolderId"
              },
              {
                "type": "null"
              }
            ]
          },
          "to_address": {
            "type": "string"
          },
          "to_wallet_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WalletId"
              },
              {
                "type": "null"
              }
            ]
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "token_symbol": {
            "type": "string"
          },
          "gross_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "net_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "fee_snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "beneficiary": {
                  "type": "string"
                },
                "basis": {
                  "type": "string"
                },
                "rate": {
                  "$ref": "#/components/schemas/Money"
                },
                "computed_amount": {
                  "$ref": "#/components/schemas/Money"
                }
              }
            }
          },
          "fee_schedule_ref": {
            "type": "object",
            "properties": {
              "schedule_id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "type": "integer"
              }
            }
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_type": {
            "type": "string",
            "enum": [
              "p2p_send",
              "external_send",
              "escrow_create",
              "escrow_release",
              "funding",
              "off_ramp",
              "receive"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_quote",
              "pending_compliance",
              "pending_approval",
              "pending_confirm",
              "pending_sign",
              "submission_pending",
              "submission_unknown",
              "on_chain_pending",
              "confirmed",
              "reorg_detected",
              "blocked",
              "failed",
              "cancelled"
            ]
          },
          "status_canonical": {
            "$ref": "#/components/schemas/StatusCanonical"
          },
          "failure_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason_detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_retryable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "idempotency_key": {
            "type": "string"
          },
          "correlation_id": {
            "$ref": "#/components/schemas/CorrelationId"
          },
          "signing_expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "finalized_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentEventList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentEvent"
            }
          }
        }
      },
      "EscrowList": {
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Escrow"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "EscrowCreate": {
        "type": "object",
        "required": [
          "recipient_ref",
          "token_deployment_id",
          "sender_wallet_id",
          "amount",
          "ttl_seconds"
        ],
        "properties": {
          "recipient_ref": {
            "type": "string",
            "minLength": 3,
            "maxLength": 320
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "chain_ref": {
            "type": "string",
            "maxLength": 32
          },
          "sender_wallet_id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]+(\\.[0-9]{1,18})?$"
          },
          "ttl_seconds": {
            "type": "integer",
            "minimum": 3600,
            "maximum": 7776000
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "EscrowCreateResponse": {
        "type": "object",
        "required": [
          "escrow",
          "claim_token",
          "claim_url",
          "claim_token_expires_at"
        ],
        "properties": {
          "escrow": {
            "$ref": "#/components/schemas/Escrow"
          },
          "claim_token": {
            "type": "string"
          },
          "claim_url": {
            "type": "string",
            "format": "uri"
          },
          "claim_url_short": {
            "type": [
              "string",
              "null"
            ]
          },
          "claim_token_expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "signing_expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Escrow": {
        "type": "object",
        "required": [
          "id",
          "fingerprint",
          "amount",
          "token_deployment_id",
          "chain",
          "sender_wallet_id",
          "recipient_ref",
          "state",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/EscrowId"
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "fingerprint": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "token_symbol": {
            "type": "string"
          },
          "sender_wallet_id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "recipient_ref": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending_approval",
              "pending",
              "claimed",
              "cancelled",
              "expired"
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "on_chain_payment_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "create_tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "release_tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "fee_accruals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscrowFeeAccrual"
            }
          },
          "net_amount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "claimed_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "EscrowEventList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscrowEvent"
            }
          }
        }
      },
      "EscrowCancelInit": {
        "type": "object",
        "required": [
          "escrow_id",
          "action",
          "action_expires_at"
        ],
        "properties": {
          "escrow_id": {
            "$ref": "#/components/schemas/EscrowId"
          },
          "action": {
            "type": "string",
            "enum": [
              "cancel"
            ]
          },
          "action_expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "TransactionList": {
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "PaymentRequestList": {
        "type": "object",
        "required": [
          "data",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRequest"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "PaymentRequestCreate": {
        "type": "object",
        "required": [
          "payer",
          "amount",
          "token_deployment_id"
        ],
        "properties": {
          "payer": {
            "type": "object",
            "properties": {
              "account_holder_id": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AccountHolderId"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          }
        }
      },
      "PaymentRequest": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PaymentRequestId"
          },
          "requester_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "payer_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AccountHolderId"
              },
              {
                "type": "null"
              }
            ]
          },
          "payer_lookup": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          },
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "declined",
              "expired",
              "cancelled"
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "spawned_txn_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentId"
              },
              {
                "type": "null"
              }
            ]
          },
          "decline_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "WalletId": {
        "type": "string",
        "pattern": "^wlt_[0-9A-Za-z]{22}$",
        "example": "wlt_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ReceiveQrRequest": {
        "type": "object",
        "properties": {
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_request_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentRequestId"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ReceiveQr": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string"
          },
          "png_data_url": {
            "type": "string"
          }
        }
      },
      "AccountHolderList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CursorPage"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AccountHolder"
                }
              }
            }
          }
        ]
      },
      "AccountHolderCreate": {
        "type": "object",
        "properties": {
          "tier": {
            "type": "string",
            "enum": [
              "tier_1",
              "tier_2"
            ]
          },
          "cip_payload": {
            "type": "object",
            "properties": {
              "name_hash": {
                "type": "string"
              },
              "dob_hash": {
                "type": "string"
              },
              "id_hash": {
                "type": "string"
              },
              "address_hash": {
                "type": "string"
              }
            }
          }
        }
      },
      "AccountHolder": {
        "type": "object",
        "required": [
          "id",
          "state",
          "tier",
          "first_use_completed",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "held",
              "closed",
              "closed_uncooperative",
              "provisioning_failed"
            ]
          },
          "state_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "state_changed_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "tier_1",
              "tier_2"
            ]
          },
          "tier_2_uplift_status": {
            "type": "string",
            "enum": [
              "not_requested",
              "pending",
              "passed",
              "failed"
            ]
          },
          "first_use_completed": {
            "type": "boolean"
          },
          "cip_payload": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "name_hash": {
                    "type": "string"
                  },
                  "dob_hash": {
                    "type": "string"
                  },
                  "id_hash": {
                    "type": "string"
                  },
                  "address_hash": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "cip_accepted_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "merchant_role_state": {
            "type": "string",
            "enum": [
              "none",
              "pending_review",
              "approved",
              "rejected",
              "revoked"
            ]
          },
          "auto_save_contacts": {
            "type": "boolean"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "MemberProductEnrollment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "product",
          "status",
          "terms_version",
          "accepted_at",
          "credit"
        ],
        "properties": {
          "product": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,63}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "not_opened",
              "setup_required",
              "opening",
              "active",
              "requires_review"
            ]
          },
          "terms_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "accepted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "credit": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false,
            "required": [
              "amount",
              "token_deployment_id",
              "token_address",
              "token_symbol",
              "chain",
              "status",
              "transaction_hash"
            ],
            "properties": {
              "amount": {
                "type": "string"
              },
              "token_deployment_id": {
                "type": "string",
                "format": "uuid"
              },
              "token_address": {
                "type": "string"
              },
              "token_symbol": {
                "type": "string"
              },
              "chain": {
                "$ref": "#/components/schemas/ChainDescriptor"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "submitted",
                  "settled",
                  "requires_review"
                ]
              },
              "transaction_hash": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "WalletAdmissionBootstrap": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "strategy",
          "payload",
          "client_id",
          "project_id",
          "external_user_id",
          "expires_at"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "enum": [
              "auth_endpoint"
            ]
          },
          "payload": {
            "type": "string",
            "minLength": 47,
            "maxLength": 47
          },
          "client_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "external_user_id": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "expected_address": {
            "type": "string"
          }
        }
      },
      "CuPayoutAccountRef": {
        "type": "object",
        "required": [
          "routing_number",
          "account_number",
          "account_holder_name"
        ],
        "properties": {
          "routing_number": {
            "type": "string"
          },
          "account_number": {
            "type": "string"
          },
          "account_holder_name": {
            "type": "string"
          }
        }
      },
      "AccountHolderSelfBankBalance": {
        "type": "object",
        "required": [
          "currency",
          "available_balance",
          "current_balance",
          "as_of"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "available_balance": {
            "$ref": "#/components/schemas/Money"
          },
          "current_balance": {
            "$ref": "#/components/schemas/Money"
          },
          "as_of": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "AccountHolderSelfBalance": {
        "type": "object",
        "required": [
          "balances"
        ],
        "properties": {
          "balances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountHolderSelfBalanceEntry"
            }
          }
        }
      },
      "MemberPaymentRecovery": {
        "type": "object",
        "required": [
          "payment",
          "state",
          "can_continue",
          "can_cancel"
        ],
        "properties": {
          "payment": {
            "$ref": "#/components/schemas/Payment"
          },
          "state": {
            "type": "string",
            "enum": [
              "awaiting_approval",
              "approval_expired",
              "on_hold",
              "processing",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "can_continue": {
            "type": "boolean"
          },
          "can_cancel": {
            "type": "boolean"
          }
        }
      },
      "AccountHolderSelfTransactionList": {
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountHolderSelfTransaction"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "AccountHolderConsentState": {
        "type": "object",
        "required": [
          "account_holder_id",
          "current_policies",
          "accepted",
          "missing_consents",
          "consents_current",
          "first_use_completed"
        ],
        "properties": {
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "current_policies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrentPolicy"
            }
          },
          "accepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Consent"
            }
          },
          "missing_consents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingConsent"
            }
          },
          "consents_current": {
            "type": "boolean"
          },
          "first_use_completed": {
            "type": "boolean"
          }
        }
      },
      "ConsentAcceptRequest": {
        "type": "object",
        "required": [
          "accepted"
        ],
        "properties": {
          "accepted": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ConsentAccept"
            }
          }
        }
      },
      "DataExport": {
        "type": "object",
        "required": [
          "id",
          "account_holder_id",
          "state",
          "signed_url",
          "url_expires_at",
          "requested_at",
          "started_at",
          "completed_at",
          "failure_reason"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/DataExportId"
          },
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "expired",
              "failed"
            ]
          },
          "signed_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "url_expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "requested_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "started_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AccountHolderAvatarUploadUrl": {
        "type": "object",
        "required": [
          "content_type",
          "content_length"
        ],
        "properties": {
          "content_type": {
            "type": "string",
            "example": "image/png"
          },
          "content_length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5242880
          }
        }
      },
      "AccountHolderAvatarUploadUrlResponse": {
        "type": "object",
        "required": [
          "upload_url",
          "object_key",
          "expires_at"
        ],
        "properties": {
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "object_key": {
            "type": "string"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "AccountHolderAvatarConfirm": {
        "type": "object",
        "required": [
          "object_key"
        ],
        "properties": {
          "object_key": {
            "type": "string"
          }
        }
      },
      "AccountHolderAvatarUrl": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "TokenAuthorityList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenAuthority"
            }
          }
        }
      },
      "RegisterAuthorityRequest": {
        "type": "object",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "server_key",
              "safe"
            ]
          },
          "purpose": {
            "type": "string",
            "enum": [
              "operator",
              "service_account"
            ],
            "default": "operator"
          },
          "label": {
            "type": "string",
            "maxLength": 120
          },
          "address": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "safeRef": {
            "type": "string",
            "pattern": "^(msf_[0-9A-Za-z]{22}|vlt_[0-9A-Za-z]{22}|0x[a-fA-F0-9]{40})$",
            "example": "msf_1A2b3C4d5E6f7G8h9I0jK1"
          }
        }
      },
      "TokenAuthority": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "purpose",
          "safe_purpose",
          "managed_safe_state",
          "address",
          "label",
          "managed_safe_id",
          "treasury_wallet_id",
          "verified_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          },
          "kind": {
            "type": "string",
            "enum": [
              "server_key",
              "safe"
            ]
          },
          "purpose": {
            "type": "string",
            "enum": [
              "operator",
              "service_account"
            ]
          },
          "safe_purpose": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "fund_vault",
                  "token_control",
                  "multi_purpose"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "managed_safe_state": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "deploying",
                  "active",
                  "decommissioned"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "managed_safe_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ManagedSafeId"
              },
              {
                "type": "null"
              }
            ]
          },
          "treasury_wallet_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TreasuryWalletId"
              },
              {
                "type": "null"
              }
            ]
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "CreateControlSafeRequest": {
        "type": "object",
        "required": [
          "chain_id",
          "name",
          "signer_staff_ids",
          "threshold"
        ],
        "properties": {
          "chain_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "signer_staff_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/StaffId"
            }
          },
          "threshold": {
            "type": "integer",
            "minimum": 1
          },
          "acknowledged_unsafe": {
            "type": "boolean"
          }
        }
      },
      "TokenAuthorityId": {
        "type": "string",
        "pattern": "^tka_[0-9A-Za-z]{22}$",
        "example": "tka_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "TokenAuthorityDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TokenAuthority"
          },
          {
            "type": "object",
            "required": [
              "roles"
            ],
            "properties": {
              "roles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuthorityRoleAssignment"
                }
              }
            }
          }
        ]
      },
      "AuthorityProofChallengeResponse": {
        "type": "object",
        "required": [
          "authority_id",
          "challenge",
          "message",
          "expires_at"
        ],
        "properties": {
          "authority_id": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          },
          "challenge": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "SubmitAuthorityProofRequest": {
        "type": "object",
        "required": [
          "challenge",
          "signature"
        ],
        "properties": {
          "challenge": {
            "type": "string",
            "maxLength": 4096
          },
          "signature": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{130}$"
          }
        }
      },
      "CustomerTokenList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerToken"
            }
          }
        }
      },
      "CustomerToken": {
        "type": "object",
        "required": [
          "id",
          "standard",
          "symbol",
          "name",
          "decimals",
          "status",
          "chain_id",
          "chain",
          "token_proxy_address",
          "access_registry_proxy_address",
          "access_control",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "standard": {
            "type": "string",
            "enum": [
              "erc20",
              "erc721",
              "erc1155"
            ]
          },
          "symbol": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "decimals": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_deploy",
              "awaiting_admin_setup",
              "active",
              "paused",
              "deprecated",
              "failed_resumable",
              "failed_terminal"
            ]
          },
          "chain_id": {
            "type": "string",
            "format": "uuid",
            "deprecated": true
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "token_proxy_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "access_registry_proxy_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "access_control": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "allowlist",
              "denylist",
              null
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "ExplorableContractsResponse": {
        "type": "object",
        "required": [
          "customer_token_id",
          "contracts"
        ],
        "properties": {
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "contracts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExplorableContract"
            }
          }
        }
      },
      "ContractReadResponse": {
        "type": "object",
        "required": [
          "customer_token_id",
          "contract",
          "address",
          "function",
          "result"
        ],
        "properties": {
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "contract": {
            "type": "string",
            "enum": [
              "token",
              "access_registry",
              "roles_modifier"
            ]
          },
          "address": {
            "type": "string",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "function": {
            "type": "string",
            "example": "balanceOf"
          },
          "result": {
            "type": [
              "string",
              "number",
              "boolean",
              "array",
              "object",
              "null"
            ],
            "items": {},
            "additionalProperties": true
          }
        }
      },
      "ProvenanceVerifyResponse": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "unanchored",
              "chain_broken",
              "head_mismatch",
              "signature_invalid",
              "signer_unreachable",
              null
            ]
          },
          "checkpoint_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "version_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "recovered_signer": {
            "type": [
              "string",
              "null"
            ]
          },
          "trusted_signer": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LogSthResponse": {
        "type": "object",
        "required": [
          "tree_size",
          "root_hash",
          "timestamp_ms",
          "eip712_chain_id",
          "signature",
          "signer_address",
          "signed_at"
        ],
        "properties": {
          "tree_size": {
            "type": "integer"
          },
          "root_hash": {
            "type": "string"
          },
          "timestamp_ms": {
            "type": "integer",
            "format": "int64"
          },
          "eip712_chain_id": {
            "type": "integer"
          },
          "signature": {
            "type": "string"
          },
          "signer_address": {
            "type": "string"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LogInclusionResponse": {
        "type": "object",
        "required": [
          "leaf_data",
          "leaf_index",
          "tree_size",
          "proof",
          "root"
        ],
        "properties": {
          "leaf_data": {
            "type": "string"
          },
          "leaf_index": {
            "type": "integer"
          },
          "tree_size": {
            "type": "integer"
          },
          "proof": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "root": {
            "type": "string"
          }
        }
      },
      "LogConsistencyResponse": {
        "type": "object",
        "required": [
          "first",
          "second",
          "proof",
          "first_root",
          "second_root"
        ],
        "properties": {
          "first": {
            "type": "integer"
          },
          "second": {
            "type": "integer"
          },
          "proof": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "first_root": {
            "type": "string"
          },
          "second_root": {
            "type": "string"
          }
        }
      },
      "DocumentUploadUrlResponse": {
        "type": "object",
        "required": [
          "upload_url",
          "object_key",
          "expires_at"
        ],
        "properties": {
          "upload_url": {
            "type": "string"
          },
          "object_key": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DocumentResponse": {
        "type": "object",
        "required": [
          "id",
          "field_path",
          "visibility",
          "content_hash",
          "content_type",
          "byte_size",
          "uploaded_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "field_path": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "gated"
            ]
          },
          "content_hash": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "byte_size": {
            "type": "integer"
          },
          "uploaded_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DocumentAccessResponse": {
        "type": "object",
        "required": [
          "id",
          "visibility",
          "content_hash",
          "url",
          "url_expires_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "gated"
            ]
          },
          "content_hash": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "url_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RwaTokenMetadata": {
        "type": "object",
        "required": [
          "name",
          "attributes"
        ],
        "additionalProperties": true,
        "properties": {
          "name": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "trait_type",
                "value"
              ],
              "properties": {
                "trait_type": {
                  "type": "string"
                },
                "value": {},
                "display_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "RwaContractMetadata": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_link": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CapTableSummaryResponse": {
        "type": "object",
        "required": [
          "standard",
          "total_supply",
          "holder_count",
          "as_of_block",
          "rebuilt_at"
        ],
        "properties": {
          "standard": {
            "type": "string",
            "enum": [
              "erc20",
              "erc721",
              "erc1155"
            ]
          },
          "total_supply": {
            "type": "string"
          },
          "holder_count": {
            "type": "integer"
          },
          "as_of_block": {
            "type": [
              "string",
              "null"
            ]
          },
          "rebuilt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CapTableHoldersResponse": {
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapTableHolder"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "CapTableInstancesResponse": {
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapTableInstance"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "CreateDistributionRequest": {
        "type": "object",
        "required": [
          "kind",
          "payout_token_address",
          "total_amount_raw"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "dividend",
              "interest",
              "redemption_proceeds",
              "royalty",
              "capital_return"
            ]
          },
          "payout_token_address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "total_amount_raw": {
            "type": "string",
            "pattern": "^[1-9][0-9]*$"
          }
        }
      },
      "RwaDistributionResponse": {
        "type": "object",
        "required": [
          "id",
          "customer_token_id",
          "kind",
          "state",
          "snapshot_block",
          "payout_token_address",
          "total_amount_raw",
          "per_unit_basis",
          "treasury_transfer_id",
          "payout_count",
          "payouts",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/RwaDistributionId"
          },
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "kind": {
            "type": "string",
            "enum": [
              "dividend",
              "interest",
              "redemption_proceeds",
              "royalty",
              "capital_return"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "draft",
              "snapshotting",
              "funding",
              "paying",
              "completed",
              "failed"
            ]
          },
          "snapshot_block": {
            "type": "string"
          },
          "payout_token_address": {
            "type": "string"
          },
          "total_amount_raw": {
            "type": "string"
          },
          "per_unit_basis": {
            "type": "string"
          },
          "treasury_transfer_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TreasuryTransferId"
              },
              {
                "type": "null"
              }
            ]
          },
          "payout_count": {
            "type": "integer"
          },
          "payouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DistributionPayout"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RwaDistributionId": {
        "type": "string",
        "pattern": "^dist_[0-9A-Za-z]{22}$",
        "example": "dist_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ExecuteDistributionRequest": {
        "type": "object",
        "required": [
          "treasury_wallet_id"
        ],
        "properties": {
          "treasury_wallet_id": {
            "$ref": "#/components/schemas/TreasuryWalletId"
          }
        }
      },
      "DeployErc20Request": {
        "type": "object",
        "required": [
          "chain_id",
          "name",
          "symbol",
          "decimals",
          "adminSafeAddress"
        ],
        "properties": {
          "chain_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "Acme Points"
          },
          "symbol": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,11}$",
            "example": "ACME"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 18,
            "example": 18
          },
          "adminSafeAddress": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x1111111111111111111111111111111111111111"
          },
          "accessControl": {
            "type": "string",
            "enum": [
              "allowlist",
              "denylist"
            ],
            "example": "denylist"
          }
        }
      },
      "DeployErc20Response": {
        "type": "object",
        "required": [
          "operation_id",
          "customer_token_id",
          "status",
          "token_proxy_address"
        ],
        "properties": {
          "operation_id": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          },
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "status": {
            "type": "string",
            "example": "pending_deploy"
          },
          "token_proxy_address": {
            "type": "string",
            "example": ""
          }
        }
      },
      "DeployErc721Request": {
        "type": "object",
        "required": [
          "chain_id",
          "name",
          "symbol",
          "adminSafeAddress"
        ],
        "properties": {
          "chain_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "Acme Deeds"
          },
          "symbol": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,11}$",
            "example": "DEED"
          },
          "adminSafeAddress": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x1111111111111111111111111111111111111111"
          },
          "accessControl": {
            "type": "string",
            "enum": [
              "allowlist",
              "denylist"
            ],
            "example": "allowlist"
          }
        }
      },
      "DeployErc1155Request": {
        "type": "object",
        "required": [
          "chain_id",
          "name",
          "symbol",
          "adminSafeAddress"
        ],
        "properties": {
          "chain_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "Acme Fractions"
          },
          "symbol": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,11}$",
            "example": "FRAC"
          },
          "adminSafeAddress": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x1111111111111111111111111111111111111111"
          },
          "accessControl": {
            "type": "string",
            "enum": [
              "allowlist",
              "denylist"
            ],
            "example": "allowlist"
          }
        }
      },
      "MintTokenRequest": {
        "type": "object",
        "required": [
          "to"
        ],
        "properties": {
          "to": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "1000000"
          },
          "tokenId": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "7"
          },
          "tokenUri": {
            "type": "string",
            "maxLength": 2048,
            "example": "ipfs://bafy.../7.json"
          },
          "tokenIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,78}$"
            },
            "example": [
              "2",
              "3"
            ]
          },
          "amounts": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,78}$"
            },
            "example": [
              "5",
              "7"
            ]
          },
          "tokenUris": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "MintTokenResponse": {
        "type": "object",
        "required": [
          "operation_id",
          "safe_tx_hash",
          "typed_data",
          "status"
        ],
        "properties": {
          "operation_id": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          },
          "safe_tx_hash": {
            "type": "string"
          },
          "typed_data": {
            "$ref": "#/components/schemas/SafeEip712TypedData"
          },
          "status": {
            "$ref": "#/components/schemas/TokenizationOperationStatus"
          }
        }
      },
      "BurnTokenRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "1000000"
          },
          "tokenId": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "7"
          },
          "tokenIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,78}$"
            },
            "example": [
              "2",
              "3"
            ]
          },
          "amounts": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,78}$"
            },
            "example": [
              "5",
              "7"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "RecoverTokenRequest": {
        "type": "object",
        "required": [
          "account",
          "amount"
        ],
        "properties": {
          "account": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "1000000"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "RoleAssignmentRequest": {
        "type": "object",
        "required": [
          "role",
          "account"
        ],
        "properties": {
          "role": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]{2,63}$",
            "example": "MINTER_ROLE"
          },
          "account": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "EnableAccessRegistryRequest": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "allowlist",
              "denylist"
            ],
            "example": "allowlist"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "EnableAccessRegistryResponse": {
        "type": "object",
        "required": [
          "operation_id",
          "customer_token_id",
          "access_control",
          "status"
        ],
        "properties": {
          "operation_id": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          },
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "access_control": {
            "type": "string",
            "enum": [
              "allowlist",
              "denylist"
            ]
          },
          "status": {
            "type": "string",
            "example": "relayed"
          }
        }
      },
      "DisableAccessRegistryRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "AccessListMutationRequest": {
        "type": "object",
        "required": [
          "addresses"
        ],
        "properties": {
          "addresses": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$"
            },
            "example": [
              "0x91De3939ffe81F121Dc192ef1419d353100822bB"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "TreasuryEligibilityResponse": {
        "type": "object",
        "required": [
          "customer_token_id",
          "treasury_enabled",
          "is_stable"
        ],
        "properties": {
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "treasury_enabled": {
            "type": "boolean"
          },
          "is_stable": {
            "type": "boolean"
          }
        }
      },
      "TreasuryEnableRequest": {
        "type": "object",
        "properties": {
          "is_stable": {
            "type": "boolean"
          }
        }
      },
      "PauseTokenRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "RawSafeTxRequest": {
        "type": "object",
        "required": [
          "contract",
          "function"
        ],
        "properties": {
          "contract": {
            "type": "string",
            "enum": [
              "token",
              "access_registry",
              "roles_modifier"
            ],
            "example": "token"
          },
          "function": {
            "type": "string",
            "pattern": "^[A-Za-z_$][A-Za-z0-9_$]{0,63}$",
            "example": "contractUriUpdate"
          },
          "args": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "type": "string"
            },
            "example": [
              "ipfs://Qm…/contract.json"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "SetMintPolicyRequest": {
        "type": "object",
        "required": [
          "authorityId",
          "functionName",
          "amountCapRaw"
        ],
        "properties": {
          "authorityId": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          },
          "functionName": {
            "type": "string",
            "enum": [
              "mint"
            ]
          },
          "amountCapRaw": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "1000000000"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "RevokeMintPolicyRequest": {
        "type": "object",
        "required": [
          "authorityId"
        ],
        "properties": {
          "authorityId": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "PolicyMintRequest": {
        "type": "object",
        "required": [
          "authorityId",
          "to",
          "amount"
        ],
        "properties": {
          "authorityId": {
            "$ref": "#/components/schemas/TokenAuthorityId"
          },
          "to": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "1000000"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "PolicyMintBuildResponse": {
        "type": "object",
        "required": [
          "operation_id",
          "module_tx_hash",
          "module_typed_data",
          "status"
        ],
        "properties": {
          "operation_id": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          },
          "module_tx_hash": {
            "type": "string"
          },
          "module_typed_data": {
            "$ref": "#/components/schemas/ModuleTxEip712TypedData"
          },
          "status": {
            "$ref": "#/components/schemas/TokenizationOperationStatus"
          }
        }
      },
      "TokenizationOperationId": {
        "type": "string",
        "pattern": "^tkop_[0-9A-Za-z]{22}$",
        "example": "tkop_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "SubmitModuleSignatureRequest": {
        "type": "object",
        "required": [
          "signature"
        ],
        "properties": {
          "signature": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{130}$"
          }
        }
      },
      "TokenizationOperation": {
        "type": "object",
        "required": [
          "id",
          "customer_token_id",
          "chain",
          "kind",
          "status",
          "to",
          "amount",
          "role",
          "account",
          "addresses",
          "access_registry_proxy_address",
          "safe_tx_hash",
          "threshold",
          "signatures",
          "threshold_met",
          "tx_hash",
          "typed_data",
          "authority_id",
          "amount_cap_raw",
          "function_name",
          "module_typed_data",
          "module_tx_hash",
          "forward_request_typed_data",
          "from",
          "raw_contract",
          "raw_function",
          "raw_args",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          },
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "kind": {
            "type": "string",
            "enum": [
              "mint",
              "burn",
              "recover",
              "grant_role",
              "revoke_role",
              "set_policy",
              "set_mint_policy",
              "access_list_add",
              "access_list_remove",
              "policy_mint",
              "gasless_relay",
              "pause",
              "unpause",
              "raw_safe_tx"
            ],
            "example": "mint"
          },
          "status": {
            "$ref": "#/components/schemas/TokenizationOperationStatus"
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "account": {
            "type": [
              "string",
              "null"
            ]
          },
          "addresses": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "access_registry_proxy_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "safe_tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "threshold": {
            "type": "integer"
          },
          "signatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenizationOperationSignature"
            }
          },
          "threshold_met": {
            "type": "boolean"
          },
          "tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "typed_data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SafeEip712TypedData"
              },
              {
                "type": "null"
              }
            ]
          },
          "authority_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenAuthorityId"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount_cap_raw": {
            "type": [
              "string",
              "null"
            ]
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "module_typed_data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModuleTxEip712TypedData"
              },
              {
                "type": "null"
              }
            ]
          },
          "module_tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "forward_request_typed_data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ForwardRequestEip712TypedData"
              },
              {
                "type": "null"
              }
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "raw_contract": {
            "type": [
              "string",
              "null"
            ]
          },
          "raw_function": {
            "type": [
              "string",
              "null"
            ]
          },
          "raw_args": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GaslessTransferRequest": {
        "type": "object",
        "required": [
          "from",
          "to",
          "amount"
        ],
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "to": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0xa7DA7ceB2a3286Da8bea63c43dB1D19da9109b28"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$",
            "example": "1000000"
          },
          "idempotencyKey": {
            "type": "string"
          }
        }
      },
      "GaslessTransferRequestBuildResponse": {
        "type": "object",
        "required": [
          "operation_id",
          "forward_request_typed_data",
          "status"
        ],
        "properties": {
          "operation_id": {
            "$ref": "#/components/schemas/TokenizationOperationId"
          },
          "forward_request_typed_data": {
            "$ref": "#/components/schemas/ForwardRequestEip712TypedData"
          },
          "status": {
            "$ref": "#/components/schemas/TokenizationOperationStatus"
          }
        }
      },
      "GaslessRelayRequest": {
        "type": "object",
        "required": [
          "forwardRequest",
          "signature"
        ],
        "properties": {
          "forwardRequest": {
            "$ref": "#/components/schemas/ForwardRequestBody"
          },
          "signature": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{130}$"
          }
        }
      },
      "DeprecateTokenResponse": {
        "type": "object",
        "required": [
          "customer_token_id",
          "status"
        ],
        "properties": {
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "status": {
            "type": "string",
            "enum": [
              "deprecated"
            ],
            "example": "deprecated"
          }
        }
      },
      "TokenizationOperationList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenizationOperation"
            }
          }
        }
      },
      "SubmitMintSignatureRequest": {
        "type": "object",
        "required": [
          "signer",
          "signature"
        ],
        "properties": {
          "signer": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "example": "0xa7DA7ceB2a3286Da8bea63c43dB1D19da9109b28"
          },
          "signature": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{130}$"
          }
        }
      },
      "FeeScheduleList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CursorPage"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FeeSchedule"
                }
              }
            }
          }
        ]
      },
      "FeeScheduleProposal": {
        "type": "object",
        "required": [
          "rules"
        ],
        "properties": {
          "rules": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "beneficiary",
                "applies_to_tx_types",
                "basis",
                "value"
              ],
              "properties": {
                "beneficiary": {
                  "type": "string",
                  "enum": [
                    "institution",
                    "custody_provider",
                    "screening_provider",
                    "issuer",
                    "integrator",
                    "external"
                  ]
                },
                "beneficiary_address": {
                  "type": "string",
                  "pattern": "^0x[0-9a-fA-F]{40}$"
                },
                "label": {
                  "type": "string",
                  "maxLength": 80
                },
                "applies_to_tx_types": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "$ref": "#/components/schemas/FeeScheduleTxType"
                  }
                },
                "basis": {
                  "type": "string",
                  "enum": [
                    "flat",
                    "bps",
                    "percent"
                  ]
                },
                "value": {
                  "$ref": "#/components/schemas/Money"
                },
                "min_amount": {
                  "$ref": "#/components/schemas/Money"
                },
                "max_amount": {
                  "$ref": "#/components/schemas/Money"
                }
              }
            }
          }
        }
      },
      "FeeSchedule": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/FeeScheduleId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "committed",
              "superseded"
            ]
          },
          "effective_from": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_to": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeRule"
            }
          },
          "committed_by_staff_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StaffId"
              },
              {
                "type": "null"
              }
            ]
          },
          "committed_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "FeeRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "applies_to_tx_types": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/FeeScheduleTxType"
            }
          },
          "beneficiary": {
            "type": "string",
            "enum": [
              "institution",
              "xkova",
              "custody_provider",
              "screening_provider",
              "issuer",
              "integrator",
              "external"
            ]
          },
          "label": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "beneficiary_address": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "basis": {
            "type": "string",
            "enum": [
              "flat",
              "bps",
              "percent"
            ]
          },
          "value": {
            "$ref": "#/components/schemas/Money"
          },
          "min_amount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_amount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Chain": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "chain_ref",
          "name",
          "status",
          "is_testnet",
          "native_symbol"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "evm",
              "svm",
              "utxo",
              "xrpl"
            ]
          },
          "chain_ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "ready",
              "deferred"
            ]
          },
          "is_testnet": {
            "type": "boolean"
          },
          "native_symbol": {
            "type": "string"
          }
        }
      },
      "MemberAuthHostedAuthorizationStartRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "origin",
          "redirect_uri",
          "state",
          "code_challenge",
          "code_challenge_method"
        ],
        "properties": {
          "origin": {
            "type": "string",
            "minLength": 8,
            "maxLength": 512
          },
          "redirect_uri": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 2048
          },
          "state": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge_method": {
            "type": "string",
            "enum": [
              "S256"
            ]
          }
        }
      },
      "MemberAuthHostedAuthorizationStart": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "authorization_url",
          "hosted_origin",
          "expires_at"
        ],
        "properties": {
          "hosted_origin": {
            "type": "string",
            "format": "uri"
          },
          "authorization_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "MemberAuthHostedAuthorizationExchange": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "attempt_id",
          "code",
          "code_verifier",
          "redirect_uri"
        ],
        "properties": {
          "attempt_id": {
            "$ref": "#/components/schemas/MemberAuthOperationAttemptToken"
          },
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_verifier": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._~-]{43,128}$"
          },
          "redirect_uri": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 2048
          }
        }
      },
      "MemberAuthSessionMaterial": {
        "type": "object",
        "required": [
          "session_id",
          "refresh_token",
          "expires_in",
          "member"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "refresh_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer",
            "minimum": 0
          },
          "member": {
            "$ref": "#/components/schemas/MemberAuthSummary"
          }
        }
      },
      "MemberActionStartRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource_type",
          "resource_id",
          "action",
          "origin",
          "return_uri",
          "state",
          "code_challenge",
          "code_challenge_method"
        ],
        "properties": {
          "resource_type": {
            "$ref": "#/components/schemas/MemberActionResourceType"
          },
          "resource_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "action": {
            "$ref": "#/components/schemas/MemberActionName"
          },
          "origin": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 512
          },
          "return_uri": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 2048
          },
          "state": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge_method": {
            "type": "string",
            "enum": [
              "S256"
            ]
          }
        }
      },
      "MemberActionAuthorizationStart": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/MemberActionHostedAuthorizationStart"
          },
          {
            "$ref": "#/components/schemas/MemberActionExternalAuthorizationStart"
          }
        ],
        "discriminator": {
          "propertyName": "authorization_method"
        }
      },
      "MemberActionExternalCompletionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "action_token",
          "provider_proof"
        ],
        "properties": {
          "action_token": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "provider_proof": {
            "type": "string",
            "minLength": 20,
            "maxLength": 32768
          }
        }
      },
      "MemberActionCompletion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "signing_exchange_code",
          "signing_url",
          "expires_at"
        ],
        "properties": {
          "signing_exchange_code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "signing_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "AccountCenterHandoffStartRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "intent",
          "origin",
          "return_uri",
          "state",
          "code_challenge",
          "code_challenge_method"
        ],
        "properties": {
          "intent": {
            "$ref": "#/components/schemas/AccountCenterIntent"
          },
          "origin": {
            "type": "string",
            "minLength": 8,
            "maxLength": 512
          },
          "return_uri": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 2048
          },
          "state": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge_method": {
            "type": "string",
            "enum": [
              "S256"
            ]
          }
        }
      },
      "AccountCenterHandoffStart": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "handoff_url",
          "hosted_origin",
          "expires_at"
        ],
        "properties": {
          "handoff_url": {
            "type": "string",
            "format": "uri"
          },
          "hosted_origin": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "AccountCenterHandoffExchange": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "attempt_id",
          "code",
          "code_verifier",
          "return_uri"
        ],
        "properties": {
          "attempt_id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_verifier": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._~-]{43,128}$"
          },
          "return_uri": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 2048
          }
        }
      },
      "AccountCenterHandoffCompletion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "intent"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "completed"
            ]
          },
          "intent": {
            "$ref": "#/components/schemas/AccountCenterIntent"
          },
          "signing_exchange_code": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "signing_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "MemberAuthProofChallengeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "origin",
          "redirect_uri"
        ],
        "properties": {
          "origin": {
            "type": "string",
            "minLength": 8,
            "maxLength": 512
          },
          "redirect_uri": {
            "type": "string",
            "format": "uri",
            "minLength": 8,
            "maxLength": 2048
          }
        }
      },
      "MemberAuthProofChallenge": {
        "type": "object",
        "required": [
          "nonce",
          "expires_at"
        ],
        "properties": {
          "nonce": {
            "type": "string"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "MemberAuthProofExchange": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "attempt_id",
          "proof_token"
        ],
        "properties": {
          "attempt_id": {
            "$ref": "#/components/schemas/MemberAuthOperationAttemptToken"
          },
          "proof_token": {
            "type": "string",
            "minLength": 20,
            "maxLength": 8192
          }
        }
      },
      "MemberAuthRefresh": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "attempt_id",
          "refresh_token"
        ],
        "properties": {
          "attempt_id": {
            "$ref": "#/components/schemas/MemberAuthOperationAttemptToken"
          },
          "refresh_token": {
            "type": "string",
            "minLength": 8,
            "maxLength": 512
          }
        }
      },
      "MemberAuthSignOut": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "session",
              "global"
            ],
            "default": "session"
          }
        }
      },
      "MemberAuthSessionInfo": {
        "type": "object",
        "required": [
          "session_id",
          "account_holder_id",
          "provider_subject",
          "expires_at",
          "action_readiness"
        ],
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "provider_subject": {
            "type": "string"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "action_readiness": {
            "$ref": "#/components/schemas/MemberActionReadiness"
          }
        }
      },
      "MemberAuthApplicationSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "workspace_id",
          "api_key_id",
          "api_key_name",
          "api_key_prefix",
          "publishable_key",
          "name",
          "provider_kind",
          "enrollment_mode",
          "is_default",
          "status",
          "config_version",
          "session_policy_version",
          "max_auth_age_seconds",
          "required_acr_values",
          "action_authorization_enabled",
          "action_max_auth_age_seconds",
          "action_required_acr_values",
          "action_required_amr_values",
          "action_policy_version",
          "origins",
          "redirects",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "api_key_id": {
            "$ref": "#/components/schemas/ApiKeyId"
          },
          "api_key_name": {
            "type": "string"
          },
          "api_key_prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "publishable_key": {
            "type": "string",
            "pattern": "^xkova_pk_(sandbox|production)_[A-Za-z0-9_-]{22,64}$"
          },
          "name": {
            "type": "string"
          },
          "provider_kind": {
            "type": "string",
            "enum": [
              "xkova_hosted",
              "oidc",
              "signed_launch"
            ]
          },
          "enrollment_mode": {
            "$ref": "#/components/schemas/MemberAuthEnrollmentMode"
          },
          "is_default": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "principal_disabled"
            ]
          },
          "config_version": {
            "type": "integer",
            "minimum": 1
          },
          "session_policy_version": {
            "type": "integer",
            "minimum": 1
          },
          "max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400
          },
          "required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "action_authorization_enabled": {
            "type": "boolean"
          },
          "action_max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 300
          },
          "action_required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "action_required_amr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "action_policy_version": {
            "type": "integer",
            "minimum": 1
          },
          "origins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberAuthAllowedOriginEntry"
            }
          },
          "redirects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberAuthRedirectUrlEntry"
            }
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "MemberAuthHostedApplicationCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "api_key_id",
          "name",
          "enrollment_mode"
        ],
        "properties": {
          "api_key_id": {
            "$ref": "#/components/schemas/ApiKeyId"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "enrollment_mode": {
            "$ref": "#/components/schemas/MemberAuthEnrollmentMode"
          },
          "is_default": {
            "type": "boolean"
          }
        }
      },
      "MemberAuthApplicationUpdate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "enrollment_mode": {
            "$ref": "#/components/schemas/MemberAuthEnrollmentMode"
          },
          "is_default": {
            "type": "boolean"
          }
        }
      },
      "MemberAuthOidcApplicationUpsert": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "issuer",
          "audience",
          "jwks_uri",
          "allowed_jwt_algorithms",
          "proof_binding_mode",
          "required_acr_values",
          "action_authorization_enabled",
          "action_max_auth_age_seconds",
          "action_required_acr_values",
          "action_required_amr_values"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "issuer": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "audience": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "jwks_uri": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "allowed_jwt_algorithms": {
            "type": "array",
            "minItems": 1,
            "maxItems": 4,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "RS256",
                "PS256",
                "ES256",
                "EdDSA"
              ]
            }
          },
          "proof_binding_mode": {
            "type": "string",
            "enum": [
              "authorization_nonce",
              "server_assertion_jti"
            ]
          },
          "max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400
          },
          "required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "action_authorization_enabled": {
            "type": "boolean"
          },
          "action_max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 300
          },
          "action_required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "action_required_amr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        }
      },
      "MemberAuthApplication": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "publishable_key",
          "name",
          "provider_kind",
          "provider_namespace",
          "issuer",
          "audience",
          "jwks_uri",
          "allowed_jwt_algorithms",
          "proof_binding_mode",
          "max_auth_age_seconds",
          "required_acr_values",
          "action_authorization_enabled",
          "action_max_auth_age_seconds",
          "action_required_acr_values",
          "action_required_amr_values",
          "action_policy_version",
          "config_version",
          "session_policy_version"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "publishable_key": {
            "type": "string",
            "pattern": "^xkova_pk_(sandbox|production)_[A-Za-z0-9_-]{22,64}$"
          },
          "name": {
            "type": "string"
          },
          "provider_kind": {
            "type": "string",
            "enum": [
              "oidc"
            ]
          },
          "provider_namespace": {
            "type": "string"
          },
          "issuer": {
            "type": "string",
            "format": "uri"
          },
          "audience": {
            "type": "string"
          },
          "jwks_uri": {
            "type": "string",
            "format": "uri"
          },
          "allowed_jwt_algorithms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "RS256",
                "PS256",
                "ES256",
                "EdDSA"
              ]
            }
          },
          "proof_binding_mode": {
            "type": "string",
            "enum": [
              "authorization_nonce",
              "server_assertion_jti"
            ]
          },
          "max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400
          },
          "required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "action_authorization_enabled": {
            "type": "boolean"
          },
          "action_max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 300
          },
          "action_required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "action_required_amr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "action_policy_version": {
            "type": "integer",
            "minimum": 1
          },
          "config_version": {
            "type": "integer",
            "minimum": 1
          },
          "session_policy_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "MemberAuthRedirectUrlEntry": {
        "type": "object",
        "required": [
          "id",
          "purpose",
          "url",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "email_confirm",
              "password_reset",
              "magic_link",
              "authorization_result"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "MemberAuthAllowedOriginEntry": {
        "type": "object",
        "required": [
          "id",
          "origin",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "origin": {
            "type": "string"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "updated_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "RwaAssetSchemaSummary": {
        "type": "object",
        "required": [
          "asset_schema_id",
          "schema_key",
          "display_name",
          "latest_version",
          "latest_status",
          "has_draft",
          "created_at"
        ],
        "properties": {
          "asset_schema_id": {
            "type": "string",
            "format": "uuid"
          },
          "schema_key": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "latest_version": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "latest_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "draft",
              "published",
              null
            ]
          },
          "has_draft": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RwaAssetSchemaTemplate": {
        "type": "object",
        "required": [
          "asset_schema_id",
          "schema_key",
          "display_name",
          "version",
          "content_hash"
        ],
        "properties": {
          "asset_schema_id": {
            "type": "string",
            "format": "uuid"
          },
          "schema_key": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "content_hash": {
            "type": "string"
          }
        }
      },
      "RwaCompilePreviewResponse": {
        "type": "object",
        "required": [
          "compiled_json_schema",
          "x_xkova_vocab",
          "publishable",
          "reason",
          "reason_code"
        ],
        "properties": {
          "compiled_json_schema": {
            "type": "object",
            "additionalProperties": true
          },
          "x_xkova_vocab": {
            "type": "object",
            "additionalProperties": true
          },
          "publishable": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RwaAssetSchemaRef": {
        "type": "object",
        "required": [
          "asset_schema_id",
          "version_id",
          "version"
        ],
        "properties": {
          "asset_schema_id": {
            "type": "string",
            "format": "uuid"
          },
          "version_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "RwaAssetSchemaDetail": {
        "type": "object",
        "required": [
          "asset_schema_id",
          "schema_key",
          "display_name",
          "latest_version_id",
          "created_at",
          "versions"
        ],
        "properties": {
          "asset_schema_id": {
            "type": "string",
            "format": "uuid"
          },
          "schema_key": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "latest_version_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "version_id",
                "version",
                "status",
                "compiled_json_schema",
                "x_xkova_vocab",
                "content_hash",
                "published_at"
              ],
              "properties": {
                "version_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "published",
                    "retired"
                  ]
                },
                "compiled_json_schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "x_xkova_vocab": {
                  "type": "object",
                  "additionalProperties": true
                },
                "content_hash": {
                  "type": "string"
                },
                "published_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "CustomerTokenId": {
        "type": "string",
        "pattern": "^ctk_[0-9A-Za-z]{22}$",
        "example": "ctk_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "SchemaRebindId": {
        "type": "string",
        "pattern": "^rbd_[0-9A-Za-z]{22}$",
        "example": "rbd_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "RwaAttesterView": {
        "type": "object",
        "required": [
          "id",
          "customer_token_id",
          "display_name",
          "attester_address",
          "role_label",
          "revoked_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/RwaAttesterId"
          },
          "customer_token_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^ctk_[0-9A-Za-z]{22}$"
          },
          "display_name": {
            "type": "string"
          },
          "attester_address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "role_label": {
            "type": "string",
            "enum": [
              "auditor",
              "appraiser",
              "custodian",
              "escrow_agent",
              "oracle",
              "legal_counsel",
              "other"
            ]
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RwaAttesterId": {
        "type": "string",
        "pattern": "^att_[0-9A-Za-z]{22}$",
        "example": "att_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "RwaFieldDescriptor": {
        "type": "object",
        "required": [
          "field_path",
          "title",
          "mutability",
          "visibility",
          "storage_backend",
          "editable",
          "current_value",
          "version",
          "entry_count"
        ],
        "properties": {
          "field_path": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "mutability": {
            "type": "string",
            "enum": [
              "frozen",
              "versioned",
              "append-log"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "gated"
            ]
          },
          "storage_backend": {
            "type": "string",
            "enum": [
              "inline",
              "frozen",
              "versioned",
              "append-log",
              "relationship",
              "media",
              "time-series",
              "holder-positions"
            ]
          },
          "editable": {
            "type": "boolean"
          },
          "current_value": {},
          "version": {
            "type": [
              "integer",
              "null"
            ]
          },
          "entry_count": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "RwaSchemaBinding": {
        "type": "object",
        "required": [
          "customer_token_id",
          "asset_schema_id",
          "version",
          "version_id",
          "bound_at"
        ],
        "properties": {
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "asset_schema_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "version_id": {
            "type": "string",
            "format": "uuid"
          },
          "bound_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CorporateActionResponse": {
        "type": "object",
        "required": [
          "id",
          "customer_token_id",
          "kind",
          "state",
          "params",
          "snapshot_block",
          "freeze_at",
          "legs",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/CorporateActionId"
          },
          "customer_token_id": {
            "type": "string",
            "pattern": "^ctk_[0-9A-Za-z]{22}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "redemption",
              "split",
              "consolidation",
              "additional_issuance",
              "capital_call",
              "mandatory_conversion"
            ]
          },
          "state": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          },
          "snapshot_block": {
            "type": [
              "string",
              "null"
            ]
          },
          "freeze_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "sequence",
                "leg",
                "subject",
                "operation_id"
              ],
              "properties": {
                "sequence": {
                  "type": "integer"
                },
                "leg": {
                  "type": "string"
                },
                "subject": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "operation_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^tkop_[0-9A-Za-z]{22}$"
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CorporateActionId": {
        "type": "string",
        "pattern": "^cact_[0-9A-Za-z]{22}$",
        "example": "cact_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "LogoUploadLimits": {
        "type": "object",
        "required": [
          "max_bytes",
          "max_width",
          "max_height",
          "max_total_frame_pixels",
          "content_types"
        ],
        "properties": {
          "max_bytes": {
            "type": "integer",
            "minimum": 1,
            "example": 5242880
          },
          "max_width": {
            "type": "integer",
            "minimum": 1,
            "example": 4096
          },
          "max_height": {
            "type": "integer",
            "minimum": 1,
            "example": 4096
          },
          "max_total_frame_pixels": {
            "type": "integer",
            "minimum": 1,
            "example": 32000000
          },
          "content_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "image/png",
                "image/jpeg",
                "image/webp",
                "image/gif"
              ]
            }
          }
        }
      },
      "TenantBrandingTheme": {
        "type": "object",
        "required": [
          "brand_name",
          "legal_name",
          "from_name",
          "from_email",
          "reply_to_email",
          "support_email",
          "logo_url",
          "primary_color",
          "secondary_color",
          "accent_color",
          "primary_color_dark",
          "secondary_color_dark",
          "accent_color_dark",
          "email_button_color",
          "email_bg_color",
          "email_text_color",
          "app_title",
          "footer_text",
          "terms_url",
          "privacy_url",
          "subject_override",
          "intro_override",
          "display_term_preset",
          "copy_overrides"
        ],
        "properties": {
          "brand_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "legal_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "from_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "from_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "reply_to_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "support_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "secondary_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "accent_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_color_dark": {
            "type": [
              "string",
              "null"
            ]
          },
          "secondary_color_dark": {
            "type": [
              "string",
              "null"
            ]
          },
          "accent_color_dark": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_button_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_bg_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_text_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "app_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "footer_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "terms_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "privacy_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject_override": {
            "type": [
              "string",
              "null"
            ]
          },
          "intro_override": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_term_preset": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "member",
                  "customer",
                  "user",
                  "client"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "copy_overrides": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "singular": {
                "type": "string"
              },
              "plural": {
                "type": "string"
              },
              "possessive": {
                "type": "string"
              }
            }
          }
        }
      },
      "EmailDnsRecord": {
        "type": "object",
        "required": [
          "record",
          "name",
          "value",
          "type",
          "ttl",
          "priority",
          "status"
        ],
        "properties": {
          "record": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "ttl": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "priority": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PartnerId": {
        "type": "string",
        "pattern": "^prt_[0-9A-Za-z]{22}$",
        "example": "prt_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "OnboardingIntent": {
        "type": "string",
        "enum": [
          "move_money",
          "create_token",
          "explore"
        ]
      },
      "WorkspaceToken": {
        "type": "object",
        "required": [
          "token_deployment_id",
          "token_symbol",
          "token_name",
          "token_issuer",
          "asset_kind",
          "contract_ref",
          "decimals",
          "chain_id",
          "chain_ref",
          "source",
          "asset_standard",
          "rails_eligible",
          "sandbox_ramp_available",
          "sandbox_faucet_contract_ref",
          "permit_strategy",
          "certification"
        ],
        "properties": {
          "token_deployment_id": {
            "type": "string",
            "format": "uuid"
          },
          "token_symbol": {
            "type": "string"
          },
          "token_name": {
            "type": "string"
          },
          "token_issuer": {
            "type": "string"
          },
          "asset_kind": {
            "type": "string",
            "enum": [
              "issuer",
              "xkova_demo",
              "tenant_issued"
            ]
          },
          "contract_ref": {
            "type": "string"
          },
          "decimals": {
            "type": [
              "integer",
              "null"
            ]
          },
          "chain_id": {
            "type": "string",
            "format": "uuid"
          },
          "chain_ref": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "external",
              "token_factory"
            ]
          },
          "asset_standard": {
            "type": "string",
            "enum": [
              "fungible",
              "erc721",
              "erc1155"
            ]
          },
          "rails_eligible": {
            "type": "boolean"
          },
          "sandbox_ramp_available": {
            "type": "boolean"
          },
          "sandbox_faucet_contract_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "permit_strategy": {
            "type": "string",
            "enum": [
              "eip2612",
              "permit2",
              "none"
            ]
          },
          "certification": {
            "type": "object",
            "required": [
              "direct_send",
              "escrow"
            ],
            "properties": {
              "direct_send": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "uncertified",
                  "certified",
                  "stale",
                  "revoked",
                  null
                ]
              },
              "escrow": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "uncertified",
                  "certified",
                  "stale",
                  "revoked",
                  null
                ]
              }
            }
          }
        }
      },
      "CursorPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {}
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "WebhookDeliveryId": {
        "type": "string",
        "pattern": "^whd_[0-9A-Za-z]{22}$",
        "example": "whd_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "WebhookEventEnvelope": {
        "type": "object",
        "required": [
          "id",
          "type",
          "version",
          "created_at",
          "resource_type",
          "resource_id",
          "actor",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "resource_type": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "actor": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string"
              }
            }
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CorrelationId": {
        "type": "string",
        "format": "uuid"
      },
      "WebhookEventType": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          },
          "example_payload": {
            "type": "object",
            "additionalProperties": true
          },
          "deprecated_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "IntegrationGatewayId": {
        "type": "string",
        "pattern": "^igw_[0-9A-Za-z]{22}$",
        "example": "igw_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "StaffId": {
        "type": "string",
        "pattern": "^stf_[0-9A-Za-z]{22}$",
        "example": "stf_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ApprovalRequestId": {
        "type": "string",
        "pattern": "^areq_[0-9A-Za-z]{22}$",
        "example": "areq_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "GatewayEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "op": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ]
          },
          "ok": {
            "type": "boolean"
          },
          "upstream_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "latency_ms": {
            "type": "integer"
          },
          "idempotency_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "ChainDescriptor": {
        "type": "object",
        "required": [
          "ref",
          "kind",
          "name",
          "is_testnet",
          "native_symbol"
        ],
        "properties": {
          "ref": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "evm",
              "svm",
              "utxo",
              "xrpl"
            ]
          },
          "name": {
            "type": "string"
          },
          "is_testnet": {
            "type": "boolean"
          },
          "native_symbol": {
            "type": "string"
          }
        }
      },
      "WalletTransactionSummary": {
        "type": "object",
        "required": [
          "id",
          "status",
          "status_canonical",
          "gross_amount",
          "net_amount",
          "created_at"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "status_canonical": {
            "$ref": "#/components/schemas/StatusCanonical"
          },
          "gross_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "net_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "token_symbol": {
            "type": "string"
          },
          "to_address": {
            "type": "string"
          },
          "to_wallet_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WalletId"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_wallet_id": {
            "$ref": "#/components/schemas/WalletId"
          },
          "tx_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_type": {
            "type": "string"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason_detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "finalized_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LedgerEntry": {
        "type": "object",
        "required": [
          "id",
          "chain_id",
          "block_number",
          "block_timestamp",
          "tx_hash",
          "log_index",
          "entry_index",
          "wallet",
          "token",
          "direction",
          "amount",
          "category"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "chain_id": {
            "type": "integer"
          },
          "block_number": {
            "type": "string"
          },
          "block_timestamp": {
            "type": "string"
          },
          "tx_hash": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{64}$"
          },
          "log_index": {
            "type": "integer"
          },
          "entry_index": {
            "type": "integer"
          },
          "wallet": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "token": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "direction": {
            "type": "string",
            "enum": [
              "debit",
              "credit"
            ]
          },
          "amount": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "transfer_in",
              "transfer_out",
              "fee_earned",
              "fee_withdrawn",
              "fee_withdrawn_destination",
              "external_in",
              "external_out"
            ]
          },
          "payment_fingerprint": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_op_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "counterparty": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^0x[0-9a-fA-F]{40}$"
          }
        }
      },
      "ContactId": {
        "type": "string",
        "pattern": "^cnt_[0-9A-Za-z]{22}$",
        "example": "cnt_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "FundingRequestId": {
        "type": "string",
        "pattern": "^fnd_[0-9A-Za-z]{22}$",
        "example": "fnd_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ChainRef": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "kind",
              "chain_id"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "evm"
                ]
              },
              "chain_id": {
                "type": "integer"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "kind",
              "network"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "xrpl"
                ]
              },
              "network": {
                "type": "string",
                "enum": [
                  "mainnet",
                  "testnet"
                ]
              }
            }
          }
        ]
      },
      "OffRampRequestId": {
        "type": "string",
        "pattern": "^ofr_[0-9A-Za-z]{22}$",
        "example": "ofr_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "PaymentId": {
        "type": "string",
        "pattern": "^pay_[0-9A-Za-z]{22}$",
        "example": "pay_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ComplianceCaseId": {
        "type": "string",
        "pattern": "^cas_[0-9A-Za-z]{22}$",
        "example": "cas_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "PaymentEvent": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PaymentId"
          },
          "from_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_state": {
            "type": "string"
          },
          "occurred_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "source": {
            "type": "string",
            "enum": [
              "system",
              "staff",
              "provider",
              "indexer"
            ]
          },
          "detail": {
            "type": [
              "object",
              "null"
            ]
          },
          "correlation_id": {
            "$ref": "#/components/schemas/CorrelationId"
          }
        }
      },
      "EscrowId": {
        "type": "string",
        "pattern": "^esc_[0-9A-Za-z]{22}$",
        "example": "esc_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "EscrowFeeAccrual": {
        "type": "object",
        "required": [
          "beneficiary",
          "token",
          "amount"
        ],
        "properties": {
          "beneficiary": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          }
        }
      },
      "EscrowEvent": {
        "type": "object",
        "required": [
          "id",
          "action",
          "occurred_at",
          "actor_type",
          "outcome",
          "correlation_id"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/EscrowId"
          },
          "action": {
            "type": "string"
          },
          "occurred_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "actor_type": {
            "type": "string",
            "enum": [
              "system",
              "staff",
              "integrator",
              "service"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "success",
              "failure",
              "denied",
              "partial"
            ]
          },
          "correlation_id": {
            "$ref": "#/components/schemas/CorrelationId"
          },
          "detail": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      },
      "Transaction": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "chain",
          "status",
          "status_canonical",
          "channel",
          "amount",
          "net_amount",
          "display_type",
          "created_at"
        ],
        "properties": {
          "id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentId"
              },
              {
                "$ref": "#/components/schemas/EscrowId"
              }
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/ChainDescriptor"
          },
          "kind": {
            "type": "string",
            "enum": [
              "direct",
              "escrow"
            ]
          },
          "status": {
            "type": "string"
          },
          "status_canonical": {
            "$ref": "#/components/schemas/StatusCanonical"
          },
          "channel": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          },
          "net_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "token_symbol": {
            "type": "string"
          },
          "to_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipient_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_type": {
            "type": "string"
          },
          "tx_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "finalized_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pending",
              "claimed",
              "cancelled",
              "expired",
              null
            ]
          },
          "claim_path": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "external_wallet",
              "wait",
              null
            ]
          },
          "on_chain_payment_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PaymentRequestId": {
        "type": "string",
        "pattern": "^pyr_[0-9A-Za-z]{22}$",
        "example": "pyr_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "AccountHolderSelfBalanceEntry": {
        "type": "object",
        "required": [
          "wallet_id",
          "wallet_address",
          "chain_id",
          "token_address",
          "token_symbol",
          "decimals",
          "balance",
          "last_updated_block"
        ],
        "properties": {
          "wallet_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WalletId"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "type": "string"
          },
          "chain_id": {
            "type": "integer"
          },
          "token_address": {
            "type": "string"
          },
          "token_symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "decimals": {
            "type": [
              "integer",
              "null"
            ]
          },
          "balance": {
            "type": "string"
          },
          "last_updated_block": {
            "type": "string"
          }
        }
      },
      "AccountHolderSelfTransaction": {
        "type": "object",
        "required": [
          "payment_id",
          "status",
          "status_canonical",
          "direction",
          "gross_amount",
          "net_amount",
          "token_symbol",
          "chain_ref",
          "to_address",
          "tx_ref",
          "memo",
          "failure_reason_code",
          "created_at",
          "finalized_at"
        ],
        "properties": {
          "payment_id": {
            "$ref": "#/components/schemas/PaymentId"
          },
          "status": {
            "type": "string"
          },
          "status_canonical": {
            "$ref": "#/components/schemas/StatusCanonical"
          },
          "direction": {
            "type": "string",
            "enum": [
              "sent",
              "received"
            ]
          },
          "gross_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "net_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "token_symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "chain_ref": {
            "type": "string",
            "pattern": "^[1-9][0-9]*$"
          },
          "to_address": {
            "type": "string"
          },
          "tx_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "finalized_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimestampUtc"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CurrentPolicy": {
        "type": "object",
        "required": [
          "policy_type",
          "version",
          "url",
          "required",
          "marketing_consent_text"
        ],
        "properties": {
          "policy_type": {
            "type": "string",
            "enum": [
              "tos",
              "privacy",
              "marketing"
            ]
          },
          "version": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "required": {
            "type": "boolean"
          },
          "marketing_consent_text": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Consent": {
        "type": "object",
        "required": [
          "policy_type",
          "version",
          "accepted_at",
          "source"
        ],
        "properties": {
          "policy_type": {
            "type": "string",
            "enum": [
              "tos",
              "privacy",
              "marketing"
            ]
          },
          "version": {
            "type": "string"
          },
          "accepted_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "MissingConsent": {
        "type": "object",
        "required": [
          "policy_type",
          "version",
          "url"
        ],
        "properties": {
          "policy_type": {
            "type": "string",
            "enum": [
              "tos",
              "privacy",
              "marketing"
            ]
          },
          "version": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ConsentAccept": {
        "type": "object",
        "required": [
          "policy_type",
          "version"
        ],
        "properties": {
          "policy_type": {
            "type": "string",
            "enum": [
              "tos",
              "privacy",
              "marketing"
            ]
          },
          "version": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "DataExportId": {
        "type": "string",
        "pattern": "^dex_[0-9A-Za-z]{22}$",
        "example": "dex_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "ManagedSafeId": {
        "type": "string",
        "pattern": "^msf_[0-9A-Za-z]{22}$",
        "example": "msf_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "TreasuryWalletId": {
        "type": "string",
        "pattern": "^vlt_[0-9A-Za-z]{22}$",
        "example": "vlt_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "AuthorityRoleAssignment": {
        "type": "object",
        "required": [
          "role",
          "customer_token_id",
          "granted_at"
        ],
        "properties": {
          "role": {
            "type": "string",
            "example": "MINTER_ROLE"
          },
          "customer_token_id": {
            "$ref": "#/components/schemas/CustomerTokenId"
          },
          "granted_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExplorableContract": {
        "type": "object",
        "required": [
          "kind",
          "address",
          "abi_name"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "token",
              "access_registry",
              "roles_modifier"
            ]
          },
          "address": {
            "type": "string",
            "example": "0x91De3939ffe81F121Dc192ef1419d353100822bB"
          },
          "abi_name": {
            "type": "string",
            "enum": [
              "ERC20XGasless",
              "AccessRegistry",
              "Roles"
            ]
          }
        }
      },
      "CapTableHolder": {
        "type": "object",
        "required": [
          "holder_address",
          "token_id",
          "balance",
          "fraction",
          "last_movement_block"
        ],
        "properties": {
          "holder_address": {
            "type": "string"
          },
          "token_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "balance": {
            "type": "string"
          },
          "fraction": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_movement_block": {
            "type": "string"
          }
        }
      },
      "CapTableInstance": {
        "type": "object",
        "required": [
          "token_id",
          "holder_address",
          "balance"
        ],
        "properties": {
          "token_id": {
            "type": "string"
          },
          "holder_address": {
            "type": "string"
          },
          "balance": {
            "type": "string"
          }
        }
      },
      "TreasuryTransferId": {
        "type": "string",
        "pattern": "^trf_[0-9A-Za-z]{22}$",
        "example": "trf_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "DistributionPayout": {
        "type": "object",
        "required": [
          "holder_address",
          "holder_balance_raw",
          "amount_raw",
          "state",
          "on_chain_tx_status"
        ],
        "properties": {
          "holder_address": {
            "type": "string"
          },
          "holder_balance_raw": {
            "type": "string"
          },
          "amount_raw": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "relayed",
              "settled",
              "failed"
            ]
          },
          "on_chain_tx_status": {
            "type": [
              "integer",
              "null"
            ],
            "enum": [
              0,
              1,
              null
            ]
          }
        }
      },
      "SafeEip712TypedData": {
        "type": "object",
        "required": [
          "types",
          "primaryType",
          "domain",
          "message"
        ],
        "properties": {
          "types": {
            "type": "object",
            "properties": {
              "EIP712Domain": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              },
              "SafeTx": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "primaryType": {
            "type": "string",
            "enum": [
              "SafeTx"
            ]
          },
          "domain": {
            "type": "object",
            "required": [
              "chainId",
              "verifyingContract"
            ],
            "properties": {
              "chainId": {
                "type": "integer"
              },
              "verifyingContract": {
                "type": "string"
              }
            }
          },
          "message": {
            "type": "object",
            "required": [
              "to",
              "value",
              "data",
              "operation",
              "safeTxGas",
              "baseGas",
              "gasPrice",
              "gasToken",
              "refundReceiver",
              "nonce"
            ],
            "properties": {
              "to": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "data": {
                "type": "string"
              },
              "operation": {
                "type": "integer",
                "enum": [
                  0,
                  1
                ]
              },
              "safeTxGas": {
                "type": "string"
              },
              "baseGas": {
                "type": "string"
              },
              "gasPrice": {
                "type": "string"
              },
              "gasToken": {
                "type": "string"
              },
              "refundReceiver": {
                "type": "string"
              },
              "nonce": {
                "type": "string"
              }
            }
          }
        }
      },
      "TokenizationOperationStatus": {
        "type": "string",
        "enum": [
          "pending_sign",
          "submission_pending",
          "relayed",
          "confirmed",
          "reverted",
          "failed"
        ]
      },
      "ModuleTxEip712TypedData": {
        "type": "object",
        "required": [
          "types",
          "primaryType",
          "domain",
          "message"
        ],
        "properties": {
          "types": {
            "type": "object",
            "properties": {
              "EIP712Domain": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              },
              "ModuleTx": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "primaryType": {
            "type": "string",
            "enum": [
              "ModuleTx"
            ]
          },
          "domain": {
            "type": "object",
            "required": [
              "chainId",
              "verifyingContract"
            ],
            "properties": {
              "chainId": {
                "type": "integer"
              },
              "verifyingContract": {
                "type": "string"
              }
            }
          },
          "message": {
            "type": "object",
            "required": [
              "data",
              "salt"
            ],
            "properties": {
              "data": {
                "type": "string"
              },
              "salt": {
                "type": "string"
              }
            }
          }
        }
      },
      "TokenizationOperationSignature": {
        "type": "object",
        "required": [
          "signer",
          "signed_at"
        ],
        "properties": {
          "signer": {
            "type": "string"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ForwardRequestEip712TypedData": {
        "type": "object",
        "required": [
          "types",
          "primaryType",
          "domain",
          "message"
        ],
        "properties": {
          "types": {
            "type": "object",
            "properties": {
              "EIP712Domain": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              },
              "ForwardRequest": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "primaryType": {
            "type": "string",
            "enum": [
              "ForwardRequest"
            ]
          },
          "domain": {
            "type": "object",
            "required": [
              "name",
              "version",
              "chainId",
              "verifyingContract"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "chainId": {
                "type": "integer"
              },
              "verifyingContract": {
                "type": "string"
              }
            }
          },
          "message": {
            "type": "object",
            "required": [
              "from",
              "to",
              "value",
              "gas",
              "nonce",
              "deadline",
              "data"
            ],
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "gas": {
                "type": "string"
              },
              "nonce": {
                "type": "string"
              },
              "deadline": {
                "type": "string"
              },
              "data": {
                "type": "string"
              }
            }
          }
        }
      },
      "ForwardRequestBody": {
        "type": "object",
        "required": [
          "from",
          "to",
          "value",
          "gas",
          "deadline",
          "data"
        ],
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "to": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "value": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$"
          },
          "gas": {
            "type": "string",
            "pattern": "^[0-9]{1,78}$"
          },
          "deadline": {
            "type": "string",
            "pattern": "^[0-9]{1,15}$"
          },
          "data": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]*$"
          }
        }
      },
      "FeeScheduleTxType": {
        "type": "string",
        "enum": [
          "p2p_send",
          "external_send",
          "escrow_claim",
          "ecommerce_payment"
        ]
      },
      "FeeScheduleId": {
        "type": "string",
        "pattern": "^fsc_[0-9A-Za-z]{22}$",
        "example": "fsc_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "MemberAuthOperationAttemptToken": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_-]{43}$"
      },
      "MemberAuthSummary": {
        "type": "object",
        "required": [
          "account_holder_id",
          "provider_subject"
        ],
        "properties": {
          "account_holder_id": {
            "$ref": "#/components/schemas/AccountHolderId"
          },
          "provider_subject": {
            "type": "string"
          }
        }
      },
      "MemberActionResourceType": {
        "type": "string",
        "enum": [
          "payment",
          "escrow",
          "approval_request"
        ]
      },
      "MemberActionName": {
        "type": "string",
        "enum": [
          "sign",
          "create",
          "cancel",
          "attest"
        ]
      },
      "MemberActionHostedAuthorizationStart": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "authorization_method",
          "authorization_url",
          "expires_at"
        ],
        "properties": {
          "authorization_method": {
            "type": "string",
            "enum": [
              "hosted_passkey",
              "xkova_webauthn"
            ]
          },
          "authorization_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "MemberActionExternalAuthorizationStart": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "authorization_method",
          "action_token",
          "nonce",
          "issuer",
          "audience",
          "max_auth_age_seconds",
          "required_acr_values",
          "required_amr_values",
          "expires_at"
        ],
        "properties": {
          "authorization_method": {
            "type": "string",
            "enum": [
              "external_oidc"
            ]
          },
          "action_token": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "nonce": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "issuer": {
            "type": "string",
            "format": "uri"
          },
          "audience": {
            "type": "string"
          },
          "max_auth_age_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 300
          },
          "required_acr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required_amr_values": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "expires_at": {
            "$ref": "#/components/schemas/TimestampUtc"
          }
        }
      },
      "AccountCenterIntent": {
        "type": "string",
        "enum": [
          "security",
          "sessions",
          "wallet_readiness"
        ]
      },
      "MemberActionReadiness": {
        "type": "object",
        "required": [
          "authorization_method",
          "setup_status",
          "action_authorization_enabled",
          "requires_fresh_proof",
          "provider_status"
        ],
        "properties": {
          "authorization_method": {
            "type": "string",
            "enum": [
              "hosted_passkey",
              "external_oidc",
              "xkova_webauthn"
            ]
          },
          "setup_status": {
            "type": "string",
            "enum": [
              "passkey_required",
              "recovery_acknowledgement_required",
              "recovery_required",
              "ready",
              "externally_managed"
            ]
          },
          "action_authorization_enabled": {
            "type": "boolean"
          },
          "requires_fresh_proof": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "provider_status": {
            "type": "string",
            "enum": [
              "not_checked"
            ]
          }
        }
      },
      "ApiKeyId": {
        "type": "string",
        "pattern": "^key_[0-9A-Za-z]{22}$",
        "example": "key_1A2b3C4d5E6f7G8h9I0jK1"
      },
      "MemberAuthEnrollmentMode": {
        "type": "string",
        "enum": [
          "invite_only",
          "open"
        ]
      }
    },
    "responses": {
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BadRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "TooManyRequests": {
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "parameters": {
      "idempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128
        }
      },
      "pathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "cursor": {
        "name": "cursor",
        "in": "query",
        "schema": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        }
      },
      "webhookEndpointPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/WebhookEndpointId"
        }
      },
      "webhookDeliveryPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/WebhookDeliveryId"
        }
      },
      "integrationGatewayPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/IntegrationGatewayId"
        }
      },
      "walletPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/WalletId"
        }
      },
      "contactPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ContactId"
        }
      },
      "xSandboxScenario": {
        "name": "X-Sandbox-Scenario",
        "in": "header",
        "schema": {
          "type": "string",
          "enum": [
            "success",
            "scenario-a-pre-issuance-fail",
            "scenario-b-awaiting-institution-credit",
            "x-partner-outage"
          ]
        }
      },
      "fundingRequestPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/FundingRequestId"
        }
      },
      "offRampRequestPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/OffRampRequestId"
        }
      },
      "fields": {
        "name": "fields",
        "in": "query",
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "xOptionalMemberSessionId": {
        "name": "X-Member-Session-Id",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "xOptionalXkovaPublishableKey": {
        "name": "X-XKOVA-Publishable-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "pattern": "^xkova_pk_(sandbox|production)_[A-Za-z0-9_-]{22,64}$"
        }
      },
      "paymentPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/PaymentId"
        }
      },
      "escrowPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/EscrowId"
        }
      },
      "paymentRequestPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/PaymentRequestId"
        }
      },
      "xMemberSessionId": {
        "name": "X-Member-Session-Id",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "xXkovaPublishableKey": {
        "name": "X-XKOVA-Publishable-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^xkova_pk_(sandbox|production)_[A-Za-z0-9_-]{22,64}$"
        }
      },
      "dataExportPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/DataExportId"
        }
      },
      "accountHolderPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/AccountHolderId"
        }
      },
      "customerTokenPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/CustomerTokenId"
        }
      },
      "feeSchedulePathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/FeeScheduleId"
        }
      },
      "memberAuthApplicationId": {
        "name": "application_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "schemaRebindPathId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/SchemaRebindId"
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "XKOVA-APIKey"
      }
    }
  }
}
