PUT / DELETE Update & Delete Monitor

Update a monitor's configuration or delete it

PUThttps://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

ParameterTypeDescription
id requiredstringThe monitor ID.

Request Body

Identical to Create Monitor. A few notes on update semantics:

  • Signing secret is preserved. Changing alertWebhookUrl keeps the existing alertWebhookSecret; a secret is only generated the first time you add a webhook.
  • Changing watchMode or watchFormat re-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 OK

Returns the updated Monitor object. 404 not_found if it isn't yours; 400 invalid_request on validation failure.


DELETEhttps://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"