PUT / DELETE Update & Delete Monitor
Update a monitor's configuration or delete it
PUT
https://api.anakin.io/v1/monitors/{id}Update a monitor. The body is the same shape as Create — send the full desired configuration, not a partial patch.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id required | string | The monitor ID. |
Request Body
Identical to Create Monitor. A few notes on update semantics:
- Signing secret is preserved. Changing
alertWebhookUrlkeeps the existingalertWebhookSecret; a secret is only generated the first time you add a webhook. - Changing
watchModeorwatchFormatre-baselines the monitor — stored snapshots are cleared so the next check starts fresh (no spurious "changed" alert). - Pausing: send
"isActive": false(or use the dedicated pause endpoint).
Response
200 OKReturns the updated Monitor object. 404 not_found if it isn't yours; 400 invalid_request on validation failure.
DELETE
https://api.anakin.io/v1/monitors/{id}Permanently delete a monitor and all of its snapshots and change history. This cannot be undone.
Response
200 OK{ "success": true }Returns 404 not_found if the monitor doesn't exist or isn't yours.
Code Examples
# Update — change the interval to every 4 hours
curl -X PUT https://api.anakin.io/v1/monitors/b1e7c2a4-... \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/product/123", "watchMode": "full_page", "intervalMinutes": 240 }'
# Delete
curl -X DELETE https://api.anakin.io/v1/monitors/b1e7c2a4-... \
-H "X-API-Key: your_api_key"import requests
headers = {"X-API-Key": "your_api_key"}
mid = "b1e7c2a4-..."
requests.put(
f"https://api.anakin.io/v1/monitors/{mid}",
headers=headers,
json={"url": "https://example.com/product/123", "watchMode": "full_page", "intervalMinutes": 240},
)
requests.delete(f"https://api.anakin.io/v1/monitors/{mid}", headers=headers)const headers = { "X-API-Key": "your_api_key", "Content-Type": "application/json" };
const mid = "b1e7c2a4-...";
await fetch(`https://api.anakin.io/v1/monitors/${mid}`, {
method: "PUT",
headers,
body: JSON.stringify({ url: "https://example.com/product/123", watchMode: "full_page", intervalMinutes: 240 }),
});
await fetch(`https://api.anakin.io/v1/monitors/${mid}`, { method: "DELETE", headers });