Skip to main content
POST
Create Monitor

Headers

x-api-key
string | null

Body

application/json

Start one monitor per row of a table.

A row column named after a struct field seeds that field's starting value; a field with no matching column is established by the first check.

name
string
required

Base name; the row's key values are appended.

Required string length: 1 - 120
key_columns
string[]
required
Minimum array length: 1
struct
Struct · object
required

Field name -> what to find. The same shape enrichment takes: either a sentence, or an object with 'type', 'description' and, for a nested field, 'subfields'.

rows
Rows · object[]
source
MonitorRunSource · object | null
handle_id
string<uuid> | null

Upload handle returned by /storage/csv/upload. Use instead of rows or source.

frequency
string
default:1d
tier
string
default:low
subject_type
string
default:company

Which enrichment re-derives the fields: 'company' or 'lead'.

research_plan
string | null
webhook_url
string | null
webhook_event_types
string[] | null

Which events POST to webhook_url: any of 'monitor.field.changed', 'monitor.execution.completed', 'monitor.execution.failed', 'monitor.run.completed'. Defaults to ['monitor.field.changed']. A monitor's first check records starting values rather than changes, so subscribe to 'monitor.execution.completed' to hear about every finished check.

metadata
Metadata · object | null
is_active
boolean
default:true
first_check
enum<string>
default:now

When setup runs for rows missing watched values. 'now' triggers setup immediately; 'next_tick' waits for the schedule. Fully supplied rows always start on the schedule: an hourly monitor first runs at the next :00 UTC, a daily one at the next 00:00 UTC. The response's next_run_times says exactly when.

Available options:
now,
next_tick
idempotency_key
string | null

Optional. Resending a request with the same key returns what the first attempt created instead of creating the batch twice. Reusing a key with different content returns 409. Omitted, a key is derived from the request's own content, so an identical resend replays by default.

Maximum string length: 200

Response

Successful Response

One uploaded table, watched as a single thing.

row_count and active_row_count differ when rows have been switched off.

id
string
required
org_id
string
required
team_id
string | null
required
name
string
required
frequency
string
required
struct
Struct · object
required
tier
string
required
subject_type
string
required
research_plan
string | null
required
is_active
boolean
required
disabled_reason
string | null
required
webhook_url
string | null
required
webhook_event_types
string[]
required
metadata
Metadata · object | null
required
last_run_at
string | null
required
next_run_times
string[]
required
row_count
integer
required
active_row_count
integer
required
status
enum<string>
required

'starting' while an uploaded file's rows are still being added, 'failed' when adding them failed. Nothing is checked until it becomes 'active'. 'cancelled' means the owner cancelled it; 'paused' means it was switched off without cancellation.

Available options:
starting,
failed,
active,
paused,
cancelled
created_at
string
required
updated_at
string
required