Skip to main content
POST
/
v1alpha
/
monitors
Create Monitor
import requests

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

payload = {
    "query": "<string>",
    "cadence": "daily"
}
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

Body

application/json

Request to create a monitor.

query
string
required

Search query to monitor for material changes.

Example:

"Extract recent news about AI"

cadence
enum<string>
required

Cadence of the monitor.

Available options:
daily,
weekly,
hourly
Examples:

"daily"

"weekly"

"hourly"

webhook
MonitorWebhook · object

Webhook to receive notifications about the monitor's execution.

metadata
Metadata · object

User-provided metadata stored with the monitor. This field is returned in webhook notifications and GET requests, enabling you to map responses to corresponding objects in your application. For example, if you are building a Slackbot that monitors changes, you could store the Slack thread ID here to properly route webhook responses back to the correct conversation thread.

Example:
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}
output_schema
JsonSchema · object

Output schema for the monitor event.

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"