Developer workflow
WebChange Quickstart
Copy these commands after you have an API key. Replace the host with your deployment, and keep the key in the environment rather than in the request examples.
Core API workflow
export BASE_URL="https://api.example.com"
export WEBCHANGE_API_KEY="your-api-key"
curl -X GET "$BASE_URL/v1/auth/me" \
-H "X-API-Key: $WEBCHANGE_API_KEY"
curl -X POST "$BASE_URL/v1/watches" \
-H "X-API-Key: $WEBCHANGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Pricing page",
"url": "https://example.com/pricing",
"selector": "#pricing",
"check_interval_seconds": 900
}'
export WATCH_ID="<id from the POST /v1/watches response>"
curl -X POST "$BASE_URL/v1/watches/$WATCH_ID/check" \
-H "X-API-Key: $WEBCHANGE_API_KEY"
curl -X GET "$BASE_URL/v1/watches/$WATCH_ID/changes" \
-H "X-API-Key: $WEBCHANGE_API_KEY"
curl -X GET "$BASE_URL/v1/usage" \
-H "X-API-Key: $WEBCHANGE_API_KEY"
curl -X GET "$BASE_URL/v1/watches" \
-H "X-API-Key: $WEBCHANGE_API_KEY"
curl -X DELETE "$BASE_URL/v1/watches/$WATCH_ID" \
-H "X-API-Key: $WEBCHANGE_API_KEY"
What the first check does
The first successful check establishes a baseline. A baseline does not
create a change notification. Manual checks do not advance
next_check_at. Scheduled monitoring proceeds independently of
those manual checks.
DELETE logically disables a watch. It does not erase history.