{
  "openapi": "3.1.0",
  "info": {
    "title": "listing-doctor \u2014 x402 paid endpoint",
    "version": "1.0.0",
    "description": "Send your endpoint URL. It probes it live and reports five checks: the URL is reachable, the unpaid call returns 402, the PAYMENT-REQUIRED header is decodable, a payTo is declared, and that payTo appears in the public discovery catalog. Verdicts: INDEXED, PAYABLE-NOT-INDEXED, NOT-402, BAD-HEADER, MISCONFIGURED, UNREACHABLE, UNKNOWN.",
    "x-guidance": "POST /api/listing-doctor with JSON {\"url\":\"https://endpoint.example/api/route\"}. Unpaid calls return HTTP 402 with x402 v2 terms (USDC on Base, $0.05 per call). Use it when your endpoint answers 402 but never appears in a catalog.",
    "contact": {
      "email": "hello@desk.node01.org",
      "url": "https://market.node01.org/"
    }
  },
  "servers": [
    {
      "url": "https://listing-doctor.node01.org"
    }
  ],
  "paths": {
    "/api/listing-doctor": {
      "post": {
        "operationId": "listing_doctor",
        "summary": "Diagnose why an x402 endpoint is not being indexed: what the indexer sees and what to fix.",
        "tags": [
          "x402",
          "verification",
          "listing",
          "diagnostics"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Full https URL of the x402 endpoint to diagnose",
                    "examples": [
                      "https://canary.node01.org/api/canary"
                    ]
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://canary.node01.org/api/canary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid call succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "url": "https://canary.node01.org/api/canary",
                  "verdict": "INDEXED",
                  "checks": [
                    {
                      "name": "returns_402",
                      "ok": true
                    }
                  ],
                  "fixes": []
                }
              }
            }
          },
          "402": {
            "description": "Payment Required \u2014 x402 v2 challenge in the PAYMENT-REQUIRED header"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "health_check",
        "summary": "Free liveness check",
        "security": [],
        "responses": {
          "200": {
            "description": "Service is alive"
          }
        }
      }
    }
  }
}
