WIRE INTO THE WATCH.
A versioned API for your monitoring workflows.
AUTHENTICATION
Create a scoped bearer token in Settings. Tokens are shown once, stored as hashes, and expire or can be revoked. Monitor access also depends on the account’s role and ownership. Rate limits return HTTP 429.
curl https://watch.xxc.dk/api/v1/targets \ -H "Authorization: Bearer $XXC_TOKEN"
CREATE A MONITOR
curl -X POST https://watch.xxc.dk/api/v1/targets \
-H "Authorization: Bearer $XXC_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: create-example-001' \
--data '{"name":"Example","url":"https://example.com","rules":[
{"type":"keyword","interval_seconds":300,"config":{
"pattern":"Example Domain","mode":"disappears"}}
]}'Use Idempotency-Key for POST requests you may retry. Reusing a key with different content returns 409. The first successful check establishes a baseline unless alert_initial is enabled.
INTERACTIVE ENDPOINT REFERENCE
This reference loads the local OpenAPI document. Requests run only when you press Send. Your token is kept in this page’s memory.
No request sent.
RULE CONFIGURATION
Each target accepts multiple rules with a type, name, interval_seconds, timeout_seconds, retries, severity, cooldown_seconds, consecutive_failures, recovery and baseline_strategy (rolling or fixed).
{
"type": "selector", "name": "Article content", "interval_seconds": 600,
"config": {
"selector": "article", "mode": "percent", "threshold": 5,
"ignore_selectors": [".advertisement", ".cookie-banner"],
"ignore_comments": true, "ignore_scripts": true,
"ignore_styles": true, "ignore_whitespace": true,
"ignore_timestamps": true, "ignore_patterns": []
}
}Keyword rules support case_sensitive and exact_word. Regex patterns use PHP delimiter syntax such as /available/i. JSON paths support property names and array indices, such as $.items[0].price. Percentage and character thresholds measure the differing span after removing the common prefix and suffix. Visible text extraction uses the HTML DOM; it does not execute JavaScript.
ERRORS & PAGINATION
List responses contain data and meta. Use page and per_page (maximum 100); target lists also accept q, tag, group, filter and sort. Errors contain code, message and request_id. Private artifact endpoints use browser-session authorization.