{
  "openapi": "3.0.3",
  "info": {
    "title": "Real Deals Snap",
    "version": "2.0.0",
    "description": "Real Deals Snap uses your existing account and saved properties. No paid provider calls or outreach are performed."
  },
  "servers": [
    {
      "url": "https://real-deals.app/api/v1"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Connector health",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/integrations": {
      "get": {
        "operationId": "integrations",
        "summary": "Connection setup and limitations",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/leads": {
      "get": {
        "operationId": "listLeads",
        "summary": "List private Snap leads",
        "security": [
          {
            "snapKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ]
      },
      "post": {
        "operationId": "createLead",
        "summary": "Create a private Snap lead",
        "security": [
          {
            "snapKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 240
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 80,
                    "default": "New Lead"
                  },
                  "note": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "tags": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 50
                    }
                  },
                  "source": {
                    "default": "Snap",
                    "type": "string",
                    "maxLength": 100
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "propertyType": {
                    "type": "string",
                    "enum": [
                      "Residential",
                      "Commercial"
                    ],
                    "default": "Residential"
                  }
                },
                "required": [
                  "address",
                  "latitude",
                  "longitude"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          }
        ]
      },
      "patch": {
        "operationId": "updateLead",
        "summary": "Update status or notes of a private lead",
        "security": [
          {
            "snapKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Poll recent private lead activity",
        "security": [
          {
            "snapKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ]
      }
    },
    "/calculate-offer": {
      "post": {
        "operationId": "calculateOffer",
        "summary": "Illustrative offer calculation from supplied inputs",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arv": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000000000
                  },
                  "repairs": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000000000
                  },
                  "purchasePrice": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000000000
                  },
                  "offerRatio": {
                    "default": 0.7,
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "fees": {
                    "default": 0,
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000000000
                  }
                },
                "required": [
                  "arv",
                  "repairs",
                  "offerRatio",
                  "fees"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/canva-brief": {
      "post": {
        "operationId": "canvaBrief",
        "summary": "Prepare a Canva brief and Bulk Create CSV",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 300
                  },
                  "headline": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "price": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "address",
                  "headline",
                  "description"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/calendar-file": {
      "post": {
        "operationId": "calendarFile",
        "summary": "Prepare an ICS appointment file",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "start": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "address": {
                    "default": "",
                    "type": "string",
                    "maxLength": 300
                  },
                  "note": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "title",
                  "start",
                  "end",
                  "address",
                  "note"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission required"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "snapKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Create a scoped, 30-day key at https://real-deals.app/snap/."
      }
    }
  }
}
