{
  "openapi": "3.1.0",
  "info": {
    "title": "Deal Run API",
    "description": "Run a real-estate deal from your own code or AI: **Details · Comps · Repairs · Max Offer · Package · Find Buyers · Blast**.\n\n**Auth.** Send `Authorization: Bearer <key>`. Keys start with `dr_live_` (real data, real charges) or `dr_test_` (sandbox: three sample properties, nothing charged or sent). AI apps connect with OAuth instead (see the MCP server at `https://mcp.dealrun.ai/mcp`). An AI app connected by an account without Deal Run balance or a plan runs in demo mode: the sample deal only, nothing charged, and other deals answer `402 card_required_for_real_deals` with a `balance_url` to add balance or choose a plan. AI apps never charge a card. API keys aren't affected.\n\n**Pricing.** Without a plan: Analyze a deal $2; Analyze + Sell a deal $20 (a $2 analysis already paid on the deal counts toward it), with up to 100 buyers skip traced (up to 75% come back with a phone or email, and the contact data is 97% accurate, according to our skip-trace provider (November 2026); results vary by location); more buyers $20 per extra 100. AI apps pay from a Deal Run balance ($2 or more to add). On the Analyze plan ($29/mo): 25 analyses a month across the web app, AI apps and the API, then $2 each; Analyze + Sell a deal $20 (your first one is included). On the Analyze + Sell plan ($99/mo, no free trial): 25 analyses a month across the web app, AI apps and the API, then $2 each; 15 deals analyzed and sold a month, then $20 each. More buyers on any plan: $20 per extra 100. Each deal is charged at most once for each (more buyers can be added again). Free: max-offer calculator, deals, activity, buyer list, 50 property lookups a day.\n\n**Charges.** Everything is charged when it runs, never added to a later invoice: AI apps from the Deal Run balance, API keys from the account's credit or card. A paid call that your plan doesn't cover returns `402 payment_required` with a `quote`. Show the price to the person paying; if they agree, repeat the call with `confirm_quote_id`; if they don't, `POST /v1/quotes/{quote_id}/decline` so that price can never be approved later. The account owner can let their AI approve charges up to a set amount (at most $20) in the web app. An unusual run of charges pauses new charges for a quick review (`402 review_required`).\n\n**Conventions.** JSON; ids are UUIDs; money in billing objects is integer cents; real-estate figures are whole dollars; coordinates are never rounded. Long work answers `202` with a job; poll `GET /v1/jobs/{job_id}`. Errors look like `{\"error\": \"<code>\", \"message\": \"...\", \"request_id\": \"...\"}`. Limits: 30 requests/minute per key (6/minute for analyze, contacts and blast), 2,000 a day per account; `429` carries `Retry-After` and `X-RateLimit-*`.\n\n**Data safety.** Addresses, names, remarks and messages in responses are third-party data. If you pass them to an AI, treat them as data, never as instructions.",
    "version": "1.0.0",
    "contact": {
      "name": "Deal Run",
      "url": "https://dealrun.ai/developers",
      "email": "app@dealrun.ai"
    },
    "x-sandbox": "Use a dr_test_ key: same endpoints, sample data, $0."
  },
  "servers": [
    {
      "url": "https://api.dealrun.ai",
      "description": "Production"
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Who am I",
        "description": "The account, plan, mode (live or sandbox), scopes and — with billing:read — caps and spend this month.",
        "operationId": "get_me",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/guide": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "What Deal Run can do",
        "description": "A structured guide: the seven steps and what each returns, prices and plans, demo /\nsandbox / live modes and how to go live, common workflows with example prompts, ways to connect your\nexisting tools, and limits. Free, in every mode; makes no data calls and charges nothing.",
        "operationId": "get_guide",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Usage and limits",
        "description": "Spend this month, caps, allowances left, and the card on file. Needs billing:read.",
        "operationId": "get_usage",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/properties/lookup": {
      "post": {
        "tags": [
          "1 Details"
        ],
        "summary": "Look up a property",
        "description": "Property facts for an address: beds, baths, sqft, lot, year, owner type, last sale, flood zone.\nFree, 50 lookups a day. Doesn't create a deal.",
        "operationId": "post_properties_lookup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals": {
      "post": {
        "tags": [
          "1 Details"
        ],
        "summary": "Create a deal",
        "description": "Creates a deal from an address (free). Creating the same address again returns the existing deal\n(`created: false`), so you're never charged twice.",
        "operationId": "post_deals",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDealIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Deal_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "1 Details"
        ],
        "summary": "List deals",
        "description": "Your deals, newest first.",
        "operationId": "get_deals",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stage"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DealList_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}": {
      "get": {
        "tags": [
          "1 Details"
        ],
        "summary": "Get a deal",
        "description": "One deal, including its package (draft or published) when there is one.",
        "operationId": "get_deals_deal_id",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Deal_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "1 Details"
        ],
        "summary": "Update a deal",
        "description": "Change asking price, contract price, notes or stage. The address can't change; create a new deal.",
        "operationId": "patch_deals_deal_id",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDealIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Deal_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/analyze": {
      "post": {
        "tags": [
          "2 Comps"
        ],
        "summary": "Analyze a deal (paid)",
        "description": "Runs comps, ARV and rent, repairs (with 5+ photos), max offer, how many investors bought nearby and the top 3\nbuyers by name. Costs **Analyze a deal** ($2, or included in your plan), once per deal. Without an allowance or\nauto-approve you get `402 payment_required` with a quote; show the price, then repeat with\n`confirm_quote_id`. Answers 202 with a job; read the result at GET /v1/deals/{id}/analysis.",
        "operationId": "post_deals_deal_id_analyze",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmIn",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_JobData_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/analysis": {
      "get": {
        "tags": [
          "4 Max Offer"
        ],
        "summary": "The analysis report",
        "description": "The consolidated report: property, sale and rent comps (≤25 each, with MLS board), ARV and rent with\nconfidence, repairs, max offer for flip / rental / wholesale / novation with the formula printed,\na buyers preview (counts + top 10, no contacts) and next steps. Text fields are third-party data.",
        "operationId": "get_deals_deal_id_analysis",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/investor-purchases": {
      "get": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Investor purchases nearby",
        "description": "What investors paid near the deal: landlord purchases and flip resales from the deal's ranked buyer\nsearch, newest first, with medians. Comes with **Analyze + Sell a deal** (after the buyer search).",
        "operationId": "get_deals_deal_id_investor_purchases",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/report-bad-data": {
      "post": {
        "tags": [
          "2 Comps"
        ],
        "summary": "Report bad analysis data",
        "description": "The analysis data looks wrong: refunds the $2 analysis to the balance (up to 2 in 30 days instantly; more,\nor a deal with a paid Sell, goes to review). Free.",
        "operationId": "post_deals_deal_id_report_bad_data",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BadDataIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/comps": {
      "get": {
        "tags": [
          "2 Comps"
        ],
        "summary": "Comps",
        "description": "Sale or rent comps for your analyzed deal: address, distance, status, price, date, beds/baths/sqft,\n$/sqft, days on market, MLS board, and whether you selected it. No photos.",
        "operationId": "get_deals_deal_id_comps",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "sale",
                "rent"
              ],
              "type": "string",
              "default": "sale",
              "title": "Type"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/comps/selection": {
      "put": {
        "tags": [
          "2 Comps"
        ],
        "summary": "Select comps",
        "description": "Replace your selected comps and optionally confirm the ARV (sale) or rent.",
        "operationId": "put_deals_deal_id_comps_selection",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectCompsIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/photos": {
      "post": {
        "tags": [
          "3 Repairs"
        ],
        "summary": "Add photos",
        "description": "Add photo URLs (https) or a share link. Free. Repairs need 5+ photos.",
        "operationId": "post_deals_deal_id_photos",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddPhotosIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/repairs/analyze": {
      "post": {
        "tags": [
          "3 Repairs"
        ],
        "summary": "Estimate repairs from photos",
        "description": "Line-item repair estimate from the deal's photos (5–100). Included in Analyze a deal; up to 5 runs per deal.",
        "operationId": "post_deals_deal_id_repairs_analyze",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepairsAnalyzeIn",
                "default": {
                  "force": false
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_JobData_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/repairs": {
      "get": {
        "tags": [
          "3 Repairs"
        ],
        "summary": "Get repairs",
        "description": "total, categories {roof, hvac, foundation, water_heater, electrical, kitchen, bathrooms, general_interior,\nexterior: {cost, enabled}}, custom_items, overhead_pct, the itemized scope, photos seen.",
        "operationId": "get_deals_deal_id_repairs",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "3 Repairs"
        ],
        "summary": "Adjust repairs",
        "description": "Change category costs, toggle categories, set custom items and overhead. The total is recomputed.",
        "operationId": "put_deals_deal_id_repairs",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRepairsIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/calculate/max-offer": {
      "post": {
        "tags": [
          "4 Max Offer"
        ],
        "summary": "Calculate max offer (free)",
        "description": "Max offer for flip, rental, wholesale and novation, each with its own settings and the formula printed.\nStateless with your numbers, or from a deal's analysis with `deal_id`. Free.",
        "operationId": "post_calculate_max_offer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaxOfferIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MaxOfferResult_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/package": {
      "post": {
        "tags": [
          "5 Package"
        ],
        "summary": "Create the package (draft)",
        "description": "Creates or updates the draft deal page: asking price, headline, pitch (written for you unless you\ngive one), photo order and the package sections (show or hide the numbers, comps, address; contact,\nclosing and walkthrough details). Returns a link that opens the PDF in Deal Run. Property facts are\nlocked. Free.",
        "operationId": "post_deals_deal_id_package",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackageIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/package/pdf": {
      "post": {
        "tags": [
          "5 Package"
        ],
        "summary": "Get the deal PDF",
        "description": "The deal package as a PDF: returns a download link that works for 7 days and the PDF's parts with\nwhether each is on. Change parts (`sections.pdf_*`, `show_numbers`, `include_comps`) or details with\n`POST /v1/deals/{deal_id}/package`, then call this again for a fresh link. Part of **Analyze + Sell a\ndeal** ($20, and a $2 analysis already paid on the deal counts toward it; included in plans), charged once per deal.",
        "operationId": "post_deals_deal_id_package_pdf",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmIn",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/package/publish": {
      "post": {
        "tags": [
          "5 Package"
        ],
        "summary": "Publish the deal page",
        "description": "Makes the deal page public and returns its URL. Part of **Analyze + Sell a deal** ($20, minus a $2 analysis\nalready paid on the deal; included in plans), charged once per deal. Refused (409\n`paperwork_photos_on_page`) while the package shows photos the photo check marked as paperwork, unless\n`keep_paperwork_photos` is true.",
        "operationId": "post_deals_deal_id_package_publish",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishIn",
                "default": {
                  "keep_paperwork_photos": false
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/package/unpublish": {
      "post": {
        "tags": [
          "5 Package"
        ],
        "summary": "Unpublish the deal page",
        "description": "Takes the public deal page down. The package stays saved; publishing again later costs nothing more. Free.",
        "operationId": "post_deals_deal_id_package_unpublish",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/buyers/search": {
      "post": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Search buyers",
        "description": "Investors who bought near the deal, ranked by Investor Score: entity, purchases, last purchase, price\nrange (one search + one radius expand). Part of **Analyze + Sell a deal** ($20, minus a $2 analysis already paid on the deal),\ncharged once per deal; contacts then come at no extra charge. The $2 analysis shows a free count and the\ntop 3 buyers by name.",
        "operationId": "post_deals_deal_id_buyers_search",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuyerSearchIn",
                "default": {
                  "expand": false,
                  "limit": 50
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/buyers/contacts": {
      "post": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Buyer contacts",
        "description": "Name, phones (mobile first), email and a contact grade for up to 100 buyers. Each phone carries a national\nDo Not Call flag (`dnc_national`). Contacts known to be litigators are never returned; the response only\ncounts them (`withheld_for_legal_risk`). Flags are informational and can be wrong. Part of **Analyze + Sell a deal**. If no\ncontacts are found, the charge is refunded.",
        "operationId": "post_deals_deal_id_buyers_contacts",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactsIn",
                "default": {
                  "limit": 100
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/buyers/more": {
      "post": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "100 more buyers ($20)",
        "description": "Adds 100 more buyers with contacts to a deal that already has its buyers ($20 each 100). Then call\nBuyer contacts with a higher `limit`; buyers already returned are never charged again.",
        "operationId": "post_deals_deal_id_buyers_more",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddBuyersIn",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/buyers": {
      "get": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Your buyer list",
        "description": "Your saved buyers (CRM). Phone and email need contacts:read. Buyers known to be litigators are never\nreturned (only counted).",
        "operationId": "get_buyers",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 50
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "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/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Save buyers",
        "description": "Add or update buyers in your list (matched by name).",
        "operationId": "post_buyers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveBuyersIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/buyers/{buyer_id}": {
      "patch": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Update a buyer",
        "description": "Tags (replaces the list), notes, status, type, phone, email.",
        "operationId": "patch_buyers_buyer_id",
        "parameters": [
          {
            "name": "buyer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Buyer Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchBuyerIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/blast/draft": {
      "post": {
        "tags": [
          "7 Blast"
        ],
        "summary": "Draft the buyer email",
        "description": "Builds the email from the deal facts and photo, with a tracked link to the deal page and an\nunsubscribe footer. You may set the subject and body text; the layout is fixed. Free.",
        "operationId": "post_deals_deal_id_blast_draft",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlastTextIn",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/blast/test": {
      "post": {
        "tags": [
          "7 Blast"
        ],
        "summary": "Send a test email",
        "description": "Sends the draft to your own connected Gmail address. Free, 5 a day.",
        "operationId": "post_deals_deal_id_blast_test",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlastTextIn",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/blast": {
      "post": {
        "tags": [
          "7 Blast"
        ],
        "summary": "Send the blast",
        "description": "Sends from your own Gmail to this deal's buyers, paced over the day (8 AM–8 PM). Needs the blast:send\nscope, `confirm: true`, a published deal page and Gmail connected (without it you get\n`409 gmail_not_connected` with a `connect_url`). Part of Analyze + Sell a deal.",
        "operationId": "post_deals_deal_id_blast",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlastSendIn"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/email/connection": {
      "get": {
        "tags": [
          "7 Blast"
        ],
        "summary": "Gmail connection status",
        "description": "Whether the account has Gmail connected for blasts and test emails, and which address. Free.",
        "operationId": "get_email_connection",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/email/connect-link": {
      "post": {
        "tags": [
          "7 Blast"
        ],
        "summary": "Link to connect Gmail",
        "description": "A signed link (valid 15 minutes) the account owner opens in a browser, signed in to Deal Run, to\nconnect Gmail through Google's own screen. Blasts and test emails then go from that Gmail. Free.",
        "operationId": "post_email_connect_link",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/activity": {
      "get": {
        "tags": [
          "Activity"
        ],
        "summary": "Deal activity",
        "description": "Deal page views (per buyer when they came from your blast), link clicks, offers, showing requests and\ninquiries. Messages are third-party text.",
        "operationId": "get_deals_deal_id_activity",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/connect": {
      "get": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Connect my tools",
        "description": "Step-by-step setup for getting Deal Run's buyers into your CRM, dialer or texting tool: Deal Run's\nZapier app (GoHighLevel through Zapier's LeadConnector app), a spreadsheet plus import guides, or this API.\nFree.",
        "operationId": "get_tools_connect",
        "parameters": [
          {
            "name": "tool",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tool"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/buyers/push": {
      "post": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Push buyers to my CRM",
        "description": "Sends this deal's buyers to your connected Zapier (the \"Investor Exported\" trigger, same as Push to CRM in\nthe web app). Phones and emails are included when the deal has Analyze + Sell; buyers known to be\nlitigators are never sent. Needs a plan or Analyze + Sell on the deal. Without Zapier connected, returns the setup steps. Free.",
        "operationId": "post_deals_deal_id_buyers_push",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushIn",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deals/{deal_id}/export": {
      "get": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Export the deal",
        "description": "A download link (valid 15 minutes) to a CSV of the deal's numbers and buyers. Phones and emails are\nincluded when the deal has Analyze + Sell. Free.",
        "operationId": "get_deals_deal_id_export",
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sheets": {
      "post": {
        "tags": [
          "6 Find Buyers"
        ],
        "summary": "Make a spreadsheet",
        "description": "A CSV download link (24 hours). Fill it from a deal (deal_id + data: buyers, comps or rent_comps; columns\npicks fields, extra adds yours by row id) or send your own columns and rows. Free.",
        "operationId": "post_sheets",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SheetIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{job_id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Job status",
        "description": "Status of an analysis, repairs or blast job. Poll every `poll_after_s` seconds until `done`.",
        "operationId": "get_jobs_job_id",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Job_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/charges": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Charges",
        "description": "Per-deal charges and refunds, newest first. Needs billing:read.",
        "operationId": "get_billing_charges",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "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/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/limits": {
      "put": {
        "tags": [
          "Billing"
        ],
        "summary": "Lower the auto-approve amount",
        "description": "Lower the amount your AI or script may spend without a quote confirmation. Raising it is only possible\nin the web app.",
        "operationId": "put_billing_limits",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LimitsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes/{quote_id}/decline": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Decline a price",
        "description": "The user said no to a price from a `402 payment_required`. Nothing is charged, and that quote can never\nbe confirmed afterwards (ask again for a new price).",
        "operationId": "post_quotes_quote_id_decline",
        "parameters": [
          {
            "name": "quote_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Quote Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Loose_"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key/token (unauthorized).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (with a quote), card_required, payment_failed or review_required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing or account_inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "not_found (also returned for deals you don't own).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "conflict or quote_invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; see Retry-After and X-RateLimit-* headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddBuyersIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          }
        },
        "type": "object",
        "title": "AddBuyersIn"
      },
      "AddPhotosIn": {
        "properties": {
          "urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Urls",
            "description": "https image URLs (max 20 MB each, 100 per deal)."
          },
          "share_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Share Link",
            "description": "A Dropbox, Google Drive, SharinPix or iCloud share link."
          }
        },
        "type": "object",
        "title": "AddPhotosIn"
      },
      "BadDataIn": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 3,
            "title": "Reason",
            "description": "What's wrong with the analysis data."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "BadDataIn"
      },
      "BlastSendIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 150
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject",
            "description": "Plain text. Default: address and price."
          },
          "body_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Body Text",
            "description": "Plain text; blank lines start paragraphs. No HTML."
          },
          "confirm": {
            "type": "boolean",
            "title": "Confirm",
            "description": "Must be true. Show the user the subject and recipient count first.",
            "default": false
          },
          "buyer_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Buyer Ids",
            "description": "Default: every traced buyer on this deal with an email."
          },
          "extra_emails": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Emails",
            "description": "Up to 25 addresses that aren't this deal's buyers or in your buyer list."
          }
        },
        "type": "object",
        "title": "BlastSendIn"
      },
      "BlastTextIn": {
        "properties": {
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 150
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject",
            "description": "Plain text. Default: address and price."
          },
          "body_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Body Text",
            "description": "Plain text; blank lines start paragraphs. No HTML."
          }
        },
        "type": "object",
        "title": "BlastTextIn"
      },
      "BuyerIn": {
        "properties": {
          "investor_name": {
            "type": "string",
            "maxLength": 200,
            "title": "Investor Name"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "investor_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "landlord",
                  "flipper"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Investor Type"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "required": [
          "investor_name"
        ],
        "title": "BuyerIn"
      },
      "BuyerSearchIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          },
          "expand": {
            "type": "boolean",
            "title": "Expand",
            "description": "Widen the radius once per deal.",
            "default": false
          },
          "limit": {
            "type": "integer",
            "maximum": 250.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 50
          }
        },
        "type": "object",
        "title": "BuyerSearchIn"
      },
      "ChargeInfo": {
        "properties": {
          "unit": {
            "type": "string",
            "title": "Unit",
            "description": ""
          },
          "source": {
            "type": "string",
            "title": "Source",
            "description": "already_owned | allowance | charge | pending_invoice | sandbox"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents"
          },
          "remaining_allowance": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Allowance"
          },
          "live_price_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Live Price Cents",
            "description": "Sandbox only: what this would cost with a live key."
          }
        },
        "type": "object",
        "required": [
          "unit",
          "source",
          "charged_cents"
        ],
        "title": "ChargeInfo"
      },
      "ConfirmIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          }
        },
        "type": "object",
        "title": "ConfirmIn"
      },
      "ContactsIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          },
          "buyer_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Buyer Ids",
            "description": "Default: the top buyers by Investor Score."
          },
          "limit": {
            "type": "integer",
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Limit",
            "description": "Up to the deal's cap: 100, plus 100 for each add_buyers block ($20 each).",
            "default": 100
          }
        },
        "type": "object",
        "title": "ContactsIn"
      },
      "CreateDealIn": {
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 200,
            "title": "Address",
            "description": "Full street address. The same address twice returns the existing deal.",
            "examples": [
              "1427 Maple Glen Dr, Houston, TX 77088"
            ]
          },
          "asking_price": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Asking Price",
            "description": "Your asking price to buyers, whole dollars."
          },
          "contract_price": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Price",
            "description": "Your contract price with the seller, whole dollars."
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "required": [
          "address"
        ],
        "title": "CreateDealIn"
      },
      "CustomItem": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "title": "Name"
          },
          "cost": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cost"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "name",
          "cost"
        ],
        "title": "CustomItem"
      },
      "Deal": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "deal_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Number"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "zip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip"
          },
          "lat": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lat",
            "description": "Full precision, never rounded."
          },
          "lng": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lng",
            "description": "Full precision, never rounded."
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "asking_price": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asking Price"
          },
          "analysis_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Status"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Deal"
      },
      "DealList": {
        "properties": {
          "deals": {
            "items": {
              "$ref": "#/components/schemas/Deal"
            },
            "type": "array",
            "title": "Deals"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "deals",
          "total",
          "limit",
          "offset"
        ],
        "title": "DealList"
      },
      "Envelope_DealList_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DealList"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents",
            "description": "Charged to your card by this call, in cents.",
            "default": 0
          },
          "units": {
            "type": "integer",
            "title": "Units",
            "description": "Paid units consumed by this call (0 when the deal already had it).",
            "default": 0
          },
          "sandbox": {
            "type": "boolean",
            "title": "Sandbox",
            "description": "True for dr_test_ keys: sample data, nothing charged or sent."
          },
          "charge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChargeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NextStep"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Steps"
          }
        },
        "type": "object",
        "required": [
          "data",
          "sandbox"
        ],
        "title": "Envelope[DealList]"
      },
      "Envelope_Deal_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Deal"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents",
            "description": "Charged to your card by this call, in cents.",
            "default": 0
          },
          "units": {
            "type": "integer",
            "title": "Units",
            "description": "Paid units consumed by this call (0 when the deal already had it).",
            "default": 0
          },
          "sandbox": {
            "type": "boolean",
            "title": "Sandbox",
            "description": "True for dr_test_ keys: sample data, nothing charged or sent."
          },
          "charge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChargeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NextStep"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Steps"
          }
        },
        "type": "object",
        "required": [
          "data",
          "sandbox"
        ],
        "title": "Envelope[Deal]"
      },
      "Envelope_JobData_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/JobData"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents",
            "description": "Charged to your card by this call, in cents.",
            "default": 0
          },
          "units": {
            "type": "integer",
            "title": "Units",
            "description": "Paid units consumed by this call (0 when the deal already had it).",
            "default": 0
          },
          "sandbox": {
            "type": "boolean",
            "title": "Sandbox",
            "description": "True for dr_test_ keys: sample data, nothing charged or sent."
          },
          "charge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChargeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NextStep"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Steps"
          }
        },
        "type": "object",
        "required": [
          "data",
          "sandbox"
        ],
        "title": "Envelope[JobData]"
      },
      "Envelope_Job_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Job"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents",
            "description": "Charged to your card by this call, in cents.",
            "default": 0
          },
          "units": {
            "type": "integer",
            "title": "Units",
            "description": "Paid units consumed by this call (0 when the deal already had it).",
            "default": 0
          },
          "sandbox": {
            "type": "boolean",
            "title": "Sandbox",
            "description": "True for dr_test_ keys: sample data, nothing charged or sent."
          },
          "charge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChargeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NextStep"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Steps"
          }
        },
        "type": "object",
        "required": [
          "data",
          "sandbox"
        ],
        "title": "Envelope[Job]"
      },
      "Envelope_Loose_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Loose"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents",
            "description": "Charged to your card by this call, in cents.",
            "default": 0
          },
          "units": {
            "type": "integer",
            "title": "Units",
            "description": "Paid units consumed by this call (0 when the deal already had it).",
            "default": 0
          },
          "sandbox": {
            "type": "boolean",
            "title": "Sandbox",
            "description": "True for dr_test_ keys: sample data, nothing charged or sent."
          },
          "charge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChargeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NextStep"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Steps"
          }
        },
        "type": "object",
        "required": [
          "data",
          "sandbox"
        ],
        "title": "Envelope[Loose]"
      },
      "Envelope_MaxOfferResult_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MaxOfferResult"
          },
          "charged_cents": {
            "type": "integer",
            "title": "Charged Cents",
            "description": "Charged to your card by this call, in cents.",
            "default": 0
          },
          "units": {
            "type": "integer",
            "title": "Units",
            "description": "Paid units consumed by this call (0 when the deal already had it).",
            "default": 0
          },
          "sandbox": {
            "type": "boolean",
            "title": "Sandbox",
            "description": "True for dr_test_ keys: sample data, nothing charged or sent."
          },
          "charge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChargeInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NextStep"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Steps"
          }
        },
        "type": "object",
        "required": [
          "data",
          "sandbox"
        ],
        "title": "Envelope[MaxOfferResult]"
      },
      "ErrorBody": {
        "properties": {
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Stable machine code, e.g. payment_required, scope_missing, not_found, rate_limited."
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "quote": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote",
            "description": "On payment_required: the price and how to confirm."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "error",
          "message",
          "request_id"
        ],
        "title": "ErrorBody"
      },
      "FinancingIn": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "cash",
              "hard_money",
              "conventional"
            ],
            "title": "Type",
            "default": "hard_money"
          },
          "interest_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interest Rate",
            "description": "% per year (flip default 10, rental default 7)."
          },
          "points": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Points"
          },
          "ltv": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ltv"
          },
          "ltc": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ltc"
          }
        },
        "type": "object",
        "title": "FinancingIn"
      },
      "FlipRentalIn": {
        "properties": {
          "margin_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Margin Percent",
            "description": "% of ARV (default 80)."
          },
          "financing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FinancingIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "holding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HoldingIn"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "FlipRentalIn"
      },
      "HoldingIn": {
        "properties": {
          "rehab_months": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rehab Months"
          },
          "marketing_months": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Marketing Months"
          },
          "monthly_taxes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Taxes"
          },
          "monthly_insurance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Insurance"
          },
          "monthly_utilities": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Utilities"
          },
          "monthly_hoa": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Hoa"
          },
          "closing_costs_buy_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closing Costs Buy Pct"
          },
          "closing_costs_sell_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closing Costs Sell Pct"
          }
        },
        "type": "object",
        "title": "HoldingIn"
      },
      "Job": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id",
            "examples": [
              "job_analysis_0b6d3d1e-2f4a-4c55-9a7e-3d2f8a1c9b10"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "analysis",
              "repairs",
              "contacts",
              "blast"
            ],
            "title": "Kind"
          },
          "deal_id": {
            "type": "string",
            "title": "Deal Id"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "not_started | pending | running | completed | failed | canceled"
          },
          "done": {
            "type": "boolean",
            "title": "Done"
          },
          "poll_after_s": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Poll After S"
          },
          "progress": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "Where to read the result when done."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "job_id",
          "kind",
          "deal_id",
          "status",
          "done"
        ],
        "title": "Job"
      },
      "JobData": {
        "properties": {
          "job": {
            "$ref": "#/components/schemas/Job"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "job"
        ],
        "title": "JobData"
      },
      "LimitsIn": {
        "properties": {
          "auto_approve_under_cents": {
            "type": "integer",
            "maximum": 2000.0,
            "minimum": 0.0,
            "title": "Auto Approve Under Cents",
            "description": "Charges up to this amount don't need a quote confirmation. Can only be lowered over the API."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "auto_approve_under_cents"
        ],
        "title": "LimitsIn"
      },
      "LookupIn": {
        "properties": {
          "address": {
            "type": "string",
            "maxLength": 200,
            "title": "Address",
            "description": "Full street address.",
            "examples": [
              "1427 Maple Glen Dr, Houston, TX 77088"
            ]
          }
        },
        "type": "object",
        "required": [
          "address"
        ],
        "title": "LookupIn"
      },
      "Loose": {
        "properties": {},
        "additionalProperties": true,
        "type": "object",
        "title": "Loose"
      },
      "MaxOfferIn": {
        "properties": {
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id",
            "description": "Use a deal's analysis; the other fields then override it."
          },
          "arv": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arv",
            "examples": [
              230000
            ]
          },
          "repairs": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repairs",
            "examples": [
              45000
            ]
          },
          "arr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arr",
            "description": "Monthly rent.",
            "examples": [
              1850
            ]
          },
          "asking_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asking Price",
            "description": "Your purchase price; profit math falls back to the max offer."
          },
          "annual_tax_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annual Tax Amount"
          },
          "hoa_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hoa Fee"
          },
          "hoa_frequency": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly",
                  "annually"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Hoa Frequency"
          },
          "flip": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlipRentalIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "rental": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlipRentalIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "wholesale": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WholesaleIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "novation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NovationIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "smart_carry": {
            "type": "boolean",
            "title": "Smart Carry",
            "description": "Rehab months from repairs ($30K/month), marketing months from days on market.",
            "default": false
          },
          "subject_dom": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Dom"
          }
        },
        "type": "object",
        "title": "MaxOfferIn"
      },
      "MaxOfferResult": {
        "properties": {
          "flip": {
            "$ref": "#/components/schemas/Strategy"
          },
          "rental": {
            "$ref": "#/components/schemas/Strategy"
          },
          "wholesale": {
            "$ref": "#/components/schemas/Strategy"
          },
          "novation": {
            "$ref": "#/components/schemas/Strategy"
          },
          "repairs_used": {
            "type": "number",
            "title": "Repairs Used"
          },
          "assumptions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Assumptions"
          }
        },
        "type": "object",
        "required": [
          "flip",
          "rental",
          "wholesale",
          "novation",
          "repairs_used",
          "assumptions"
        ],
        "title": "MaxOfferResult"
      },
      "NextStep": {
        "properties": {
          "step": {
            "type": "string",
            "title": "Step",
            "description": "What to do next."
          },
          "tool": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool",
            "description": "The MCP tool for it."
          },
          "rest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rest",
            "description": "The REST call for it."
          },
          "price_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Cents",
            "description": "What it costs, in cents (0 = free or included)."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "step"
        ],
        "title": "NextStep"
      },
      "NovationIn": {
        "properties": {
          "novation_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Novation Fee"
          },
          "listing_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Listing Price",
            "description": "Defaults to the ARV."
          },
          "closing_costs_sell_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closing Costs Sell Pct"
          }
        },
        "type": "object",
        "title": "NovationIn"
      },
      "PackageIn": {
        "properties": {
          "asking_price": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Asking Price"
          },
          "headline": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Headline"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Your pitch. Omit to have one written for you."
          },
          "photo_order": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Photo Order",
            "description": "Photo URLs in display order."
          },
          "sections": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sections",
            "description": "Package parts to add, remove or fill in: show_numbers (\"full\" or \"asking_only\"), include_comps, hide_address, video_url, contact_phone, contact_email, closing_date, walkthrough_date, occupancy, access_instructions, title_company, earnest_money, proof_of_funds_required. Saved on the deal page, the PDF and the blast. PDF-only parts: pdf_photos, pdf_description, pdf_repairs, pdf_location, pdf_terms, pdf_contact (true/false)."
          },
          "keep_paperwork_photos": {
            "type": "boolean",
            "title": "Keep Paperwork Photos",
            "description": "Show photos the photo check marked as paperwork even though the deal page is public (the user said to keep them).",
            "default": false
          }
        },
        "type": "object",
        "title": "PackageIn"
      },
      "PatchBuyerIn": {
        "properties": {
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags",
            "description": "Replaces the buyer's tags."
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "active",
                  "inactive",
                  "do_not_contact"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "investor_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "landlord",
                  "flipper"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Investor Type"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "title": "PatchBuyerIn"
      },
      "PublishIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          },
          "keep_paperwork_photos": {
            "type": "boolean",
            "title": "Keep Paperwork Photos",
            "description": "Publish even though the package shows photos the photo check marked as paperwork (the user said to keep them).",
            "default": false
          }
        },
        "type": "object",
        "title": "PublishIn"
      },
      "PushIn": {
        "properties": {
          "buyer_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 250
              },
              {
                "type": "null"
              }
            ],
            "title": "Buyer Ids",
            "description": "Default: all of the deal's buyers."
          },
          "tool": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool",
            "description": "Your CRM, for setup steps if Zapier isn't connected."
          }
        },
        "type": "object",
        "title": "PushIn"
      },
      "RepairCategory": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "type": "object",
        "title": "RepairCategory"
      },
      "RepairsAnalyzeIn": {
        "properties": {
          "confirm_quote_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Quote Id",
            "description": "The quote_id from a payment_required error. Only send it after the user approved the price."
          },
          "force": {
            "type": "boolean",
            "title": "Force",
            "description": "Re-run even if an estimate exists (up to 5 runs per deal).",
            "default": false
          }
        },
        "type": "object",
        "title": "RepairsAnalyzeIn"
      },
      "SaveBuyersIn": {
        "properties": {
          "buyers": {
            "items": {
              "$ref": "#/components/schemas/BuyerIn"
            },
            "type": "array",
            "maxItems": 500,
            "minItems": 1,
            "title": "Buyers"
          }
        },
        "type": "object",
        "required": [
          "buyers"
        ],
        "title": "SaveBuyersIn"
      },
      "SelectCompsIn": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "sale",
              "rent"
            ],
            "title": "Type"
          },
          "comp_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Comp Ids",
            "description": "Comp ids from GET /v1/deals/{id}/comps. Replaces the selection."
          },
          "confirm_value": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Value",
            "description": "Confirm your ARV (sale) or monthly rent (rent), whole dollars."
          }
        },
        "type": "object",
        "required": [
          "type",
          "comp_ids"
        ],
        "title": "SelectCompsIn"
      },
      "SetRepairsIn": {
        "properties": {
          "categories": {
            "additionalProperties": {
              "$ref": "#/components/schemas/RepairCategory"
            },
            "propertyNames": {
              "enum": [
                "roof",
                "hvac",
                "foundation",
                "water_heater",
                "electrical",
                "kitchen",
                "bathrooms",
                "general_interior",
                "exterior"
              ]
            },
            "type": "object",
            "title": "Categories"
          },
          "custom_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CustomItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Items"
          },
          "overhead_pct": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 30.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhead Pct"
          }
        },
        "type": "object",
        "title": "SetRepairsIn"
      },
      "SheetIn": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 60,
            "title": "Title"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "data": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "buyers",
                  "comps",
                  "rent_comps"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "columns": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Columns"
          },
          "rows": {
            "anyOf": [
              {
                "items": {
                  "items": {},
                  "type": "array"
                },
                "type": "array",
                "maxItems": 5000
              },
              {
                "type": "null"
              }
            ],
            "title": "Rows"
          },
          "extra": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 5000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          },
          "only_with_contacts": {
            "type": "boolean",
            "title": "Only With Contacts",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "SheetIn"
      },
      "Strategy": {
        "properties": {
          "strategy": {
            "type": "string",
            "enum": [
              "flip",
              "rental",
              "wholesale",
              "novation"
            ],
            "title": "Strategy"
          },
          "available": {
            "type": "boolean",
            "title": "Available"
          },
          "max_offer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Offer",
            "description": "Whole dollars."
          },
          "profit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profit"
          },
          "roi": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roi",
            "description": "Percent; 999 means no cash in (infinite)."
          },
          "cash_needed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cash Needed"
          },
          "formula": {
            "type": "string",
            "title": "Formula",
            "description": "The arithmetic with your numbers substituted."
          },
          "inputs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Inputs"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details",
            "default": {}
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "strategy",
          "available",
          "formula",
          "inputs"
        ],
        "title": "Strategy"
      },
      "UpdateDealIn": {
        "properties": {
          "asking_price": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Asking Price"
          },
          "contract_price": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Price"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "analyzing",
                  "building_package",
                  "marketing",
                  "under_contract",
                  "closed",
                  "dead"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          }
        },
        "type": "object",
        "title": "UpdateDealIn"
      },
      "WholesaleIn": {
        "properties": {
          "sales_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sales Percent",
            "description": "End buyer's % of ARV (default 75)."
          },
          "assignment_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignment Fee",
            "description": "Your fee (default 15000)."
          }
        },
        "type": "object",
        "title": "WholesaleIn"
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "dr_live_… / dr_test_… API key",
        "description": "API key from your Deal Run account (Account → API)."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 authorization code with PKCE (S256 required) and dynamic client registration at /oauth/register. Used by AI apps for the MCP server.",
        "x-pkce-required": true,
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.dealrun.ai/oauth/authorize",
            "tokenUrl": "https://api.dealrun.ai/oauth/token",
            "refreshUrl": "https://api.dealrun.ai/oauth/token",
            "scopes": {
              "analysis:run": "Analyze deals (spends money: Analyze a deal).",
              "billing:read": "See spend, plan usage and charges.",
              "blast:send": "Send blasts from your Gmail. Off unless you turn it on.",
              "buyers:read": "Ranked buyers without contacts.",
              "contacts:read": "Buyer phones and emails (spends money: Analyze + Sell a deal).",
              "deals:read": "Read deals, analysis, comps, repairs and activity.",
              "deals:write": "Create and update deals, photos, repairs, comp selections and your buyer list.",
              "package:publish": "Publish deal pages (spends money: Analyze + Sell a deal).",
              "package:write": "Build the deal page draft and send test emails.",
              "webhooks:write": "Manage webhooks (coming soon)."
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "Who you are, plan, limits."
    },
    {
      "name": "1 Details",
      "description": "Look up a property and create deals."
    },
    {
      "name": "2 Comps",
      "description": "Analyze a deal; sale and rent comps."
    },
    {
      "name": "3 Repairs",
      "description": "Photos and the repair estimate."
    },
    {
      "name": "4 Max Offer",
      "description": "The analysis report and the max-offer calculator."
    },
    {
      "name": "5 Package",
      "description": "The deal page: draft and publish."
    },
    {
      "name": "6 Find Buyers",
      "description": ""
    },
    {
      "name": "7 Blast",
      "description": "Draft, test and send the buyer email from your Gmail."
    },
    {
      "name": "Activity",
      "description": "Views, clicks, offers, showings, inquiries."
    },
    {
      "name": "Jobs",
      "description": "Status of long-running work."
    },
    {
      "name": "Billing",
      "description": "Charges and plan usage."
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {
      "oauth2": [
        "analysis:run",
        "billing:read",
        "buyers:read",
        "contacts:read",
        "deals:read",
        "deals:write",
        "package:publish",
        "package:write",
        "webhooks:write"
      ]
    }
  ]
}
