> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Context.dev: Contextdev Update Monitor

> Change a web change monitor's name, target, schedule, webhook, or status. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Change a web change monitor's name, target, schedule, webhook, or status.

> [!NOTE]
>
> Tool ID: `contextdev_update_monitor`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_update_monitor',
  {
    "monitor_id": "monitor_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute contextdev_update_monitor --input '{
  "monitor_id": "monitor_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "mode": "web",
    "id": "id_123",
    "name": "Example",
    "target": {},
    "change_detection": {},
    "schedule": {},
    "status": "active",
    "created_at": "2026-01-15T12:00:00Z",
    "updated_at": "2026-01-15T12:00:00Z"
  }
}
```

Use `deepline describe contextdev_update_monitor --json` for the latest machine-readable contract.

## Input reference

Shared monitor update fields. `target` and `change_detection` can be updated, but the final combination must be supported.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.monitor_id` | `string` | Yes | — | — |
| `payload.name` | `string` | No | — | Minimum length: 1. Maximum length: 200. |
| `payload.tags` | `array` | No | — | User-defined tags for grouping and filtering monitors and their changes. Duplicates are removed. Maximum items: 20. Items must be unique. |
| `payload.status` | `"active" \| "paused"` | No | — | Allowed: `active`, `paused`. |
| `payload.target` | `object` | No | — | Discriminated union describing what the monitor watches. |
| `payload.change_detection` | `object` | No | — | Discriminated union describing how changes are detected. |
| `payload.schedule` | `object` | No | — | Discriminated union describing how the monitor is scheduled. Only `interval` is supported today. `cron` and `exact_time` are reserved for future use. |
| `payload.webhook` | `object` | No | — | Set to null to remove the webhook. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Shared monitor update fields. `target` and `change_detection` can be updated, but the final combination must be supported.",
    "properties": {
      "monitor_id": {
        "type": "string"
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "tags": {
        "type": "array",
        "description": "User-defined tags for grouping and filtering monitors and their changes. Duplicates are removed.",
        "maxItems": 20,
        "uniqueItems": true,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      },
      "status": {
        "type": "string",
        "enum": [
          "active",
          "paused"
        ]
      },
      "target": {
        "description": "Discriminated union describing what the monitor watches.",
        "anyOf": [
          {
            "type": "object",
            "description": "Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "page"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "instructions": {
                "type": "string",
                "description": "Plain-language goal describing which page changes matter. When provided without change_detection, semantic detection is inferred.",
                "minLength": 1,
                "maxLength": 2000
              },
              "normalize_whitespace": {
                "type": "boolean",
                "description": "Normalize whitespace before comparing or analyzing text.",
                "default": true
              }
            },
            "required": [
              "type",
              "url"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "description": "Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "sitemap"
                ]
              },
              "url": {
                "type": "string",
                "description": "Sitemap URL to monitor.",
                "format": "uri"
              },
              "include": {
                "type": "array",
                "description": "URL path patterns to include (max 50).",
                "maxItems": 50,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "exclude": {
                "type": "array",
                "description": "URL path patterns to exclude (max 50).",
                "maxItems": 50,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "max_urls": {
                "type": "integer",
                "description": "Maximum number of sitemap URLs to track (capped at 10,000).",
                "default": 5000,
                "minimum": 1,
                "maximum": 10000
              }
            },
            "required": [
              "type",
              "url"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "extract"
                ]
              },
              "url": {
                "type": "string",
                "description": "Root URL to extract structured data from.",
                "format": "uri"
              },
              "schema": {
                "type": "object",
                "description": "JSON Schema describing the data you care about. It is used three ways: it guides which pages are selected for tracking, it gives the change judge extra context on which changes matter (alongside `instructions`), and it defines the shape of the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most about once a day). It is not a response format for changes: change events and webhook payloads always contain diffs, summaries, and evidence excerpts — never data in this schema's shape. If omitted, a default summary + key-points schema is used.",
                "additionalProperties": {}
              },
              "instructions": {
                "type": "string",
                "description": "Natural-language instructions guiding which pages and facts to track and which changes to report.",
                "minLength": 1,
                "maxLength": 2000
              },
              "max_pages": {
                "type": "integer",
                "description": "Maximum number of pages to track.",
                "default": 10,
                "minimum": 1,
                "maximum": 50
              },
              "max_depth": {
                "type": "integer",
                "description": "Optional maximum link depth from the starting URL (0 = only the starting page).",
                "minimum": 0,
                "maximum": 10
              },
              "follow_subdomains": {
                "type": "boolean",
                "default": false
              }
            },
            "required": [
              "type",
              "url",
              "instructions"
            ],
            "additionalProperties": false
          }
        ]
      },
      "change_detection": {
        "description": "Discriminated union describing how changes are detected.",
        "anyOf": [
          {
            "type": "object",
            "description": "Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "exact"
                ]
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "description": "Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "semantic"
                ]
              },
              "confidence_threshold": {
                "type": "number",
                "default": 0.75,
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          }
        ]
      },
      "schedule": {
        "description": "Discriminated union describing how the monitor is scheduled. Only `interval` is supported today; `cron` and `exact_time` are reserved for future use.",
        "anyOf": [
          {
            "type": "object",
            "description": "Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "interval"
                ]
              },
              "frequency": {
                "type": "integer",
                "description": "Number of units between runs. The resulting interval (frequency × unit) must be at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes; maximum 365 when unit is days).",
                "minimum": 1,
                "maximum": 525600
              },
              "unit": {
                "type": "string",
                "enum": [
                  "minutes",
                  "hours",
                  "days"
                ]
              }
            },
            "required": [
              "type",
              "frequency",
              "unit"
            ],
            "additionalProperties": false
          }
        ]
      },
      "webhook": {
        "type": [
          "object",
          "null"
        ],
        "description": "Set to null to remove the webhook.",
        "properties": {
          "url": {
            "type": "string",
            "description": "Webhook URL events are delivered to.",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "description": "Events delivered to this endpoint. `change.detected` fires only when a run detects a change; `run.completed` fires on every completed run — including runs that detected no change — and embeds the change when one was detected. Defaults to `[\"change.detected\"]` when omitted.",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "change.detected",
                "run.completed"
              ]
            }
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "monitor_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.mode` | `"web"` | Yes | — | Allowed: `web`. |
| `result.data.id` | `string` | Yes | — | — |
| `result.data.name` | `string` | Yes | — | — |
| `result.data.target` | `record` | Yes | — | — |
| `result.data.change_detection` | `record` | Yes | — | — |
| `result.data.schedule` | `record` | Yes | — | — |
| `result.data.webhook` | `object \| null` | No | — | — |
| `result.data.webhook.url` | `string` | Yes | — | Format: `uri`. |
| `result.data.webhook.events` | `array` | No | — | Minimum items: 1. Maximum items: 2. Items must be unique. |
| `result.data.status` | `"active" \| "paused" \| "failed"` | Yes | — | Allowed: `active`, `paused`, `failed`. |
| `result.data.last_run_at` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.last_change_at` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.next_run_at` | `string \| null` | No | — | Format: `date-time`. |
| `result.data.last_error` | `object \| null` | No | — | — |
| `result.data.last_error.code` | `string` | Yes | — | — |
| `result.data.last_error.message` | `string` | Yes | — | — |
| `result.data.webhook_failure` | `object \| null` | No | — | — |
| `result.data.webhook_failure.consecutive_failures` | `integer` | Yes | — | Minimum: 1. |
| `result.data.webhook_failure.last_status` | `"rejected" \| "failed" \| "skipped_unsafe_url"` | Yes | — | Allowed: `rejected`, `failed`, `skipped_unsafe_url`. |
| `result.data.webhook_failure.last_message` | `string` | Yes | — | — |
| `result.data.webhook_failure.last_failed_at` | `string` | Yes | — | Format: `date-time`. |
| `result.data.created_at` | `string` | Yes | — | Format: `date-time`. |
| `result.data.updated_at` | `string` | Yes | — | Format: `date-time`. |
| `result.data.tags` | `array` | No | — | Maximum items: 20. Items must be unique. |
| `result.data.baseline` | `record` | No | — | — |
| `result.meta` | `object` | No | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "web"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "target": {
            "type": "object",
            "additionalProperties": true
          },
          "change_detection": {
            "type": "object",
            "additionalProperties": true
          },
          "schedule": {
            "type": "object",
            "additionalProperties": true
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "events": {
                "type": "array",
                "minItems": 1,
                "maxItems": 2,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "enum": [
                    "change.detected",
                    "run.completed"
                  ]
                }
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "failed"
            ]
          },
          "last_run_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_change_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "next_run_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_error": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "webhook_failure": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "consecutive_failures": {
                "type": "integer",
                "minimum": 1
              },
              "last_status": {
                "type": "string",
                "enum": [
                  "rejected",
                  "failed",
                  "skipped_unsafe_url"
                ]
              },
              "last_message": {
                "type": "string"
              },
              "last_failed_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "consecutive_failures",
              "last_status",
              "last_message",
              "last_failed_at"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "maxItems": 20,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            }
          },
          "baseline": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "mode",
          "id",
          "name",
          "target",
          "change_detection",
          "schedule",
          "status",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Context.dev provider guide](https://deepline.com/docs/providers/contextdev/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.