from parallel import Parallel
client = Parallel()
monitor = client.monitor.update(
"monitor_id",
frequency="12h",
type="event_stream",
settings={"query": "Extract recent funding news about AI startups"},
)
print(monitor.frequency)import Parallel from "parallel-web";
const client = new Parallel();
const monitor = await client.monitor.update('monitor_id', {
frequency: '12h',
type: 'event_stream',
settings: { query: 'Extract recent funding news about AI startups' },
});
console.log(monitor.frequency);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/monitors/{monitor_id}/update")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/monitors/{monitor_id}/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'{
"type": "event_stream",
"monitor_id": "<string>",
"status": "active",
"frequency": "1h",
"processor": "lite",
"created_at": "2025-01-15T10:30:00Z",
"settings": {
"query": "Extract recent news about AI",
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"type": "json"
},
"include_backfill": true,
"advanced_settings": {
"source_policy": {
"include_domains": [
"wikipedia.org",
"docs.python.org/3",
".edu"
]
},
"location": "us"
}
},
"webhook": {
"url": "https://example.com/webhook",
"event_types": [
"monitor.event.detected"
]
},
"metadata": {
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
},
"last_run_at": "2025-01-15T10:30:00Z",
"output": {
"latest_snapshot": {
"basis": [
{
"field": "<string>",
"reasoning": "<string>",
"citations": [],
"confidence": "low"
}
],
"type": "text",
"content": "<string>",
"mcp_tool_calls": [
{
"tool_call_id": "<string>",
"server_name": "<string>",
"tool_name": "<string>",
"arguments": "<string>",
"content": "<string>",
"error": "<string>"
}
],
"beta_fields": {}
}
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Monitor not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unprocessable content: request validation error"
}
}Update Monitor
Update a monitor.
Only fields explicitly included in the request body are changed. Pass
null to clear webhook, metadata, or settings.advanced_settings;
every other field rejects null, so omit it to leave it unchanged. Pass
type and settings to update type-specific settings on an
event_stream monitor. Pass processor to change the processor used by
subsequent monitor runs. At least one field must be provided. Cancelled
monitors cannot be updated.
from parallel import Parallel
client = Parallel()
monitor = client.monitor.update(
"monitor_id",
frequency="12h",
type="event_stream",
settings={"query": "Extract recent funding news about AI startups"},
)
print(monitor.frequency)import Parallel from "parallel-web";
const client = new Parallel();
const monitor = await client.monitor.update('monitor_id', {
frequency: '12h',
type: 'event_stream',
settings: { query: 'Extract recent funding news about AI startups' },
});
console.log(monitor.frequency);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1/monitors/{monitor_id}/update")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1/monitors/{monitor_id}/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'{
"type": "event_stream",
"monitor_id": "<string>",
"status": "active",
"frequency": "1h",
"processor": "lite",
"created_at": "2025-01-15T10:30:00Z",
"settings": {
"query": "Extract recent news about AI",
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"type": "json"
},
"include_backfill": true,
"advanced_settings": {
"source_policy": {
"include_domains": [
"wikipedia.org",
"docs.python.org/3",
".edu"
]
},
"location": "us"
}
},
"webhook": {
"url": "https://example.com/webhook",
"event_types": [
"monitor.event.detected"
]
},
"metadata": {
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
},
"last_run_at": "2025-01-15T10:30:00Z",
"output": {
"latest_snapshot": {
"basis": [
{
"field": "<string>",
"reasoning": "<string>",
"citations": [],
"confidence": "low"
}
],
"type": "text",
"content": "<string>",
"mcp_tool_calls": [
{
"tool_call_id": "<string>",
"server_name": "<string>",
"tool_name": "<string>",
"arguments": "<string>",
"content": "<string>",
"error": "<string>"
}
],
"beta_fields": {}
}
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Monitor not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unprocessable content: request validation error"
}
}Authorizations
Path Parameters
Body
Request body to update a monitor.
Only fields that are explicitly included in the request body are updated.
null clears a field, and is accepted only for the fields that can be
cleared: webhook, metadata, and settings.advanced_settings. Every
other field rejects null; omit it to leave the current value unchanged.
To update type-specific settings on an event_stream monitor, include
type and settings; pass settings.query to update the prompt. If
settings is provided, type is required to identify the settings shape.
The request must still include at least one field to update; empty updates
fail validation.
Type of the monitor being updated. Required when settings is provided; must be event_stream (snapshot monitors have no updatable type-specific settings). Omit when settings is not provided; null is rejected.
event_stream, snapshot "event_stream"
Frequency of the monitor. Format: '' where unit is 'h' (hours), 'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive). Omit to keep the current frequency; null is rejected.
"1h"
Processor to use for subsequent monitor runs. lite is faster and cheaper; base performs more thorough analysis at higher cost and latency. Omit to keep the current processor; null is rejected.
lite, base "lite"
Webhook to receive notifications about the monitor's execution.
Show child attributes
Show child attributes
User-provided metadata stored with the monitor and echoed back in webhook notifications and GET responses, so you can map events to objects in your application. Keys: max 16 chars; values: max 512 chars.
Show child attributes
Show child attributes
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}
Type-specific settings to update. Only valid when type is event_stream. Pass settings.query to update the prompt, or null for settings.advanced_settings to clear it. Omit to leave type-specific settings unchanged; null is rejected.
Show child attributes
Show child attributes
Response
Monitor updated successfully.
Response object for a monitor.
The type field at the root determines the concrete shape of settings:
event_stream uses MonitorEventStreamResponseSettings, and snapshot
uses MonitorSnapshotResponseSettings. Snapshot monitors also carry an
output field (MonitorSnapshotOutput) with the latest computed state.
The type of monitor.
event_stream, snapshot "event_stream"
"snapshot"
ID of the monitor.
Status of the monitor.
active, cancelled "active"
"cancelled"
Frequency of the monitor. Format: '' where unit is 'h' (hours), 'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).
"1h"
"12h"
"1d"
"7d"
"30d"
Processor to use for the monitor. lite is faster and cheaper; base performs more thorough analysis at higher cost and latency. Defaults to lite.
lite, base "lite"
"base"
Timestamp of the creation of the monitor, as an RFC 3339 string.
"2025-01-15T10:30:00Z"
Type-specific response fields for an event_stream monitor.
- MonitorEventStreamResponseSettings
- MonitorSnapshotResponseSettings
Show child attributes
Show child attributes
Webhook configuration for the monitor.
Show child attributes
Show child attributes
User-provided metadata stored with the monitor and echoed back in webhook notifications and GET responses, so you can map events to objects in your application. Keys: max 16 chars; values: max 512 chars.
Show child attributes
Show child attributes
{
"slack_thread_id": "1234567890.123456",
"user_id": "U123ABC"
}
Timestamp of the last run for the monitor, as an RFC 3339 string.
"2025-01-15T10:30:00Z"
Runtime output state. Present only for snapshot monitors; null for event_stream monitors.
Show child attributes
Show child attributes