{
  "openapi": "3.1.0",
  "info": {
    "title": "Xenarch Platform",
    "version": "0.1.0"
  },
  "paths": {
    "/metrics": {
      "get": {
        "summary": "Metrics",
        "description": "Expose Prometheus metrics in text exposition format.\n\nProtected: only accessible from localhost or with a valid bearer token.",
        "operationId": "metrics_metrics_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "summary": "Healthz",
        "operationId": "healthz_healthz_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/config": {
      "get": {
        "summary": "Get Config",
        "description": "Public CLI configuration. No authentication required.",
        "operationId": "get_config_v1_config_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/gates": {
      "post": {
        "tags": [
          "gates"
        ],
        "summary": "Create Gate Endpoint",
        "description": "Create a gate session requiring payment for content access.",
        "operationId": "create_gate_endpoint_v1_gates_post",
        "parameters": [
          {
            "name": "x-site-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Site-Token"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GateCreateRequest"
              }
            }
          }
        },
        "responses": {
          "402": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GateCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gates/domain/{domain}": {
      "get": {
        "tags": [
          "gates"
        ],
        "summary": "Get Gate By Domain",
        "description": "Look up the most recent active gate config for a domain. Public endpoint for agent discovery.",
        "operationId": "get_gate_by_domain_v1_gates_domain__domain__get",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Domain"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GateCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gates/{gate_id}": {
      "get": {
        "tags": [
          "gates"
        ],
        "summary": "Get Gate Status",
        "description": "Check the status of a gate session. No auth required \u2014 gate IDs are unguessable UUIDs.",
        "operationId": "get_gate_status_v1_gates__gate_id__get",
        "parameters": [
          {
            "name": "gate_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Gate Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GateStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gates/{gate_id}/verify": {
      "post": {
        "tags": [
          "gates"
        ],
        "summary": "Verify Gate Payment",
        "description": "Verify an on-chain payment for a gate and return an access token.",
        "operationId": "verify_gate_payment_v1_gates__gate_id__verify_post",
        "parameters": [
          {
            "name": "gate_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Gate Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GateVerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GateVerifyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publishers": {
      "post": {
        "tags": [
          "publishers"
        ],
        "summary": "Register Publisher",
        "operationId": "register_publisher_v1_publishers_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublisherRegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublisherRegisterResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publishers/login": {
      "post": {
        "tags": [
          "publishers"
        ],
        "summary": "Login Publisher",
        "operationId": "login_publisher_v1_publishers_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublisherLoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRotateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publishers/me": {
      "get": {
        "tags": [
          "publishers"
        ],
        "summary": "Get Profile",
        "operationId": "get_profile_v1_publishers_me_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublisherProfileResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publishers/me/payout": {
      "put": {
        "tags": [
          "publishers"
        ],
        "summary": "Update Payout",
        "operationId": "update_payout_v1_publishers_me_payout_put",
        "parameters": [
          {
            "name": "x-confirm-password",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Confirm-Password"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayoutUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publishers/me/payout/cancel": {
      "post": {
        "tags": [
          "publishers"
        ],
        "summary": "Cancel Payout",
        "operationId": "cancel_payout_v1_publishers_me_payout_cancel_post",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutCancelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publishers/me/api-key/rotate": {
      "post": {
        "tags": [
          "publishers"
        ],
        "summary": "Rotate Api Key",
        "operationId": "rotate_api_key_v1_publishers_me_api_key_rotate_post",
        "parameters": [
          {
            "name": "x-confirm-password",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Confirm-Password"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRotateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sites": {
      "post": {
        "tags": [
          "sites"
        ],
        "summary": "Create Site",
        "operationId": "create_site_v1_sites_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "sites"
        ],
        "summary": "List Sites",
        "operationId": "list_sites_v1_sites_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteListItem"
                  },
                  "title": "Response List Sites V1 Sites Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sites/{site_id}/pricing": {
      "put": {
        "tags": [
          "sites"
        ],
        "summary": "Update Pricing",
        "operationId": "update_pricing_v1_sites__site_id__pricing_put",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Site Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SitePricingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SitePricingResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sites/{site_id}/stats": {
      "get": {
        "tags": [
          "sites"
        ],
        "summary": "Get Stats",
        "operationId": "get_stats_v1_sites__site_id__stats_get",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Site Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteStatsBucketedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sites/{site_id}/transactions": {
      "get": {
        "tags": [
          "sites"
        ],
        "summary": "Get Transactions",
        "operationId": "get_transactions_v1_sites__site_id__transactions_get",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Site Id"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(24h|7d|30d|all)$",
              "default": "all",
              "title": "Period"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(paid|blocked|withdraw|all)$",
              "default": "all",
              "title": "Status"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Per Page"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteTransactionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sites/{site_id}/category-breakdown": {
      "get": {
        "tags": [
          "sites"
        ],
        "summary": "Get Category Breakdown",
        "operationId": "get_category_breakdown_v1_sites__site_id__category_breakdown_get",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Site Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryBreakdownResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sites/{site_id}/cash-outs": {
      "post": {
        "tags": [
          "sites"
        ],
        "summary": "Record Cash Out",
        "operationId": "record_cash_out_v1_sites__site_id__cash_outs_post",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Site Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CashOutRecordRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashOutRecordResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wallet-session": {
      "post": {
        "tags": [
          "wallet"
        ],
        "summary": "Create Wallet Session",
        "description": "Create a one-time wallet creation session. Requires valid site token.",
        "operationId": "create_wallet_session_v1_wallet_session_post",
        "parameters": [
          {
            "name": "x-site-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Site-Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wallet/auth-bridge": {
      "get": {
        "tags": [
          "wallet"
        ],
        "summary": "Wallet Auth Bridge",
        "description": "Hidden iframe auth bridge for Coinbase Embedded Wallet creation.\nLoaded as an invisible iframe from the WP plugin. Handles the Coinbase\nCDP SDK calls (initialize, signInWithEmail, verifyEmailOTP) and\ncommunicates results back to the parent window via postMessage.",
        "operationId": "wallet_auth_bridge_v1_wallet_auth_bridge_get",
        "parameters": [
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wallet/oauth": {
      "get": {
        "tags": [
          "wallet"
        ],
        "summary": "Wallet Oauth Popup",
        "description": "Visible popup page for OAuth-based wallet creation (Google / Apple).\n\nUnlike the hidden iframe (auth-bridge), this page is opened via window.open()\nso the user can see and interact with the Google/Apple consent screen.\nThe CDP SDK redirects this page to the OAuth provider; after consent,\nthe provider redirects back here with ?code=...&provider_type=...&flow_id=...\nand the SDK auto-verifies the code on reload.\n\nUses a session token for parent_origin validation (same as auth-bridge),\nbut does NOT consume the session \u2014 the Google redirect will reload this page.",
        "operationId": "wallet_oauth_popup_v1_wallet_oauth_get",
        "parameters": [
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Session"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Provider"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wallet/create": {
      "get": {
        "tags": [
          "wallet"
        ],
        "summary": "Wallet Create Page",
        "description": "Legacy standalone wallet creation page.",
        "operationId": "wallet_create_page_v1_wallet_create_get",
        "parameters": [
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/access-tokens/verify": {
      "post": {
        "tags": [
          "access-tokens"
        ],
        "summary": "Verify Token",
        "operationId": "verify_token_v1_access_tokens_verify_post",
        "parameters": [
          {
            "name": "x-site-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Site-Token"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenVerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenVerifyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/offramp/sell-config": {
      "get": {
        "tags": [
          "offramp"
        ],
        "summary": "Sell Config",
        "description": "Get supported countries and payment methods for offramp.",
        "operationId": "sell_config_v1_offramp_sell_config_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/offramp/sell-options": {
      "get": {
        "tags": [
          "offramp"
        ],
        "summary": "Sell Options",
        "description": "Get available offramp payment methods and limits for a country.",
        "operationId": "sell_options_v1_offramp_sell_options_get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "title": "Country"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/offramp/sell-quote": {
      "post": {
        "tags": [
          "offramp"
        ],
        "summary": "Sell Quote",
        "description": "Create a Coinbase sell quote and return the offramp URL.",
        "operationId": "sell_quote_v1_offramp_sell_quote_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellQuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellQuoteResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/payments/history": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "Get Payment History Endpoint",
        "description": "Get payment history for an agent wallet. Public endpoint.",
        "operationId": "get_payment_history_endpoint_v1_payments_history_get",
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "title": "Wallet"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Domain"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentHistoryResponse"
                  },
                  "title": "Response Get Payment History Endpoint V1 Payments History Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/services": {
      "post": {
        "tags": [
          "services"
        ],
        "summary": "Create Service Endpoint",
        "description": "Register a new service for agent discovery.",
        "operationId": "create_service_endpoint_v1_services_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "services"
        ],
        "summary": "List Services Endpoint",
        "description": "List all active services. Public endpoint.",
        "operationId": "list_services_endpoint_v1_services_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/services/search": {
      "get": {
        "tags": [
          "services"
        ],
        "summary": "Search Services Endpoint",
        "description": "Search services by category, keyword, or price range. Public endpoint.",
        "operationId": "search_services_endpoint_v1_services_search_get",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "min_price",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0.0
                },
                {
                  "type": "string",
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Price"
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 1.0
                },
                {
                  "type": "string",
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Price"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/services/{service_id}": {
      "get": {
        "tags": [
          "services"
        ],
        "summary": "Get Service Endpoint",
        "description": "Get service details. Public endpoint.",
        "operationId": "get_service_endpoint_v1_services__service_id__get",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Service Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "services"
        ],
        "summary": "Update Service Endpoint",
        "description": "Update a service. Only the owning publisher can update.",
        "operationId": "update_service_endpoint_v1_services__service_id__put",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Service Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "services"
        ],
        "summary": "Delete Service Endpoint",
        "description": "Deactivate a service (soft delete). Only the owning publisher can delete.",
        "operationId": "delete_service_endpoint_v1_services__service_id__delete",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Service Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Register Agent Endpoint",
        "description": "Register an agent by wallet address. Idempotent \u2014 returns existing if already registered.",
        "operationId": "register_agent_endpoint_v1_agents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentRegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/me": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get Current Agent",
        "description": "Get the current agent's profile by wallet address header.",
        "operationId": "get_current_agent_v1_agents_me_get",
        "parameters": [
          {
            "name": "x-wallet-address",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "title": "X-Wallet-Address"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/wallet/{wallet_address}": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get Agent By Wallet Endpoint",
        "description": "Get agent profile by wallet address. Public lookup.",
        "operationId": "get_agent_by_wallet_endpoint_v1_agents_wallet__wallet_address__get",
        "parameters": [
          {
            "name": "wallet_address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "title": "Wallet Address"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccessTokenVerifyRequest": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 512,
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "AccessTokenVerifyRequest"
      },
      "AccessTokenVerifyResponse": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid"
          }
        },
        "type": "object",
        "required": [
          "valid"
        ],
        "title": "AccessTokenVerifyResponse"
      },
      "AgentRegisterRequest": {
        "properties": {
          "wallet_address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$",
            "title": "Wallet Address"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "wallet_address"
        ],
        "title": "AgentRegisterRequest"
      },
      "AgentResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "wallet_address": {
            "type": "string",
            "title": "Wallet Address"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "wallet_address",
          "name",
          "created_at"
        ],
        "title": "AgentResponse"
      },
      "ApiKeyRotateResponse": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "api_key"
        ],
        "title": "ApiKeyRotateResponse"
      },
      "CashOutRecordRequest": {
        "properties": {
          "amount_usd": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,4})?$",
            "title": "Amount Usd"
          }
        },
        "type": "object",
        "required": [
          "amount_usd"
        ],
        "title": "CashOutRecordRequest"
      },
      "CashOutRecordResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "amount_usd": {
            "type": "string",
            "title": "Amount Usd"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "amount_usd",
          "created_at"
        ],
        "title": "CashOutRecordResponse"
      },
      "CategoryBreakdownItem": {
        "properties": {
          "category": {
            "type": "string",
            "title": "Category"
          },
          "earned_usd": {
            "type": "string",
            "title": "Earned Usd"
          }
        },
        "type": "object",
        "required": [
          "category",
          "earned_usd"
        ],
        "title": "CategoryBreakdownItem"
      },
      "CategoryBreakdownResponse": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/CategoryBreakdownItem"
            },
            "type": "array",
            "title": "Categories"
          }
        },
        "type": "object",
        "required": [
          "categories"
        ],
        "title": "CategoryBreakdownResponse"
      },
      "GateCreateRequest": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "detection_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detection Method"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "GateCreateRequest"
      },
      "GateCreateResponse": {
        "properties": {
          "xenarch": {
            "type": "boolean",
            "title": "Xenarch",
            "default": true
          },
          "gate_id": {
            "type": "string",
            "format": "uuid",
            "title": "Gate Id"
          },
          "price_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Price Usd"
          },
          "splitter": {
            "type": "string",
            "title": "Splitter"
          },
          "collector": {
            "type": "string",
            "title": "Collector"
          },
          "network": {
            "type": "string",
            "title": "Network"
          },
          "asset": {
            "type": "string",
            "title": "Asset",
            "default": "USDC"
          },
          "protocol": {
            "type": "string",
            "title": "Protocol",
            "default": "x402"
          },
          "verify_url": {
            "type": "string",
            "title": "Verify Url"
          },
          "expires": {
            "type": "string",
            "format": "date-time",
            "title": "Expires"
          }
        },
        "type": "object",
        "required": [
          "gate_id",
          "price_usd",
          "splitter",
          "collector",
          "network",
          "verify_url",
          "expires"
        ],
        "title": "GateCreateResponse"
      },
      "GateStatusResponse": {
        "properties": {
          "gate_id": {
            "type": "string",
            "format": "uuid",
            "title": "Gate Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "price_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Price Usd"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          }
        },
        "type": "object",
        "required": [
          "gate_id",
          "status",
          "price_usd",
          "created_at",
          "paid_at"
        ],
        "title": "GateStatusResponse"
      },
      "GateVerifyRequest": {
        "properties": {
          "tx_hash": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{64}$",
            "title": "Tx Hash"
          }
        },
        "type": "object",
        "required": [
          "tx_hash"
        ],
        "title": "GateVerifyRequest"
      },
      "GateVerifyResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "expires_at"
        ],
        "title": "GateVerifyResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "PaymentHistoryResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "amount_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount Usd"
          },
          "tx_hash": {
            "type": "string",
            "title": "Tx Hash"
          },
          "paid_at": {
            "type": "string",
            "format": "date-time",
            "title": "Paid At"
          }
        },
        "type": "object",
        "required": [
          "url",
          "domain",
          "amount_usd",
          "tx_hash",
          "paid_at"
        ],
        "title": "PaymentHistoryResponse"
      },
      "PayoutCancelResponse": {
        "properties": {
          "cancelled": {
            "type": "boolean",
            "title": "Cancelled"
          }
        },
        "type": "object",
        "required": [
          "cancelled"
        ],
        "title": "PayoutCancelResponse"
      },
      "PayoutUpdateRequest": {
        "properties": {
          "wallet": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$",
            "title": "Wallet"
          },
          "network": {
            "type": "string",
            "title": "Network",
            "default": "base"
          }
        },
        "type": "object",
        "required": [
          "wallet"
        ],
        "title": "PayoutUpdateRequest"
      },
      "PayoutUpdateResponse": {
        "properties": {
          "confirmed": {
            "type": "boolean",
            "title": "Confirmed"
          },
          "effective_at": {
            "type": "string",
            "format": "date-time",
            "title": "Effective At"
          }
        },
        "type": "object",
        "required": [
          "confirmed",
          "effective_at"
        ],
        "title": "PayoutUpdateResponse"
      },
      "PriceRuleItem": {
        "properties": {
          "path": {
            "type": "string",
            "title": "Path"
          },
          "price_usd": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Price Usd"
          }
        },
        "type": "object",
        "required": [
          "path",
          "price_usd"
        ],
        "title": "PriceRuleItem"
      },
      "PublisherLoginRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "PublisherLoginRequest"
      },
      "PublisherProfileResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "payout_wallet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payout Wallet"
          },
          "payout_wallet_pending": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payout Wallet Pending"
          },
          "payout_wallet_effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payout Wallet Effective At"
          },
          "payout_network": {
            "type": "string",
            "title": "Payout Network"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "payout_wallet",
          "payout_wallet_pending",
          "payout_wallet_effective_at",
          "payout_network",
          "created_at"
        ],
        "title": "PublisherProfileResponse"
      },
      "PublisherRegisterRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "PublisherRegisterRequest"
      },
      "PublisherRegisterResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "api_key": {
            "type": "string",
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_key"
        ],
        "title": "PublisherRegisterResponse"
      },
      "SellQuoteRequest": {
        "properties": {
          "site_id": {
            "type": "string",
            "title": "Site Id"
          },
          "amount_usd": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,2})?$",
            "title": "Amount Usd"
          },
          "country": {
            "type": "string",
            "maxLength": 2,
            "minLength": 2,
            "title": "Country"
          },
          "payment_method": {
            "type": "string",
            "title": "Payment Method",
            "default": "FIAT_WALLET"
          }
        },
        "type": "object",
        "required": [
          "site_id",
          "amount_usd",
          "country"
        ],
        "title": "SellQuoteRequest"
      },
      "SellQuoteResponse": {
        "properties": {
          "offramp_url": {
            "type": "string",
            "title": "Offramp Url"
          },
          "sell_amount": {
            "type": "string",
            "title": "Sell Amount"
          },
          "buy_amount": {
            "type": "string",
            "title": "Buy Amount"
          },
          "fee_amount": {
            "type": "string",
            "title": "Fee Amount"
          },
          "expires_at": {
            "type": "string",
            "title": "Expires At",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "offramp_url",
          "sell_amount",
          "buy_amount",
          "fee_amount"
        ],
        "title": "SellQuoteResponse"
      },
      "ServiceCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name"
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "title": "Url"
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "title": "Description",
            "default": ""
          },
          "price_per_request": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Price Per Request"
          },
          "category": {
            "type": "string",
            "pattern": "^(api|docs|data|content)$",
            "title": "Category",
            "default": "api"
          },
          "pay_json_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pay Json Url"
          }
        },
        "type": "object",
        "required": [
          "name",
          "url",
          "price_per_request"
        ],
        "title": "ServiceCreateRequest"
      },
      "ServiceListResponse": {
        "properties": {
          "services": {
            "items": {
              "$ref": "#/components/schemas/ServiceResponse"
            },
            "type": "array",
            "title": "Services"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          }
        },
        "type": "object",
        "required": [
          "services",
          "total",
          "limit",
          "offset"
        ],
        "title": "ServiceListResponse"
      },
      "ServiceResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid",
            "title": "Publisher Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "price_per_request": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Price Per Request"
          },
          "category": {
            "type": "string",
            "title": "Category"
          },
          "pay_json_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pay Json Url"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "publisher_id",
          "name",
          "url",
          "description",
          "price_per_request",
          "category",
          "pay_json_url",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "ServiceResponse"
      },
      "ServiceUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "price_per_request": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Per Request"
          },
          "category": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(api|docs|data|content)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "pay_json_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pay Json Url"
          }
        },
        "type": "object",
        "title": "ServiceUpdateRequest"
      },
      "SiteCreateRequest": {
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253,
            "minLength": 1,
            "title": "Domain"
          }
        },
        "type": "object",
        "required": [
          "domain"
        ],
        "title": "SiteCreateRequest"
      },
      "SiteCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "site_token": {
            "type": "string",
            "title": "Site Token"
          }
        },
        "type": "object",
        "required": [
          "id",
          "site_token"
        ],
        "title": "SiteCreateResponse"
      },
      "SiteListItem": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "default_price_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Default Price Usd"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "domain",
          "default_price_usd",
          "created_at"
        ],
        "title": "SiteListItem"
      },
      "SitePricingRequest": {
        "properties": {
          "default_price_usd": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Default Price Usd"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PriceRuleItem"
            },
            "type": "array",
            "title": "Rules",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "default_price_usd"
        ],
        "title": "SitePricingRequest"
      },
      "SitePricingResponse": {
        "properties": {
          "rules_applied": {
            "type": "integer",
            "title": "Rules Applied"
          }
        },
        "type": "object",
        "required": [
          "rules_applied"
        ],
        "title": "SitePricingResponse"
      },
      "SiteStatsBucketedResponse": {
        "properties": {
          "today": {
            "$ref": "#/components/schemas/StatsBucket"
          },
          "month": {
            "$ref": "#/components/schemas/StatsBucket"
          },
          "all_time": {
            "$ref": "#/components/schemas/StatsBucket"
          }
        },
        "type": "object",
        "required": [
          "today",
          "month",
          "all_time"
        ],
        "title": "SiteStatsBucketedResponse"
      },
      "SiteTransactionsResponse": {
        "properties": {
          "transactions": {
            "items": {
              "$ref": "#/components/schemas/TransactionItem"
            },
            "type": "array",
            "title": "Transactions"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "per_page": {
            "type": "integer",
            "title": "Per Page"
          }
        },
        "type": "object",
        "required": [
          "transactions",
          "total",
          "page",
          "per_page"
        ],
        "title": "SiteTransactionsResponse"
      },
      "StatsBucket": {
        "properties": {
          "earned_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Earned Usd"
          },
          "requests": {
            "type": "integer",
            "title": "Requests"
          },
          "paid": {
            "type": "integer",
            "title": "Paid"
          }
        },
        "type": "object",
        "required": [
          "earned_usd",
          "requests",
          "paid"
        ],
        "title": "StatsBucket"
      },
      "TransactionItem": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": "gate"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "amount_usd": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount Usd"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "amount_usd",
          "status",
          "created_at"
        ],
        "title": "TransactionItem"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}
