Skip to main content
POST
Python

Authorizations

x-api-key
string
header
required

Body

application/json

Request body to create a monitor.

The type field at the root determines the expected shape of settings: event_stream requires MonitorEventStreamSettings, and snapshot requires MonitorSnapshotSettings.

type
enum<string>
required

Type of monitor to create. event_stream monitors a search query for material changes; snapshot monitors a specific task run's output. Determines the expected shape of settings.

Available options:
event_stream,
snapshot
Examples:

"event_stream"

"snapshot"

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"

settings
MonitorEventStreamSettings · object
required

Type-specific settings for an event_stream monitor.

processor
enum<string>
default:lite

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
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:

Response

Monitor created 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.