v19

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-084091267.1 KB
Monitor

Update Monitor

Update a monitor.

Only fields explicitly included in the request body are changed. Pass null for webhook or metadata to clear those fields. Pass type and settings to update type-specific settings on an event_stream monitor. At least one field must be provided. Cancelled monitors cannot be updated.

post/v1/monitors/{monitor_id}/update

Path parameters

monitor_idstring required

Request body

type'event_stream' | 'snapshot' nullable

Type of the monitor being updated. Required when settings is provided; must be event_stream (snapshot monitors have no updatable type-specific settings).

frequencystring nullable

Frequency of the monitor. Format: '<number><unit>' where unit is 'h' (hours), 'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).

metadataobject nullable

User-provided metadata stored with the monitor and echoed back in webhook notifications and GET responses, so you can map events to objects in your application. Keys: max 16 chars; values: max 512 chars.

Example request

{
  "type": "event_stream",
  "frequency": "1h",
  "webhook": {
    "url": "https://example.com/webhook"
  },
  "metadata": {
    "slack_thread_id": "1234567890.123456",
    "user_id": "U123ABC"
  },
  "settings": {
    "query": "Extract recent news about AI",
    "advanced_settings": {
      "source_policy": {
        "include_domains": [
          "wikipedia.org",
          "usa.gov",
          ".edu"
        ],
        "exclude_domains": [
          "reddit.com",
          "x.com",
          ".ai"
        ],
        "after_date": "2024-01-01"
      },
      "location": "us"
    }
  }
}

Response

Monitor updated successfully.

type'event_stream' | 'snapshot' required

The type of monitor.

monitor_idstring required

ID of the monitor.

status'active' | 'cancelled' required

Status of the monitor.

frequencystring required

Frequency of the monitor. Format: '<number><unit>' where unit is 'h' (hours), 'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).

processor'lite' | 'base' required

Processor to use for the monitor. lite is faster and cheaper; base performs more thorough analysis at higher cost and latency. Defaults to lite.

metadataobject nullable

User-provided metadata stored with the monitor and echoed back in webhook notifications and GET responses, so you can map events to objects in your application. Keys: max 16 chars; values: max 512 chars.

created_atstring date-time required

Timestamp of the creation of the monitor, as an RFC 3339 string.

last_run_atstring nullable

Timestamp of the last run for the monitor, as an RFC 3339 string.

Example response

{
  "type": "event_stream",
  "status": "active",
  "frequency": "1h",
  "processor": "lite",
  "webhook": {
    "url": "https://example.com/webhook"
  },
  "metadata": {
    "slack_thread_id": "1234567890.123456",
    "user_id": "U123ABC"
  },
  "created_at": "2025-01-15T10:30:00Z",
  "last_run_at": "2025-01-15T10:30:00Z",
  "settings": {
    "query": "Extract recent news about AI",
    "output_schema": {
      "json_schema": {
        "additionalProperties": false,
        "properties": {
          "gdp": {
            "description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
            "type": "string"
          }
        },
        "required": [
          "gdp"
        ],
        "type": "object"
      }
    },
    "advanced_settings": {
      "source_policy": {
        "include_domains": [
          "wikipedia.org",
          "usa.gov",
          ".edu"
        ],
        "exclude_domains": [
          "reddit.com",
          "x.com",
          ".ai"
        ],
        "after_date": "2024-01-01"
      },
      "location": "us"
    }
  },
  "output": {
    "latest_snapshot": {
      "basis": [
        {
          "confidence": "low"
        }
      ]
    }
  }
}