Skip to main content
POST
Python

Authorizations

x-api-key
string
header
required

Path Parameters

monitor_id
string
required

Body

application/json

Request body to update a monitor.

Only fields that are explicitly included in the request body are updated. Pass null for webhook or metadata to clear those fields. To update type-specific settings on an event_stream monitor, include type and settings; pass settings.query to update the prompt, or null for settings.advanced_settings to clear it. If settings is provided, type is required to identify the settings shape. The request must still include at least one field to update; empty updates fail validation.

type
enum<string> | null

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

Available options:
event_stream,
snapshot
Example:

"event_stream"

frequency
string | null

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

Example:

"1h"

webhook
MonitorWebhook · object | null

Webhook to receive notifications about the monitor's execution.

metadata
Metadata · object | null

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:
settings
UpdateMonitorEventStreamSettings · object | null

Type-specific settings to update. Only valid when type is event_stream. Pass settings.query to update the prompt, or null for settings.advanced_settings to clear it.

Response

Monitor updated successfully.

Response object for a monitor.

The type field at the root determines the concrete shape of settings: event_stream uses MonitorEventStreamResponseSettings, and snapshot uses MonitorSnapshotResponseSettings. Snapshot monitors also carry an output field (MonitorSnapshotOutput) with the latest computed state.

type
enum<string>
required

The type of monitor.

Available options:
event_stream,
snapshot
Examples:

"event_stream"

"snapshot"

monitor_id
string
required

ID of the monitor.

status
enum<string>
required

Status of the monitor.

Available options:
active,
cancelled
Examples:

"active"

"cancelled"

frequency
string
required

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

Examples:

"1h"

"12h"

"1d"

"7d"

"30d"

processor
enum<string>
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.

Available options:
lite,
base
Examples:

"lite"

"base"

created_at
string<date-time>
required

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

Example:

"2025-01-15T10:30:00Z"

settings
MonitorEventStreamResponseSettings · object
required

Type-specific response fields for an event_stream monitor.

webhook
MonitorWebhook · object | null

Webhook configuration for the monitor.

metadata
Metadata · object | null

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:
last_run_at
string | null

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

Example:

"2025-01-15T10:30:00Z"

output
MonitorSnapshotOutput · object | null

Runtime output state. Present only for snapshot monitors; null for event_stream monitors.