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.

post/v1/monitors/{monitor_id}/update

Request

  • Base URL
    https://api.parallel.ai
  • Auth
    API key in header x-api-key

Path parameters

monitor_idstring required

Request body

type'event_stream' | 'snapshot' nullable

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.

frequencystring nullable

Frequency of the monitor. Format: '<number><unit>' 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.

processor'lite' | 'base' | 'core' nullable

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.

metadataobject nullable

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.

Example request

{
  "type": "event_stream",
  "frequency": "1h",
  "processor": "lite",
  "webhook": {
    "url": "https://example.com/webhook"
  },
  "metadata": {
    "slack_thread_id": "1234567890.123456",
    "user_id": "U123ABC"
  },
  "settings": {
    "query": "Extract recent news about AI",
    "advanced_settings": {
      "source_policy": {
        "include_domains": [
          "wikipedia.org",
          "docs.python.org/3",
          ".edu"
        ],
        "exclude_domains": [
          "reddit.com",
          "youtube.com/shorts",
          ".ai"
        ],
        "after_date": "2024-01-01"
      },
      "location": "us"
    }
  }
}

Response

Monitor updated successfully.

type'event_stream' | 'snapshot' required

The type of monitor.

monitor_idstring required

ID of the monitor.

status'active' | 'cancelled' required

Status of the monitor.

frequencystring required

Frequency of the monitor. Format: '<number><unit>' where unit is 'h' (hours), 'd' (days), or 'w' (weeks). Must be between 1h and 30d (inclusive).

processor'lite' | 'base' | 'core' required

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.

metadataobject nullable

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.

created_atstring date-time required

Timestamp of the creation of the monitor, as an RFC 3339 string.

last_run_atstring nullable

Timestamp of the last run for the monitor, as an RFC 3339 string.

Example response

{
  "type": "event_stream",
  "status": "active",
  "frequency": "1h",
  "processor": "lite",
  "webhook": {
    "url": "https://example.com/webhook"
  },
  "metadata": {
    "slack_thread_id": "1234567890.123456",
    "user_id": "U123ABC"
  },
  "created_at": "2025-01-15T10:30:00Z",
  "last_run_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"
      }
    },
    "advanced_settings": {
      "source_policy": {
        "include_domains": [
          "wikipedia.org",
          "docs.python.org/3",
          ".edu"
        ],
        "exclude_domains": [
          "reddit.com",
          "youtube.com/shorts",
          ".ai"
        ],
        "after_date": "2024-01-01"
      },
      "location": "us"
    }
  },
  "output": {
    "latest_snapshot": {
      "basis": [
        {
          "confidence": "low"
        }
      ]
    }
  }
}

Changes

    • warning

      added the new core enum value to the response property for the response status

    • info

      added the new optional request property

    • info

      added the new optional request property //