{
  "openapi": "3.1.0",
  "info": {
    "title": "Hive Inspect API",
    "version": "1.0.0",
    "description": "Connect other tools to your Hive Inspect contacts, inspections and events."
  },
  "components": {
    "schemas": {
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "cc_email": {
            "type": [
              "string",
              "null"
            ],
            "description": "One or more CC email addresses, separated by commas (up to 10)"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "business_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO-2, e.g. US or CA"
          },
          "birthday": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "social": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Distinct roles this contact has had on inspections"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "photo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed link, valid for 1 hour"
          },
          "agency_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The agency (brokerage) this contact is linked to, from /v1/agencies. Null when agency_name is plain text."
          },
          "uses_agency_address": {
            "type": "boolean",
            "description": "true: the contact's address follows the agency's address"
          },
          "agency": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The linked agency, when there is one"
          }
        },
        "example": {
          "id": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
          "first_name": "Dana",
          "last_name": "Reyes",
          "email": "dana@example.com",
          "cc_email": null,
          "phone": "(512) 555-0142",
          "business_name": null,
          "agency_name": "Lone Star Realty",
          "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
          "agency": {
            "id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
            "name": "Lone Star Realty",
            "phone": "(512) 555-0100",
            "website": "https://lonestarrealty.example.com"
          },
          "uses_agency_address": true,
          "address": "410 Oak St",
          "address_line2": null,
          "city": "Austin",
          "state": "TX",
          "zip": "78701",
          "country": "US",
          "birthday": "1988-04-12",
          "website": null,
          "social": null,
          "notes": "Prefers text messages",
          "photo_url": "https://files.example.com/signed-link-valid-for-1-hour",
          "tags": [
            {
              "id": "5a1d9c3e-2b7f-4f0a-8c6d-1e2f3a4b5c6d",
              "name": "Top agent"
            }
          ],
          "roles": [
            "Buyer Agent",
            "Listing Agent"
          ],
          "created_at": "2026-03-02T15:04:11Z",
          "updated_at": "2026-09-18T20:41:07Z"
        }
      },
      "ContactCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "first_name",
          "email"
        ],
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "cc_email": {
            "type": [
              "string",
              "null"
            ],
            "description": "One or more CC email addresses, separated by commas (up to 10)"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "business_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agency name. A name that matches one of your agencies links the contact to it; any other name is kept as plain text. Prefer agency_id."
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO-2, e.g. US or CA"
          },
          "birthday": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "social": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Link the contact to an agency from /v1/agencies. Takes precedence over agency_name."
          },
          "uses_agency_address": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true: use the agency's address for this contact. false: keep the contact's own address."
          },
          "tag_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replace the contact's tags with these tag ids (see /v1/tags). An empty list removes every tag. Send tag_ids or tags, not both."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replace the contact's tags with these tag names (case-insensitive). The tags must already exist."
          }
        },
        "example": {
          "first_name": "Dana",
          "last_name": "Reyes",
          "email": "dana@example.com",
          "phone": "(512) 555-0142",
          "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
          "tags": [
            "Top agent"
          ]
        }
      },
      "ContactUpdate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "cc_email": {
            "type": [
              "string",
              "null"
            ],
            "description": "One or more CC email addresses, separated by commas (up to 10)"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "business_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agency name. A name that matches one of your agencies links the contact to it; any other name is kept as plain text. Prefer agency_id."
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO-2, e.g. US or CA"
          },
          "birthday": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "social": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Link the contact to an agency from /v1/agencies. Takes precedence over agency_name. Send null to unlink."
          },
          "uses_agency_address": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true: use the agency's address for this contact. false: keep the contact's own address."
          },
          "tag_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Replace the contact's tags with these tag ids (see /v1/tags). An empty list removes every tag. Send tag_ids or tags, not both."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replace the contact's tags with these tag names (case-insensitive). The tags must already exist."
          }
        },
        "description": "Only the fields sent are changed; null clears an optional field.",
        "example": {
          "phone": "(512) 555-0199",
          "notes": null
        }
      },
      "ContactList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "id": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
              "first_name": "Dana",
              "last_name": "Reyes",
              "email": "dana@example.com",
              "cc_email": null,
              "phone": "(512) 555-0142",
              "business_name": null,
              "agency_name": "Lone Star Realty",
              "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
              "agency": {
                "id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
                "name": "Lone Star Realty",
                "phone": "(512) 555-0100",
                "website": "https://lonestarrealty.example.com"
              },
              "uses_agency_address": true,
              "address": "410 Oak St",
              "address_line2": null,
              "city": "Austin",
              "state": "TX",
              "zip": "78701",
              "country": "US",
              "birthday": "1988-04-12",
              "website": null,
              "social": null,
              "notes": "Prefers text messages",
              "photo_url": "https://files.example.com/signed-link-valid-for-1-hour",
              "tags": [
                {
                  "id": "5a1d9c3e-2b7f-4f0a-8c6d-1e2f3a4b5c6d",
                  "name": "Top agent"
                }
              ],
              "roles": [
                "Buyer Agent",
                "Listing Agent"
              ],
              "created_at": "2026-03-02T15:04:11Z",
              "updated_at": "2026-09-18T20:41:07Z"
            }
          ],
          "next_cursor": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
          "total": 1
        }
      },
      "ContactStats": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_inspections": {
            "type": "integer"
          },
          "buying_agent_inspections": {
            "type": "integer"
          },
          "listing_agent_inspections": {
            "type": "integer"
          },
          "client_inspections": {
            "type": "integer"
          },
          "total_revenue": {
            "type": "number"
          },
          "buying_agent_revenue": {
            "type": "number"
          },
          "listing_agent_revenue": {
            "type": "number"
          },
          "first_inspection_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_inspection_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "upcoming_inspections_30d": {
            "type": "integer"
          },
          "inspection_count": {
            "type": "integer",
            "description": "Same as total_inspections"
          },
          "revenue": {
            "type": "number",
            "description": "Same as total_revenue"
          },
          "agency_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "example": {
          "contact_id": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
          "first_name": "Dana",
          "last_name": "Reyes",
          "email": "dana@example.com",
          "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
          "agency_name": "Lone Star Realty",
          "total_inspections": 14,
          "buying_agent_inspections": 11,
          "listing_agent_inspections": 3,
          "client_inspections": 0,
          "total_revenue": 6890.0,
          "buying_agent_revenue": 5415.0,
          "listing_agent_revenue": 1475.0,
          "first_inspection_at": "2026-03-09T14:00:00Z",
          "last_inspection_at": "2026-09-24T16:00:00Z",
          "upcoming_inspections_30d": 2,
          "inspection_count": 14,
          "revenue": 6890.0
        }
      },
      "ContactStatsList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactStats"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "contact_id": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
              "first_name": "Dana",
              "last_name": "Reyes",
              "email": "dana@example.com",
              "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
              "agency_name": "Lone Star Realty",
              "total_inspections": 14,
              "buying_agent_inspections": 11,
              "listing_agent_inspections": 3,
              "client_inspections": 0,
              "total_revenue": 6890.0,
              "buying_agent_revenue": 5415.0,
              "listing_agent_revenue": 1475.0,
              "first_inspection_at": "2026-03-09T14:00:00Z",
              "last_inspection_at": "2026-09-24T16:00:00Z",
              "upcoming_inspections_30d": 2,
              "inspection_count": 14,
              "revenue": 6890.0
            }
          ],
          "next_cursor": null,
          "total": 1
        }
      },
      "Inspection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "waiting",
              "review",
              "confirmed",
              "canceled"
            ]
          },
          "confirmed": {
            "type": "boolean"
          },
          "scheduled_for": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "duration_hours": {
            "type": [
              "number",
              "null"
            ]
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "canceled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "urgent": {
            "type": "boolean"
          },
          "booked_online": {
            "type": "boolean"
          },
          "address": {
            "type": "object",
            "properties": {
              "full": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "county": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "property": {
            "type": "object",
            "properties": {
              "type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "square_footage": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "year_built": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "bedrooms": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bathrooms": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "occupancy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "foundation": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Private notes on the inspection (inspector-only in the app; may include the client's booking notes)"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "add_ons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                }
              }
            }
          },
          "inspectors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "first_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "agency_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "agency_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "price": {
            "type": "object",
            "properties": {
              "quote": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "amount_paid": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "amount_due": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "payment_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "paid": {
                "type": "boolean"
              },
              "pay_at_close_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "agreements": {
            "type": "object",
            "properties": {
              "present": {
                "type": "boolean"
              },
              "all_signed": {
                "type": "boolean"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "signed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "reports": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "na",
                  "pending",
                  "partial",
                  "published"
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "portal_url": {
            "type": "string",
            "description": "Client report portal for this inspection"
          },
          "referral_source": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_codes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "value": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "deleted": {
            "type": "boolean",
            "description": "true only for a deleted inspection returned with include_deleted"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cover_photo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed link to the cover photo, valid for 1 hour"
          }
        },
        "example": {
          "id": "3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
          "status": "confirmed",
          "confirmed": true,
          "scheduled_for": "2026-09-24T16:00:00Z",
          "duration_hours": 3.0,
          "ends_at": "2026-09-24T19:00:00Z",
          "created_at": "2026-09-10T18:22:40Z",
          "updated_at": "2026-09-22T13:05:19Z",
          "canceled_at": null,
          "deleted": false,
          "deleted_at": null,
          "urgent": false,
          "booked_online": true,
          "address": {
            "full": "12 Oak St, Austin, TX 78701",
            "street": "12 Oak St",
            "unit": null,
            "city": "Austin",
            "state": "TX",
            "zip": "78701",
            "county": "Travis",
            "country": "US"
          },
          "property": {
            "type": "Single Family",
            "square_footage": 2100,
            "year_built": 1999,
            "bedrooms": "3",
            "bathrooms": "2",
            "occupancy": "Occupied",
            "foundation": "Slab"
          },
          "description": null,
          "notes": "Gate code 4411",
          "services": [
            {
              "id": "a1b2c3d4-1111-4a2b-8c3d-4e5f6a7b8c9d",
              "name": "Residential Inspection"
            }
          ],
          "add_ons": [
            {
              "id": "b2c3d4e5-2222-4b3c-9d4e-5f6a7b8c9d0e",
              "name": "Radon Test",
              "quantity": 1
            }
          ],
          "inspectors": [
            {
              "id": "c3d4e5f6-3333-4c4d-8e5f-6a7b8c9d0e1f",
              "name": "Alex Morgan"
            }
          ],
          "contacts": [
            {
              "id": "c2a7e1d4-58b3-4f6a-9d0e-7b1c2d3e4f5a",
              "role": "Customer",
              "first_name": "Jordan",
              "last_name": "Lee",
              "email": "jordan@example.com",
              "phone": "(512) 555-0188",
              "agency_id": null,
              "agency_name": null
            },
            {
              "id": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
              "role": "Buyer Agent",
              "first_name": "Dana",
              "last_name": "Reyes",
              "email": "dana@example.com",
              "phone": "(512) 555-0142",
              "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
              "agency_name": "Lone Star Realty"
            }
          ],
          "price": {
            "quote": 550.0,
            "amount_paid": 550.0,
            "amount_due": 0.0,
            "payment_status": "paid",
            "paid": true,
            "pay_at_close_status": null
          },
          "agreements": {
            "present": true,
            "all_signed": true,
            "items": [
              {
                "name": "Pre-Inspection Agreement",
                "status": "signed",
                "signed_at": "2026-09-12T02:14:55Z"
              }
            ]
          },
          "reports": {
            "status": "published",
            "items": [
              {
                "id": "d4e5f6a7-4444-4d5e-9f6a-7b8c9d0e1f2a",
                "name": "Home Inspection Report",
                "status": "published"
              }
            ]
          },
          "portal_url": "https://reports.hiveinspect.com/dashboard/reports?reportId=3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
          "cover_photo_url": "https://files.example.com/signed-link-valid-for-1-hour",
          "referral_source": {
            "id": "9e8d7c6b-5a4f-4e3d-2c1b-0a9f8e7d6c5b",
            "name": "Google"
          },
          "discount_codes": [
            {
              "id": "4f3e2d1c-0b9a-4876-9543-210fedcba987",
              "name": "Fall special",
              "code": "FALL50"
            }
          ],
          "custom_fields": [
            {
              "name": "Detached Garage",
              "value": "true"
            }
          ]
        }
      },
      "InspectionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Inspection"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "id": "3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
              "status": "confirmed",
              "confirmed": true,
              "scheduled_for": "2026-09-24T16:00:00Z",
              "duration_hours": 3.0,
              "ends_at": "2026-09-24T19:00:00Z",
              "created_at": "2026-09-10T18:22:40Z",
              "updated_at": "2026-09-22T13:05:19Z",
              "canceled_at": null,
              "deleted": false,
              "deleted_at": null,
              "urgent": false,
              "booked_online": true,
              "address": {
                "full": "12 Oak St, Austin, TX 78701",
                "street": "12 Oak St",
                "unit": null,
                "city": "Austin",
                "state": "TX",
                "zip": "78701",
                "county": "Travis",
                "country": "US"
              },
              "property": {
                "type": "Single Family",
                "square_footage": 2100,
                "year_built": 1999,
                "bedrooms": "3",
                "bathrooms": "2",
                "occupancy": "Occupied",
                "foundation": "Slab"
              },
              "description": null,
              "notes": "Gate code 4411",
              "services": [
                {
                  "id": "a1b2c3d4-1111-4a2b-8c3d-4e5f6a7b8c9d",
                  "name": "Residential Inspection"
                }
              ],
              "add_ons": [
                {
                  "id": "b2c3d4e5-2222-4b3c-9d4e-5f6a7b8c9d0e",
                  "name": "Radon Test",
                  "quantity": 1
                }
              ],
              "inspectors": [
                {
                  "id": "c3d4e5f6-3333-4c4d-8e5f-6a7b8c9d0e1f",
                  "name": "Alex Morgan"
                }
              ],
              "contacts": [
                {
                  "id": "c2a7e1d4-58b3-4f6a-9d0e-7b1c2d3e4f5a",
                  "role": "Customer",
                  "first_name": "Jordan",
                  "last_name": "Lee",
                  "email": "jordan@example.com",
                  "phone": "(512) 555-0188",
                  "agency_id": null,
                  "agency_name": null
                },
                {
                  "id": "0b6f2c1e-7d1a-4c55-9a5e-2f3b8c1d4e6f",
                  "role": "Buyer Agent",
                  "first_name": "Dana",
                  "last_name": "Reyes",
                  "email": "dana@example.com",
                  "phone": "(512) 555-0142",
                  "agency_id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
                  "agency_name": "Lone Star Realty"
                }
              ],
              "price": {
                "quote": 550.0,
                "amount_paid": 550.0,
                "amount_due": 0.0,
                "payment_status": "paid",
                "paid": true,
                "pay_at_close_status": null
              },
              "agreements": {
                "present": true,
                "all_signed": true,
                "items": [
                  {
                    "name": "Pre-Inspection Agreement",
                    "status": "signed",
                    "signed_at": "2026-09-12T02:14:55Z"
                  }
                ]
              },
              "reports": {
                "status": "published",
                "items": [
                  {
                    "id": "d4e5f6a7-4444-4d5e-9f6a-7b8c9d0e1f2a",
                    "name": "Home Inspection Report",
                    "status": "published"
                  }
                ]
              },
              "portal_url": "https://reports.hiveinspect.com/dashboard/reports?reportId=3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
              "cover_photo_url": "https://files.example.com/signed-link-valid-for-1-hour",
              "referral_source": {
                "id": "9e8d7c6b-5a4f-4e3d-2c1b-0a9f8e7d6c5b",
                "name": "Google"
              },
              "discount_codes": [
                {
                  "id": "4f3e2d1c-0b9a-4876-9543-210fedcba987",
                  "name": "Fall special",
                  "code": "FALL50"
                }
              ],
              "custom_fields": [
                {
                  "name": "Detached Garage",
                  "value": "true"
                }
              ]
            }
          ],
          "next_cursor": "WzE3OTAyNjU2MDAuMCwiM2YyYTljMWUiXQ",
          "total": 1
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_type": {
            "type": "null"
          },
          "inspection_id": {
            "type": "string",
            "format": "uuid"
          },
          "start_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "end_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "duration_hours": {
            "type": "number"
          },
          "blocks_calendar": {
            "type": "boolean"
          },
          "inspector_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "inspector_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "example": {
          "id": "e5f6a7b8-5555-4e6f-8a7b-8c9d0e1f2a3b",
          "name": "Radon Drop-off",
          "description": "Place monitor in basement",
          "event_type": null,
          "inspection_id": "3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
          "start_at": "2026-09-22T16:00:00Z",
          "end_at": "2026-09-22T17:00:00Z",
          "duration_hours": 1.0,
          "blocks_calendar": true,
          "inspector_id": "c3d4e5f6-3333-4c4d-8e5f-6a7b8c9d0e1f",
          "inspector_ids": [
            "c3d4e5f6-3333-4c4d-8e5f-6a7b8c9d0e1f"
          ],
          "created_at": "2026-09-10T18:25:02Z",
          "updated_at": "2026-09-10T18:25:02Z"
        }
      },
      "EventList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "id": "e5f6a7b8-5555-4e6f-8a7b-8c9d0e1f2a3b",
              "name": "Radon Drop-off",
              "description": "Place monitor in basement",
              "event_type": null,
              "inspection_id": "3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
              "start_at": "2026-09-22T16:00:00Z",
              "end_at": "2026-09-22T17:00:00Z",
              "duration_hours": 1.0,
              "blocks_calendar": true,
              "inspector_id": "c3d4e5f6-3333-4c4d-8e5f-6a7b8c9d0e1f",
              "inspector_ids": [
                "c3d4e5f6-3333-4c4d-8e5f-6a7b8c9d0e1f"
              ],
              "created_at": "2026-09-10T18:25:02Z",
              "updated_at": "2026-09-10T18:25:02Z"
            }
          ],
          "next_cursor": null,
          "total": 1
        }
      },
      "Agency": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_count": {
            "type": "integer",
            "description": "Contacts linked to this agency"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "example": {
          "id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
          "name": "Lone Star Realty",
          "address": "410 Oak St",
          "address_line2": "Suite 200",
          "city": "Austin",
          "state": "TX",
          "zip": "78701",
          "country": "US",
          "phone": "(512) 555-0100",
          "website": "https://lonestarrealty.example.com",
          "notes": null,
          "contact_count": 12,
          "created_at": "2026-02-11T17:30:00Z",
          "updated_at": "2026-08-05T14:12:44Z"
        }
      },
      "AgencyList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Agency"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "id": "6c5b4a39-2817-4f6e-9d0c-8b7a6f5e4d3c",
              "name": "Lone Star Realty",
              "address": "410 Oak St",
              "address_line2": "Suite 200",
              "city": "Austin",
              "state": "TX",
              "zip": "78701",
              "country": "US",
              "phone": "(512) 555-0100",
              "website": "https://lonestarrealty.example.com",
              "notes": null,
              "contact_count": 12,
              "created_at": "2026-02-11T17:30:00Z",
              "updated_at": "2026-08-05T14:12:44Z"
            }
          ],
          "next_cursor": null,
          "total": 1
        }
      },
      "Attachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "inspection_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "report",
              "document"
            ],
            "description": "report: an Additional Report. document: an Additional Document."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "content_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "size_bytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed download link, valid for 1 hour. Null for a report with no file."
          },
          "visible_to_client": {
            "type": "boolean",
            "description": "false for inspector-only documents"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "example": {
          "id": "8f7e6d5c-4b3a-4291-8e0f-1a2b3c4d5e6f",
          "inspection_id": "3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
          "kind": "report",
          "name": "Sewer Scope Report",
          "description": "Video: https://example.com/sewer-scope",
          "filename": null,
          "content_type": "application/pdf",
          "size_bytes": 482133,
          "url": "https://files.example.com/signed-link-valid-for-1-hour",
          "visible_to_client": true,
          "created_at": "2026-09-24T21:03:18Z",
          "updated_at": "2026-09-24T21:03:18Z"
        }
      },
      "AttachmentList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "id": "8f7e6d5c-4b3a-4291-8e0f-1a2b3c4d5e6f",
              "inspection_id": "3f2a9c1e-6b4d-4e7a-8c15-9d0e1f2a3b4c",
              "kind": "report",
              "name": "Sewer Scope Report",
              "description": "Video: https://example.com/sewer-scope",
              "filename": null,
              "content_type": "application/pdf",
              "size_bytes": 482133,
              "url": "https://files.example.com/signed-link-valid-for-1-hour",
              "visible_to_client": true,
              "created_at": "2026-09-24T21:03:18Z",
              "updated_at": "2026-09-24T21:03:18Z"
            }
          ],
          "next_cursor": null,
          "total": 1
        }
      },
      "AttachmentUpload": {
        "type": "object",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "report",
              "document"
            ]
          },
          "file": {
            "type": "string",
            "format": "binary",
            "description": "Required for a document; optional for a report. Documents: up to 10 MB. Reports: up to 25 MB."
          },
          "name": {
            "type": "string",
            "description": "Report name. Required for a report."
          },
          "description": {
            "type": "string",
            "description": "Report description. May contain a link."
          },
          "internal_only": {
            "type": "boolean",
            "description": "Documents only. true keeps the document inspector-only, hidden from the client."
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "contact_count": {
            "type": "integer",
            "description": "Contacts holding this tag"
          }
        },
        "example": {
          "id": "5a1d9c3e-2b7f-4f0a-8c6d-1e2f3a4b5c6d",
          "name": "Top agent",
          "contact_count": 18
        }
      },
      "TagList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Every record matching the filters, across all pages"
          }
        },
        "example": {
          "data": [
            {
              "id": "5a1d9c3e-2b7f-4f0a-8c6d-1e2f3a4b5c6d",
              "name": "Top agent",
              "contact_count": 18
            }
          ],
          "next_cursor": null,
          "total": 1
        }
      },
      "ContactPhotoUpload": {
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "jpg, png, gif or webp, up to 10 MB"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your API key from Business Tools \u2192 API Access."
      }
    }
  },
  "paths": {
    "/v1/contacts": {
      "get": {
        "operationId": "listContacts",
        "summary": "List contacts",
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact ids (up to 200) to fetch in one call",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "description": "Only contacts who have had this role on an inspection: `agent` (Buyer Agent or Listing Agent), `client` (Customer), or an exact role: Customer, Buyer Agent, Listing Agent, Sub Contractor, Insurance Agent, Lender, Builder, Transaction Coordinator, Attorney, Title Company, Others",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "description": "Only contacts with this tag",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Only contacts with any of these tag names (case-insensitive); repeat for several",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "agency_id",
            "in": "query",
            "required": false,
            "description": "Only contacts linked to this agency (see /v1/agencies)",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Exact email match (case-insensitive)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Name, email, or phone (3+ digits) contains",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; contacts created or changed at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "first_name, last_name, agency_name, created_at or updated_at; prefix '-' for descending (default: by id)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      },
      "post": {
        "operationId": "createContact",
        "summary": "Create a contact",
        "tags": [
          "Contacts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "409": {
            "description": "A contact with this email already exists"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/contacts/stats": {
      "get": {
        "operationId": "listContactStats",
        "summary": "List contact stats",
        "description": "Confirmed, non-deleted inspections. Revenue is the inspection price.",
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "role",
            "in": "query",
            "required": false,
            "description": "Count only inspections where the contact had this role (default: any role): agent, client, or an exact role",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "description": "Stats for one contact",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "contact_ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated contact ids (up to 200)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agency_id",
            "in": "query",
            "required": false,
            "description": "Only contacts linked to this agency",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Name, email, agency name, or phone (3+ digits) contains",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Only contacts with any of these tag names; repeat for several",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "inspection_after",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; count only inspections at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inspection_before",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; count only inspections before this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "first_inspection_after",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; contacts whose first inspection is at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "first_inspection_before",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; contacts whose first inspection is before this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inactive_after",
            "in": "query",
            "required": false,
            "description": "With inactive_before: contacts with inspections, but none in this range",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inactive_before",
            "in": "query",
            "required": false,
            "description": "With inactive_after: end of the inactive range",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "birthday_after",
            "in": "query",
            "required": false,
            "description": "MM-DD; birthdays on/after this day of the year",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "birthday_before",
            "in": "query",
            "required": false,
            "description": "MM-DD; birthdays on/before this day of the year",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paid_only",
            "in": "query",
            "required": false,
            "description": "Count only paid inspections",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "total_inspections, buying_agent_inspections, listing_agent_inspections, client_inspections, total_revenue, buying_agent_revenue, listing_agent_revenue, first_inspection_at, last_inspection_at, first_name or last_name; prefix '-' for descending",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactStatsList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/contacts/{contactId}": {
      "get": {
        "operationId": "getContact",
        "summary": "Get a contact",
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      },
      "patch": {
        "operationId": "updateContact",
        "summary": "Update a contact",
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Email already used by another contact"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/inspections": {
      "get": {
        "operationId": "listInspections",
        "summary": "List inspections",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated inspection ids (up to 200) to fetch in one call",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Comma-separated: draft, waiting, review, confirmed, canceled. Default: every status except canceled",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_canceled",
            "in": "query",
            "required": false,
            "description": "true to include canceled inspections",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "description": "true to also return deleted inspections (deleted: true, deleted_at set)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "scheduled_after",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; scheduled at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheduled_before",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; scheduled before this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; created or changed at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inspector_id",
            "in": "query",
            "required": false,
            "description": "Assigned to this inspector",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "description": "This contact is on the inspection",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "service_id",
            "in": "query",
            "required": false,
            "description": "Includes this service",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "add_on_id",
            "in": "query",
            "required": false,
            "description": "Includes this add-on",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "payment_status",
            "in": "query",
            "required": false,
            "description": "Comma-separated: paid, pending, partial, refunded, invoiced, processing, pay_at_close, failed",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paid",
            "in": "query",
            "required": false,
            "description": "true / false",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "agreements_signed",
            "in": "query",
            "required": false,
            "description": "true: every agreement signed",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "published",
            "in": "query",
            "required": false,
            "description": "true: at least one report published",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "description": "Exact ZIP / postal code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Address, or a linked contact's name, email or phone, contains",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "scheduled_for, created_at, updated_at or price; prefix '-' for descending (default: -scheduled_for)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "tags": [
          "Inspections"
        ],
        "description": "Read-only. Deleted and sample inspections are never returned.",
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/inspections/{inspectionId}": {
      "get": {
        "operationId": "getInspection",
        "summary": "Get an inspection",
        "parameters": [
          {
            "name": "inspectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include_deleted",
            "in": "query",
            "required": false,
            "description": "true to return the inspection even if it was deleted",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Inspection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "404": {
            "description": "Not found"
          }
        },
        "tags": [
          "Inspections"
        ],
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "List inspection events",
        "parameters": [
          {
            "name": "inspection_id",
            "in": "query",
            "required": false,
            "description": "Events on this inspection",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "inspector_id",
            "in": "query",
            "required": false,
            "description": "Assigned to this inspector",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "start_after",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; starting at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_before",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; starting before this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; created or changed at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_canceled",
            "in": "query",
            "required": false,
            "description": "true to include events on canceled inspections",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "start_at or -start_at (default start_at)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "tags": [
          "Events"
        ],
        "description": "Inspection events only (e.g. radon drop-off / pick-up).",
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/agencies": {
      "get": {
        "operationId": "listAgencies",
        "summary": "List agencies",
        "description": "The brokerages your agents belong to. Read-only.",
        "tags": [
          "Agencies"
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated agency ids (up to 200) to fetch in one call",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Agency name, former name or city contains",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; created or changed at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "name, created_at or updated_at; prefix '-' for descending (default: name)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/agencies/{agencyId}": {
      "get": {
        "operationId": "getAgency",
        "summary": "Get an agency",
        "tags": [
          "Agencies"
        ],
        "parameters": [
          {
            "name": "agencyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agency"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/inspections/{inspectionId}/attachments": {
      "get": {
        "operationId": "listAttachments",
        "summary": "List attachments",
        "description": "An inspection's additional reports and additional documents.",
        "tags": [
          "Attachments"
        ],
        "parameters": [
          {
            "name": "inspectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "report or document",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visible_to_client",
            "in": "query",
            "required": false,
            "description": "true: only what the client can see. false: only inspector-only documents",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "created_at or -created_at (default: -created_at)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "404": {
            "description": "Inspection not found"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      },
      "post": {
        "operationId": "uploadAttachment",
        "summary": "Upload an attachment",
        "description": "Send multipart/form-data. Adding a report requires a confirmed inspection and runs your 'additional report added' automations, which can email or text the client.",
        "tags": [
          "Attachments"
        ],
        "parameters": [
          {
            "name": "inspectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentUpload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "404": {
            "description": "Inspection not found"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "413": {
            "description": "File too large"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/tags": {
      "get": {
        "operationId": "listTags",
        "summary": "List tags",
        "description": "Your contact tags, by name. Use the ids or names to set a contact's tags.",
        "tags": [
          "Contacts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/contacts/{contactId}/photo": {
      "post": {
        "operationId": "uploadContactPhoto",
        "summary": "Upload a contact photo",
        "description": "Sets or replaces the contact's photo. Send multipart/form-data.",
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ContactPhotoUpload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "404": {
            "description": "Not found"
          },
          "413": {
            "description": "File too large"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      },
      "delete": {
        "operationId": "deleteContactPhoto",
        "summary": "Remove a contact photo",
        "description": "Safe to repeat: a contact with no photo is returned unchanged.",
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    },
    "/v1/attachments": {
      "get": {
        "operationId": "listAllAttachments",
        "summary": "List attachments across inspections",
        "description": "Every additional report and additional document in your organization. Use updated_since to sync only new files.",
        "tags": [
          "Attachments"
        ],
        "parameters": [
          {
            "name": "inspection_id",
            "in": "query",
            "required": false,
            "description": "Only this inspection's attachments",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "report or document",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visible_to_client",
            "in": "query",
            "required": false,
            "description": "true: only what the client can see. false: only inspector-only documents",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date or timestamp; added or changed at/after this time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "updated_at or created_at; prefix '-' for descending (default: -updated_at)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1-200 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Missing, invalid or inactive API key"
          },
          "429": {
            "description": "Rate limit exceeded (120 requests/minute per key owner)"
          }
        },
        "x-mint": {
          "content": "<Note>\n  **The Hive Inspect API is a work in progress.** It is available to a small group of accounts today, and the release for everyone is coming very soon.\n</Note>"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.hiveinspect.com"
    }
  ],
  "tags": [
    {
      "name": "Contacts",
      "description": "Agents, clients and every other contact in your organization."
    },
    {
      "name": "Agencies",
      "description": "The brokerages your agents belong to. Read-only."
    },
    {
      "name": "Inspections",
      "description": "Read-only access to your inspections."
    },
    {
      "name": "Attachments",
      "description": "Additional reports and additional documents on an inspection."
    },
    {
      "name": "Events",
      "description": "Extra appointments on an inspection, such as a radon drop-off or pick-up."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
