{
  "openapi": "3.1.0",
  "info": {
    "title": "California Insurance",
    "version": "0.4.0",
    "description": "California Insurance: Indicative US personal auto insurance prices for AI agents acting on behalf of a consumer in California, and a consented path to licensed agents. Call /v1/eligibility first. Read /v1/terms for the consent wording before /v1/contact.",
    "x-consent-version": "v1",
    "x-vertical": "auto-insurance"
  },
  "servers": [
    {
      "url": "https://californiacarquotes.com"
    }
  ],
  "security": [],
  "paths": {
    "/v1/eligibility": {
      "post": {
        "summary": "Can we answer in this state, and how many licensed agents can take it",
        "operationId": "check_eligibility",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "description": "Two-letter US state code, e.g. NV"
                  },
                  "product": {
                    "type": "string",
                    "enum": [
                      "auto"
                    ],
                    "default": "auto"
                  }
                },
                "required": [
                  "product"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "More facts needed — body.elicitation says exactly what"
          }
        }
      }
    },
    "/v1/quotes": {
      "post": {
        "summary": "indicative prices from the facts (only where licensed; otherwise the request is registered and a quote_id returned)",
        "operationId": "get_quotes",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "garaging_zip": {
                    "type": "string",
                    "description": "Five-digit ZIP where the vehicle is kept"
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date"
                  },
                  "years_licensed": {
                    "type": "integer"
                  },
                  "vehicle_year": {
                    "type": "integer"
                  },
                  "vehicle_make_model": {
                    "type": "string"
                  },
                  "annual_mileage": {
                    "type": "integer"
                  },
                  "violations_3yr": {
                    "type": "integer"
                  },
                  "coverage": {
                    "type": "string",
                    "enum": [
                      "state minimum",
                      "standard",
                      "full"
                    ]
                  },
                  "prior_continuous": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string",
                    "description": "Optional; derived from the ZIP when absent"
                  }
                },
                "required": [
                  "garaging_zip",
                  "date_of_birth",
                  "vehicle_year",
                  "vehicle_make_model",
                  "coverage"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "More facts needed — body.elicitation says exactly what"
          }
        }
      }
    },
    "/v1/contact": {
      "post": {
        "summary": "With the consumer's explicit consent, connect them with up to 4 licensed agents",
        "operationId": "request_agent_contact",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "description": "From get_quotes"
                  },
                  "full_name": {
                    "type": "string"
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "US mobile or landline"
                  },
                  "email_address": {
                    "type": "string"
                  },
                  "preferred_channel": {
                    "type": "string",
                    "enum": [
                      "phone",
                      "sms",
                      "email"
                    ]
                  },
                  "best_time": {
                    "type": "string"
                  },
                  "street_address": {
                    "type": "string",
                    "description": "Optional. Lets a licensed agent answer firm."
                  },
                  "verify_token": {
                    "type": "string",
                    "description": "Optional. From POST /v1/verify/check after the consumer enters the code texted to them. A verified number sells at the verified price and is contacted first."
                  },
                  "consent": {
                    "type": "object",
                    "properties": {
                      "granted": {
                        "type": "boolean",
                        "description": "true only if the human agreed to the presented text"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "contact_consumer",
                          "sell_identity"
                        ],
                        "default": "contact_consumer"
                      },
                      "text": {
                        "type": "string",
                        "description": "The exact words the consumer agreed to"
                      },
                      "version": {
                        "type": "string",
                        "description": "Or \"v1\" to adopt our standard text from data_use_terms"
                      },
                      "evidence": {
                        "type": "object",
                        "description": "Optional proof, e.g. a call recording id",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "required": [
                      "granted"
                    ]
                  }
                },
                "required": [
                  "quote_id",
                  "full_name",
                  "phone_number",
                  "consent"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "More facts needed — body.elicitation says exactly what"
          }
        }
      }
    },
    "/v1/terms": {
      "get": {
        "summary": "Data-use terms and the consent text to present verbatim",
        "operationId": "data_use_terms",
        "x-openai-isConsequential": false,
        "responses": {
          "200": {
            "description": "Terms"
          }
        }
      }
    },
    "/v1/verify/start": {
      "post": {
        "summary": "Text a one-time code to the consumer's phone (prove the number before it is sold)",
        "operationId": "verify_start",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone_number": {
                    "type": "string"
                  }
                },
                "required": [
                  "phone_number"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Code sent"
          },
          "503": {
            "description": "Verification not configured on this deployment"
          }
        }
      }
    },
    "/v1/verify/check": {
      "post": {
        "summary": "Check the code; returns a verify_token to pass with the contact request",
        "operationId": "verify_check",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone_number": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "phone_number",
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified; body.token"
          },
          "400": {
            "description": "Wrong or expired code"
          }
        }
      }
    },
    "/consent-record/{lead_id}": {
      "get": {
        "summary": "The signed consent certificate for a lead (link is on every delivered lead); JSON with Accept: application/json",
        "operationId": "consent_record",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exp",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sig",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Certificate"
          },
          "403": {
            "description": "Bad signature"
          },
          "410": {
            "description": "Link expired"
          }
        }
      }
    },
    "/v1/forget": {
      "post": {
        "summary": "Revoke a request or lead by id",
        "operationId": "forget",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Forgotten"
          },
          "404": {
            "description": "Unknown id"
          }
        }
      }
    },
    "/v1/benchmark": {
      "get": {
        "summary": "Demand benchmark: how many requests, and the lowest indicative monthly price (p25/median/p75) for a state and coverage over 90 days. Aggregate only. Paid per call over x402 when payments are configured.",
        "operationId": "benchmark",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coverage",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "state minimum",
                "standard",
                "full"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Benchmark"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        }
      }
    },
    "/v1/prices": {
      "get": {
        "summary": "Price list and every payment method this deployment honours (x402, MPP, AP2, pay-per-crawl, prepaid credits, invoicing)",
        "operationId": "prices",
        "x-openai-isConsequential": false,
        "responses": {
          "200": {
            "description": "Prices"
          }
        }
      }
    },
    "/v1/pull": {
      "get": {
        "summary": "Buyer pull of routed records (X-Buyer-Key). Metered and prepaid buyers receive HTTP 402 with every accepted payment method until paid.",
        "operationId": "pull_requests",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "X-Buyer-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Records"
          },
          "401": {
            "description": "Unknown key"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        }
      }
    }
  }
}