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",
  "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
Example:

"daily"

webhook
MonitorWebhook · object

Updated webhook configuration.

metadata
Metadata · object

Updated user-provided metadata. This field is returned in webhook notifications, enabling you to map responses to corresponding objects in your application.

Example:
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}

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"

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.

Example:

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

metadata
Metadata · object

User-provided metadata stored with the monitor.

Example:
{ "key": "value" }
webhook
MonitorWebhook · object

Webhook configuration for the monitor.

last_run_at
string | null

Timestamp of the last run for the monitor.

Example:

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