Skip to main content
POST
/
v1alpha
/
monitors
/
{monitor_id}
Update Monitor
import requests

url = "https://api.parallel.ai/v1alpha/monitors/{monitor_id}"

payload = {}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "monitor_id": "monitor_b0079f70195e4258a3b982c1b6d8bd3a",
  "query": "Extract recent news about AI",
  "status": "active",
  "frequency": "1d",
  "metadata": {
    "key": "value"
  },
  "webhook": {
    "url": "https://example.com/webhook",
    "event_types": [
      "monitor.event.detected"
    ]
  },
  "created_at": "2025-04-23T20:21:48.037943Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

monitor_id
string
required

Body

application/json

Request to update a monitor's configuration.

query
string | null

Updated search query for the monitor. Use this for minor updates to prompts and instructions only. Major changes to the query may lead to unexpected results in change detection, as the monitor compares new results with what was previously seen.

Example:

"Extract recent news about AI"

cadence
enum<string> | null
deprecated

Deprecated: use 'frequency' field instead.

Available options:
daily,
weekly,
hourly,
every_two_weeks
Example:

"daily"

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:

"1d"

webhook
MonitorWebhook · object

Webhook to receive notifications about the monitor's execution.

metadata
Metadata · object

User-provided metadata stored with the monitor. Returned in webhook notifications and GET requests, enabling you to map responses to corresponding objects in your application.

Example:
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}
source_policy
SourcePolicy · object

Source policy governing preferred and disallowed domains in web search results.

Example:
{
"exclude_domains": ["reddit.com", "x.com", ".ai"],
"include_domains": ["wikipedia.org", "usa.gov", ".edu"]
}

Response

Successful Response

Response object for a monitor, including its status, cadence and metadata.

monitor_id
string
required

ID of the monitor.

query
string
required

The query being monitored.

Example:

"Recent news about LLM models."

status
enum<string>
required

Status of the monitor.

Available options:
active,
canceled
Examples:

"active"

"canceled"

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:

"1d"

"1w"

"1h"

"2w"

created_at
string<date-time>
required

Timestamp of the creation of the monitor.

Example:

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

cadence
enum<string> | null
deprecated

Deprecated: use 'frequency' field instead.

Available options:
daily,
weekly,
hourly,
every_two_weeks
Example:

"daily"

metadata
Metadata · object

User-provided metadata stored with the monitor. Returned in webhook notifications and GET requests, enabling you to map responses to corresponding objects in your application.

Example:
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}
webhook
MonitorWebhook · object

Webhook configuration for the monitor.

output_schema
JsonSchema · object

Output schema for the monitor event.

source_policy
SourcePolicy · object

Source policy governing preferred and disallowed domains in web search results.

Example:
{
"exclude_domains": ["reddit.com", "x.com", ".ai"],
"include_domains": ["wikipedia.org", "usa.gov", ".edu"]
}
last_run_at
string | null

Timestamp of the last run for the monitor.

Example:

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

include_backfill
boolean | null

If true, the first execution includes historical events matching the query. Subsequent executions return only new events since the previous run.