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

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

payload = {
    "cadence": "daily",
    "webhook": {
        "url": "https://example.com/webhook",
        "event_types": ["monitor.event.detected"]
    },
    "metadata": { "key": "value" }
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.json())
{
  "monitor_id": "a4aa4b06-1c62-41b5-8475-895e51aa836b",
  "query": "Extract recent news about AI",
  "status": "active",
  "cadence": "daily",
  "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.

cadence
enum<string> | null

Updated cadence of the monitor.

Available options:
daily,
weekly,
hourly
Examples:

"daily"

"weekly"

"hourly"

webhook
object | null

Updated webhook configuration. Webhook configuration for a monitor.

metadata
object | null

User-provided metadata stored with the monitor.

Examples:
{ "key": "value" }

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 original query being monitored.

Examples:

"Extract recent news about AI"

status
enum<string>
required

Status of the monitor.

Available options:
active,
cancelled
Examples:

"active"

"cancelled"

cadence
enum<string>
required

Cadence of the monitor.

Available options:
daily,
weekly,
hourly
Examples:

"daily"

"weekly"

"hourly"

created_at
string<date-time>
required

Timestamp of the creation of the monitor.

Examples:

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

metadata
object | null

User-provided metadata stored with the monitor.

Examples:
{ "key": "value" }
webhook
object | null

Webhook configuration for the monitor. Webhook configuration for a monitor.

last_run_at
string | null

Timestamp of the last run for the monitor.

Examples:

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