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

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

payload = {
    "cadence": "daily",
    "webhook": {
        "url": "<string>",
        "event_types": ["monitor.event.detected"]
    },
    "metadata": {
        "slack_thread_id": "1234567890.123456",
        "user_id": "U123ABC"
    }
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
{
  "monitor_id": "<string>",
  "query": "<string>",
  "status": "active",
  "cadence": "daily",
  "created_at": "2023-11-07T05:31:56Z",
  "metadata": {
    "key": "value"
  },
  "webhook": {
    "url": "<string>",
    "event_types": [
      "monitor.event.detected"
    ]
  },
  "last_run_at": "2025-01-15T10:30:00Z"
}

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.

status
enum<string>
required

Status of the monitor.

Available options:
active,
canceled
cadence
enum<string>
required

Cadence of the monitor.

Available options:
daily,
weekly,
hourly
created_at
string<date-time>
required

Timestamp of the creation of the monitor.

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"