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);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. On a
cancelled monitor only metadata can 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);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"
}
}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.
Processor to use for subsequent monitor runs. lite is the cheapest; base performs more thorough analysis for higher-quality results at higher cost; core performs the most thorough analysis for the highest-quality results at the highest cost. Omit to keep the current processor; null is rejected.
lite, base, core "lite"
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.
Processor to use for the monitor. lite is the cheapest; base performs more thorough analysis for higher-quality results at higher cost; core performs the most thorough analysis for the highest-quality results at the highest cost. Defaults to lite.
lite, base, core "lite"
"base"
"core"
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"
}