# Monitoring Agent

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2Faxbgxeg2KSGqaCbhWH2M%2FMonitoring%20Agent.png?alt=media&#x26;token=cb7bbbf0-3ab5-44d7-a8c3-44ab3c8a8780" alt=""><figcaption></figcaption></figure>

Subscribe to a property or region and receive push notifications (via webhook) or poll for changes if valuations, conditions, or compliance statuses shift significantly.

**Sample Request**

```bash
POST /v1/agent/monitoring
{
  "subscribe": true,
  "address": "415 Mission Street, San Francisco, CA, US",
  "callback_url": "https://example.com/webhook",
  "notification_options": {
    "threshold": {
      "valuation_percent_change": 5,
      "condition_score_change": 1.5,
      "compliance_status_change": true
    },
    "frequency": "immediate"
  }
}
```

**Sample Webhook Notification**

```
{
  "subscription_id": "mon_8437f92ac1e54b9d",
  "event_type": "property_change_detected",
  "timestamp": "2025-03-02T14:22:10Z",
  "property": {
    "propertyId": "67a771e11bcf52fcce866d6a",
    "address": "415 Mission Street, San Francisco, CA, US"
  },
  "changes": [
    {
      "type": "valuation",
      "previous_value": 4250000,
      "current_value": 4520000,
      "percent_change": 6.35,
      "detected_date": "2025-03-01T22:15:43Z"
    },
    {
      "type": "condition",
      "category": "roof",
      "previous_score": 8.2,
      "current_score": 6.5,
      "detected_date": "2025-03-02T10:45:12Z",
      "notes": "Recent satellite imagery shows potential damage from storm event"
    }
  ],
  "next_assessment_date": "2025-03-09T00:00:00Z"
}
```

*(If you specify a region or an uploaded file, you’ll get updates whenever relevant changes are detected for any property in that set.)*
