Skip to main content
POST
A watch tells you when one attribute of one entity changes and charges your prepaid credits per change delivered (Pricing). Creating, listing, changing and deleting are free. An attribute can be watched while a validated scheduled dataset covers it. Anything else is refused; the refusal’s watchable field and GET /v1/org/watchable list watchable attributes, for example solicitations, sanctions and motor carrier authority and insurance. A watch starts at creation (earlier changes are for Changes), and the entity must be on the source’s current list. A watch survives a source outage: nothing is delivered or charged until the dataset is validated again; then each genuine change is delivered and charged once. A delivered change has changed_on, field, before, after, source and as_of. An entity that stops being listed is a change with field $entity; several fields changing at once are one delivery with field $ and the whole earlier and later value.

Spending cap

max_spend is at least the price of one change, at most the maximum on Pricing. When the next change would pass it, or your credits cannot pay, the watch is paused with pause_reason cap or credits and you are told once. Changes meanwhile are delivered when the watch runs again: by itself once your credits can pay, or when you raise max_spend.

Delivery

Each change is delivered once and charged once, as a watch_change notification (GET /v1/tools/notifications) and, with a webhook_url, as a signed webhook after the charge. A failing webhook is retried, then given up on; the notification, charge and watch stand. Every charge has a signed receipt. Regulated webhooks omit content. Unregulated: type watch.change, delivery_id, watch_id, entity_type, attribute, key, change, charged and receipt_id, signed in X-OneShot-Signature with the secret returned at setup. At most 100 undeleted watches.

Create: POST /v1/tools/watch

string
required
For example company
string
required
For example sanctions
string
required
The source’s own identifier, as Changes takes it
number
required
In dollars
string
HTTPS URL. webhook_secret is returned once.

List: GET /v1/tools/watch

status (running or paused), pause_reason (cap, credits or agent), spent, changes_delivered, last_delivery_at.

Change: PATCH /v1/tools/watch/:id

max_spend, webhook_url (a new URL gets a new secret; null stops sending), paused (true pauses; false resumes a watch you paused).

Delete: DELETE /v1/tools/watch/:id

A deleted watch delivers and charges nothing more.

Authentication

A signed agent proof (X-Agent-ID, X-Agent-Proof): write scope for create, change and delete, read for list. An access token cannot change watches unless it comes from signing in with your OneShot account.