Snag Watcher

API reference

Update a watcher

PATCH /v1/watchers/{id}

Send only the fields you're changing. We check the whole watcher again, as on create.

Field
status"paused" or "active"
conditions, schedule, notify, where, location, fetch, thenReplaces that block
metadataReplaces your labels

You can't change target (that's 422 target_fixed), so create a new watcher instead. Conditions that use first_snapshot keep comparing with the first run they had.

Pause and resume

Shell
curl -X PATCH https://api.watcher.manwhas.shop/v1/watchers/wch_dhjqcvaqnhrchsnv7gtc \
  -H "Authorization: Bearer $SNAG_KEY" -H "Content-Type: application/json" \
  -d '{ "status": "paused" }'

Resuming runs the watcher right away. Changing status on a matched or expired watcher returns 409 watcher_finished.

Change the schedule

Shell
curl -X PATCH https://api.watcher.manwhas.shop/v1/watchers/wch_dhjqcvaqnhrchsnv7gtc \
  -H "Authorization: Bearer $SNAG_KEY" -H "Content-Type: application/json" \
  -d '{ "schedule": { "every": "6h", "until": "+60d" } }'

It returns the updated watcher object. Adding a webhook to a watcher that had none also returns a new webhook_secret. A new webhook URL starts fresh, so failures at the old address don't keep it paused.