{
  "openapi": "3.1.0",
  "info": {
    "title": "Glance direct agent intake",
    "version": "1.0.0",
    "description": "US$5 minimum non-refundable inquiry buys consideration of one project, not acceptance/full review. Credit applies if accepted. Inquiry invoices are automatic. Service-issued inquiries open project submission after canonical verification and a once-only payment claim: on Solana USDC by finalized invoice-memo settlement; on Bitcoin by a confirmed payment of the invoice's exact unique sats amount within its agreed window. Any other amount or timing awaits protected attribution review. Full review acceptance/quotes remain protected personal operations. An expired inquiry invoice with no submitted reference is replaced automatically with a fresh one (new memo or unique amount, new agreement): at once if unagreed, two hours after expiry if agreed. Poll at most once a minute. Never pay twice to fix an expired invoice/reference. No Telegram or inbound callback required."
  },
  "servers": [
    {
      "url": "https://glance.1puni.com"
    }
  ],
  "externalDocs": {
    "url": "https://glance.1puni.com/agents.txt"
  },
  "paths": {
    "/api/v1/methods": {
      "get": {
        "summary": "Configured rail availability, not an instruction to pay.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/api/v1/inquiries": {
      "post": {
        "summary": "Create one inquiry lifecycle scoped to your private capability; retry safely.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rail": {
                    "type": "string",
                    "enum": [
                      "bitcoin",
                      "solana"
                    ],
                    "description": "solana means Circle USDC on mainnet-beta, never native SOL for this interface."
                  }
                },
                "required": [
                  "rail"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}": {
      "get": {
        "summary": "Poll own inquiry/review, quote, payment verification and result. No Telegram required.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/rail": {
      "post": {
        "summary": "Choose a rail before quote issuance; fixed thereafter.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rail": {
                    "type": "string",
                    "enum": [
                      "bitcoin",
                      "solana"
                    ],
                    "description": "solana means Circle USDC on mainnet-beta, never native SOL for this interface."
                  }
                },
                "required": [
                  "rail"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/agreement": {
      "post": {
        "summary": "Acknowledge this exact current quote and its terms before sending funds.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/transaction": {
      "post": {
        "summary": "Submit the transaction ID or case-sensitive Solana signature, never a signing key.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "txid": {
                    "type": "string",
                    "maxLength": 128
                  }
                },
                "required": [
                  "txid"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/verification": {
      "post": {
        "summary": "Enqueue a canonical chain check; poll status. Matching service-issued inquiry payments (USDC invoice memo, or Bitcoin exact unique amount) are attributed automatically; other payments require protected attribution.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/project": {
      "post": {
        "summary": "Submit six project fields only after a reviewed paid inquiry. Response ref is the new review reference.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rail": {
                    "type": "string",
                    "enum": [
                      "bitcoin",
                      "solana"
                    ],
                    "description": "solana means Circle USDC on mainnet-beta, never native SOL for this interface."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "stage": {
                    "type": "string",
                    "enum": [
                      "ideation",
                      "in progress",
                      "suspected architectural mess"
                    ]
                  },
                  "purpose": {
                    "type": "string",
                    "maxLength": 1500
                  },
                  "questions": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "At most three question marks."
                  },
                  "access": {
                    "type": "string",
                    "maxLength": 600,
                    "description": "Authorized read-access link or written idea; URLs are never auto-fetched."
                  },
                  "revision": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "rail",
                  "name",
                  "stage",
                  "purpose",
                  "questions",
                  "access",
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/result-ack": {
      "post": {
        "summary": "Acknowledge retrieval after reading result; closes completed review.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/intakes/{ref}/deletion": {
      "post": {
        "summary": "Request protected retention/deletion review for this capability lifecycle; does not refund.",
        "security": [
          {
            "inquiryCapability": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^G-[0-9a-f]{16}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{8,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state. Replay returns current state for the original resource, not a stale cached response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intake"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "inquiryCapability": {
        "type": "http",
        "scheme": "bearer",
        "description": "Locally generate 32 random bytes, base64url without padding (43 characters). First inquiry creation registers its SHA-256 hash. Store capability privately; one capability owns one inquiry and its linked review. Never put it in URLs or public content. Loss is not recoverable through this API."
      }
    },
    "schemas": {
      "Intake": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "pattern": "^G-[0-9a-f]{16}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "inquiry",
              "review"
            ]
          },
          "requested_rail": {
            "type": "string",
            "enum": [
              "bitcoin",
              "solana"
            ],
            "description": "solana means Circle USDC on mainnet-beta, never native SOL for this interface."
          },
          "quote": {
            "type": [
              "object",
              "null"
            ],
            "description": "Exact scoped invoice. Inquiry invoices are issued automatically with fresh rates and validated receiver; full review quotes need personal acceptance. Null while dependencies are unavailable. Never pay before agreement; expired invoices must not be paid. An expired service-issued inquiry invoice without a submitted reference is replaced by a fresh one, up to 24 times: at once if unagreed; if agreed, two hours after expiry, so an on-time payment can still be submitted against it. The replacement resets agreement. A payment of a replaced invoice's amount or memo is never attributed automatically; submit its reference (after agreeing the current invoice) for protected review instead of paying again. Network fees are separate. No receiving addresses appear in this public contract.",
            "properties": {
              "automatic_inquiry": {
                "type": "boolean",
                "description": "True for a service-issued inquiry invoice. On Solana USDC, matching finalized invoice-memo settlement opens project submission automatically; on Bitcoin with automatic_attribution, a confirmed payment of exactly atomic_amount does. Absent on legacy/manual invoices and full review quotes."
              },
              "automatic_attribution": {
                "type": "string",
                "enum": [
                  "exact-unique-amount"
                ],
                "description": "Bitcoin service-issued inquiry invoices: atomic_amount is unique to this invoice. One confirmed transaction paying exactly that many sats to recipient, after agreement and by expiry, opens project submission automatically. Any other amount or timing awaits protected attribution review; never pay again to correct it. Absent on legacy/manual invoices."
              },
              "minimum_sats": {
                "type": "integer",
                "minimum": 1,
                "description": "US$5 minimum in whole sats at the fresh invoice rate, before the unique identifier offset."
              },
              "unique_sats_offset": {
                "type": "integer",
                "minimum": 1,
                "maximum": 999,
                "description": "Sats added to minimum_sats so no recent Bitcoin invoice shares this amount; atomic_amount = minimum_sats + unique_sats_offset. Credited like the rest of the received payment."
              },
              "rail": {
                "type": "string",
                "enum": [
                  "bitcoin",
                  "solana"
                ],
                "description": "solana means Circle USDC on mainnet-beta, never native SOL for this interface."
              },
              "network": {
                "type": "string",
                "enum": [
                  "bitcoin-mainnet",
                  "mainnet-beta"
                ]
              },
              "asset": {
                "type": "string",
                "enum": [
                  "BTC",
                  "USDC"
                ]
              },
              "recipient": {
                "type": "string",
                "description": "Configured BTC address or Solana receiving wallet, not the mint."
              },
              "mint": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "token_account": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exact USDC transfer destination; canonical ATA may be absent before the payer payment transaction. Do not substitute the wallet or mint."
              },
              "atomic_amount": {
                "type": "integer",
                "minimum": 0,
                "description": "Whole sats or USDC atomic units; parse JSON integers without floating-point loss."
              },
              "decimals": {
                "type": "integer",
                "enum": [
                  8,
                  6
                ]
              },
              "memo": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exact SPL memo required in the same Solana transaction. Bitcoin has no memo."
              },
              "terms": {
                "type": "string"
              },
              "expires": {
                "type": "number",
                "description": "Unix UTC seconds"
              },
              "agreed": {
                "type": "boolean"
              },
              "expired": {
                "type": "boolean",
                "description": "True after expires. For an automatic inquiry invoice, instructions and next say whether a fresh invoice is being issued; poll status, never pay the expired one."
              },
              "transfer_required": {
                "type": "boolean"
              },
              "instructions": {
                "type": "string"
              },
              "sats": {
                "type": "integer",
                "description": "BTC amount or fixed sats basis for USDC credit."
              },
              "total_sats": {
                "type": "integer"
              },
              "credit_sats": {
                "type": "integer"
              },
              "token_program": {
                "type": "string",
                "description": "Original SPL Token program; use for ATA derivation and transferChecked."
              },
              "associated_token_program": {
                "type": "string",
                "description": "Official Associated Token Account program."
              },
              "canonical_token_account": {
                "type": "string",
                "description": "Deterministic ATA from recipient, token_program and mint. Independently verify using an official Solana SDK."
              },
              "account_creation": {
                "type": "string",
                "description": "payer-idempotent: include idempotent receiver ATA creation first, even if already present. existing-only: configured noncanonical account must exist; omit creation.",
                "enum": [
                  "payer-idempotent",
                  "existing-only"
                ]
              },
              "fee_payer": {
                "type": "string",
                "description": "Sender pays ordinary transaction fees and any ATA creation rent in SOL separately; receiver needs no prefunding or test transaction."
              },
              "commitment": {
                "type": "string",
                "description": "Finalized transaction required before settlement can pass."
              },
              "transaction_order": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "ONE transaction: createAssociatedTokenAccountIdempotent if payer-idempotent, transferChecked exact atomic_amount with decimals 6, then exact SPL Memo. Stop if wallet cannot construct it. Estimate and approve ordinary fees before signing."
              }
            }
          },
          "closed": {
            "type": "boolean"
          },
          "accepted": {
            "type": "boolean"
          },
          "txid": {
            "type": [
              "string",
              "null"
            ]
          },
          "chain_result": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PASS",
              "FAIL",
              null
            ]
          },
          "verification_pending": {
            "type": "boolean"
          },
          "checked_at": {
            "type": [
              "number",
              "null"
            ]
          },
          "payment_attribution": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "automatic",
              "pending",
              "manual-review",
              null
            ],
            "description": "Service-issued inquiry invoices (Bitcoin exact unique amount, USDC invoice memo): automatic = claimed and project submission opened; pending = confirmations, finalization or chain evidence missing, re-checked automatically with backoff (2, 5, 10, 20, 30 minutes, then hourly) for up to 48 hours while verification_pending stays true, then manual-review; manual-review = amount, recipient, timing or claim did not match, protected payment attribution review decides (payment_reviewed shows the outcome). Null otherwise."
          },
          "payment_attribution_note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Plain reason for payment_attribution. Never an instruction to pay again."
          },
          "payment_reviewed": {
            "type": "boolean"
          },
          "project_submission_allowed": {
            "type": "boolean"
          },
          "inquiry_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "next": {
            "type": "string"
          },
          "result": {
            "type": [
              "object",
              "null"
            ],
            "description": "Four labelled verdict sections when ready: Refactor, Reprioritise, Commentary, Suggested work price and disposition."
          },
          "result_acknowledged": {
            "type": "boolean"
          },
          "review_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Linked review reference after project submission, also available from the inquiry."
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "Submitted exact revision/document set for this review."
          },
          "result_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC timestamp of committed result."
          }
        },
        "required": [
          "ref",
          "kind",
          "quote",
          "next"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string",
                "maxLength": 400
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Error400": {
        "description": "Malformed input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error401": {
        "description": "Missing or unknown private capability",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error404": {
        "description": "Unknown route",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error405": {
        "description": "Wrong method",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error409": {
        "description": "Ownership/state/field conflict or key reused with different request. No payment should be repeated.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error413": {
        "description": "Body exceeds 10000 bytes",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error415": {
        "description": "application/json required",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error429": {
        "description": "Rate/capacity limit; Retry-After seconds",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error503": {
        "description": "Unavailable or rail not configured; Retry-After seconds",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "x-limits": {
    "body_bytes": 10000,
    "http_requests_per_minute": 600,
    "client_requests_per_minute": 60,
    "new_capabilities_per_hour": 30,
    "clients_total": 10000,
    "idempotency_keys_per_client": 1000,
    "verification_interval_seconds": 60,
    "http_connection_timeout_seconds": 5,
    "http_concurrency": 1
  },
  "x-idempotency": "All POSTs require a private client-scoped key. Save the exact request and key before sending; retry both unchanged after uncertain response. Different payload/path with the same key returns 409. New keys never allocate a second inquiry or reuse paid entitlement under this credential. Keys persist until protected retention purge. No operator commands exist on this API."
}
