Create a monitoring job
POST/v1/watch/jobs
Registers a page with a schedule and returns the job. The job is created on the fetch platform under flowda's credential; ownership stays with your account here.
Request body
urlstringrequiredscheduleobjectrequiredinterval_seconds is 60 … 2592000 and runs on the UTC timeline (the timezone does not shift it); cron is a standard five-field expression interpreted in timezone (weekends included).timezonestringcron schedules only.countrystringselectorstringselector_typestringselector is interpreted.diff_modesstring[]retention_daysinteger0 means keep it indefinitely.webhook_urlstringheadersobject<string,string>maskobjectmask.enabled (boolean) and mask.exclude (array of iso_timestamp, unix_timestamp, relative_time, counter, uuid, session_token, tracking_param, cache_buster, resource_hash, iframe_marker).schedule is a nested object: schedule_interval and schedule_cron used to
exist as top-level fields and are rejected — use schedule.
The body is accepted as JSON or form-encoded (application/x-www-form-urlencoded).
With form encoding, schedule, headers and mask are JSON object strings and
diff_modes is sent by repeating the field name (or as a JSON array string) — the
same rules as the other endpoints that accept form bodies.
If webhook_url is new to this account, the response additionally carries
data.data.webhook_secret once: store it. It is the HMAC key our callbacks are
signed with and it is never returned again — not by GET /v1/watch/jobs/{id}, not
in the list.
Receiving callbacks
We POST to your address with Content-Type: application/json, a JSON body holding
the change event, and these headers:
| Header | Meaning |
|---|---|
X-Watch-Signature | t= followed by unix seconds, then ,v1= followed by a lowercase hex digest. The digest is HMAC-SHA256 over the string built from those unix seconds, a dot, then the raw request body bytes. Reject anything whose timestamp is more than 5 minutes away, and compare digests in constant time. |
X-Flowda-Event | Event name; currently watch.change_detected. |
X-Flowda-Event-Id | Stable idempotency key for job, check and event; use it to deduplicate deliveries. |
X-Flowda-Delivery-Id | Identifier of this delivery. |
X-Flowda-Attempt | Attempt number, starting at 1. |
Verify over the raw body bytes you received: parsing the JSON and serializing it
again changes the bytes and breaks the signature. Answer 2xx quickly. A non-2xx
answer is retried, up to 6 delivery attempts in total, with delays of 10s, 1m, 5m,
30m and 2h between them; 4xx answers other than 408, 425 and 429 stop immediately,
and Retry-After is honoured up to 10 minutes.
The body is a watch.change_detected event: the job and check identifiers, a
one-line data.check.diff_summary, and the change itself under data.diff. Its
schema is the changeDetected callback of this operation; data.delivered_at is
when the platform created the event, which is not the timestamp in the signature
header.
Request
Responses
- 200
- 400
- 401
- 403
The created job, nested as data.data.job, plus data.data.webhook_secret when a new callback URL was registered
Response Headers
Always no-store — no intermediary may cache these responses.
The fetch service's own request identifier for this call. Quote it together with
the envelope's request_id in support requests.
The request was rejected — see the error table for the code
The credential is missing, invalid, or expired
The credential is valid but not allowed to do this
Callbacks
- POST changeDetected
POST{$request.body#/webhook_url}
Delivered to the callback address registered for this job. Only change
events are sent: a check that finds no change delivers nothing, and a job
without webhook_url sends nothing.
Every request is signed with that job's webhook_secret; the Webhooks guide
lists the headers, the string that is signed and the retry rules. Read the
change itself from data.diff, or just its one-line summary from
data.check.diff_summary.
Callbacks Responses
- 2XX
Any 2xx accepts the event. A non-2xx answer is retried, up to 6 delivery attempts in total; 4xx answers other than 408, 425 and 429 stop immediately.