{
  "openapi": "3.1.0",
  "info": {
    "title": "Switchboard Finance API",
    "version": "2.0.5",
    "summary": "Check whether an Australian business-finance need fits, and request a licensed broker callback.",
    "description": "Business-finance routing for Australian self-employed borrowers and ABN holders. General information only; not a credit decision, offer or advice. Switchboard Finance Pty Ltd, Credit Representative 576702 of Australian Credit Licence 517192. Every enquiry is assessed by a licensed broker. The same capabilities are available over MCP at /mcp and A2A at /a2a.",
    "contact": {
      "name": "Switchboard Finance",
      "url": "https://www.switchboardfinance.com.au",
      "email": "hello@switchboardfinance.com.au"
    },
    "termsOfService": "https://www.switchboardfinance.com.au/privacy-policy",
    "x-logo": {
      "url": "/icon-512.png"
    }
  },
  "servers": [
    {
      "url": "https://api.switchboardfinance.com.au"
    }
  ],
  "externalDocs": {
    "url": "https://switchboard-agent-api.spring-cake-1609.workers.dev/docs"
  },
  "paths": {
    "/v1/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "Business-finance types with observed sizes, time to fund, LVR and rate ranges. No lender is named.",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "lane",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "caveat",
                "second-mortgage",
                "private-first",
                "commercial-property",
                "development",
                "overdraft",
                "business-loan",
                "bad-credit",
                "invoice",
                "asset",
                "accommodation"
              ]
            },
            "description": "Finance type id for full criteria; omit for a summary of all"
          }
        ],
        "responses": {
          "200": {
            "description": "Finance types, method and disclosure"
          },
          "304": {
            "description": "Not modified (ETag)"
          },
          "404": {
            "description": "Unknown lane, with valid_lanes"
          }
        }
      }
    },
    "/v1/eligibility": {
      "post": {
        "operationId": "checkFit",
        "summary": "Check whether a business-purpose finance scenario fits, which types apply, and LVR, size and timing checks. Not a credit decision.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fit, matching finance types with checks, questions to sharpen, next step and expected callback time"
          },
          "400": {
            "description": "Invalid input, with a problems list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Search published finance information; returns ids, titles and source URLs.",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results"
          },
          "400": {
            "description": "Invalid input, with a problems list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/documents/{id}": {
      "get": {
        "operationId": "fetchDocument",
        "summary": "Full text of one document from search, with its source URL.",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "lane:caveat"
          }
        ],
        "responses": {
          "200": {
            "description": "Document"
          },
          "404": {
            "description": "Not found, with valid_ids"
          }
        }
      }
    },
    "/v1/enquiry": {
      "post": {
        "operationId": "requestCallback",
        "summary": "With the borrower's explicit consent, send the scenario to a licensed broker. Returns a reference and expected contact time.",
        "x-openai-isConsequential": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "description": "Retries with the same key return the original result instead of a second enquiry"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Enquiry"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received or queued, with reference number, expected contact and consent expiry"
          },
          "400": {
            "description": "Invalid input, with a problems list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency key reused with different details"
          },
          "429": {
            "description": "Rate limited; see Retry-After",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "502": {
            "description": "Could not be delivered; phone 0483 980 567"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Service health and version",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "Model Context Protocol endpoint (JSON-RPC 2.0; protocol 2026-07-28 and 2025-11-25/06-18/03-26). Tools: check_fit, list_products, request_callback, search, fetch.",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          },
          "202": {
            "description": "Notification accepted"
          },
          "400": {
            "description": "Unsupported protocol version or header mismatch"
          }
        }
      }
    },
    "/a2a": {
      "post": {
        "operationId": "a2a",
        "summary": "Agent2Agent (A2A 1.0) JSON-RPC endpoint: SendMessage (message/send accepted). Agent card at /.well-known/agent-card.json.",
        "responses": {
          "200": {
            "description": "JSON-RPC response with a completed task"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Scenario": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "purpose": {
            "type": "string",
            "description": "What the funds are for"
          },
          "situation": {
            "type": "string",
            "description": "ATO debt, low doc, declined by a bank, urgency, credit issues"
          },
          "security": {
            "type": "string",
            "description": "Property, vehicle, equipment, or none"
          },
          "amount": {
            "type": "number",
            "description": "Amount sought in AUD"
          },
          "property_value": {
            "type": "number",
            "description": "Value of property offered as security, AUD"
          },
          "existing_debt": {
            "type": "number",
            "description": "Amount owed against that property, AUD"
          },
          "borrower_type": {
            "type": "string",
            "description": "company, trust, sole trader or partnership"
          },
          "trading_months": {
            "type": "integer",
            "description": "Months the ABN has traded"
          },
          "needed_within_days": {
            "type": "integer",
            "description": "How soon funds are needed"
          },
          "business_purpose": {
            "type": "boolean",
            "description": "False means personal or household purpose (out of scope)"
          }
        }
      },
      "Enquiry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "phone",
          "email",
          "scenario",
          "consent"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "description": "Australian number"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "scenario": {
            "type": "string",
            "minLength": 15
          },
          "consent": {
            "type": "boolean",
            "description": "True only if the borrower agreed: \"I agree to Switchboard Finance contacting me about this enquiry by phone, SMS and email, including follow-up emails I can unsubscribe from at any time.\""
          },
          "consent_method": {
            "type": "string",
            "enum": [
              "user_confirmed_in_chat",
              "user_ticked_checkbox_in_app",
              "user_submitted_form"
            ]
          },
          "notice_shown": {
            "type": "boolean",
            "description": "The collection notice was shown to the borrower"
          },
          "business_purpose": {
            "type": "boolean"
          },
          "business_name": {
            "type": "string"
          },
          "abn": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "agent_name": {
            "type": "string",
            "description": "Assistant submitting on the borrower's behalf"
          },
          "idempotency_key": {
            "type": "string"
          }
        }
      }
    }
  }
}