Monitors
Create a monitor
Changed onWatch a page, URL inventory, or extracted website data on a schedule. A run starts immediately to capture the baseline.
post/monitors
Request
- Base URL: https://api.context.dev/v1
- URL: https://api.context.dev/v1/monitors
- Auth: HTTP bearer
Request body
Example request
{
"name": "Acme pricing monitor",
"tags": [
"pricing",
"competitor"
],
"target": {
"url": "https://acme.com/pricing",
"instructions": "Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.",
"include_selectors": [
"#attraction-details"
],
"exclude_selectors": [
".carousel",
"[id^=\"TA_\"]"
]
},
"schedule": {
"frequency": 6,
"unit": "hours"
},
"webhook": {
"url": "https://example.com/webhook",
"events": [
"change.detected",
"run.completed"
],
"retry": {
"delays_seconds": [
10,
60,
300,
1800,
7200,
21600,
57600
]
},
"secret": "whsec_8f3a…"
}
}Response
Monitor created
Example response
{
"id": "mon_123",
"name": "Acme pricing monitor",
"target": {
"url": "https://acme.com/pricing",
"instructions": "Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.",
"include_selectors": [
"#attraction-details"
],
"exclude_selectors": [
".carousel",
"[id^=\"TA_\"]"
]
},
"schedule": {
"frequency": 6,
"unit": "hours"
},
"webhook": {
"url": "https://example.com/webhook",
"events": [
"change.detected",
"run.completed"
],
"retry": {
"delays_seconds": [
10,
60,
300,
1800,
7200,
21600,
57600
]
},
"secret": "whsec_8f3a…"
},
"last_error": {
"code": "fetch_failed",
"message": "The target URL could not be fetched."
},
"webhook_failure": {
"consecutive_failures": 3,
"last_message": "Webhook endpoint returned HTTP 429."
},
"tags": [
"pricing",
"competitor"
],
"baseline": {
"text": "Acme Pricing\nStarter $9/mo…"
},
"initial_run_id": "run_123",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"
}Changes
- warning
added the new
NO_PUBLISHED_MARKDOWNenum value to theresponse property for the response status - warning
added the new
NO_PUBLISHED_MARKDOWNenum value to theresponse property for the response status - warning
added the new
NO_PUBLISHED_MARKDOWNenum value to theresponse property for the response status
- warning
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info