Monitors
A monitor reruns one Chab tool with the same input on a schedule. It keeps every run and says what changed since the run before. When something changes, it emails the team and can call your webhook. The guide Monitoring shows the common setups.
These are management endpoints. They are free to call. Every run a monitor starts is a normal operation of its tool, charged like a start of that tool.
Access
- Monitors need bought credits or a monthly plan. Free credits do not cover
them, because a monitor spends credits every day. On free credits, creating,
resuming or running a monitor fails with
operation_not_available_on_free. - There is no extra scope. A key sees and manages the monitors of the tools it
may start. A key with
api:search:readsees search and AI visibility monitors, a key withapi:scrape:readsees page monitors. - Creating, changing, resuming and running a monitor needs a key that may
spend the team balance (spending mode
all). Other keys gettoken_spending_disabled. Reading, pausing and deleting need no spending. - Monitors belong to the team, not to the key that made them. They keep running after that key is revoked. Pause or delete them in the app or here.
- Monitors that read an uploaded file cannot be made:
convert.file, the document, speech and image tools, andseo.domains.audit_report. - A team can have up to 200 monitors.
How runs work
schedule.frequencyishourly,dailyorweekly.schedule.timeis a 24-hour time (default09:00). Hourly monitors run every hour at its minute. Weekly monitors run onschedule.weekday(defaultmonday).schedule.timezoneis an IANA name (defaultUTC).- The first run starts within a minute of creating the monitor. It is the starting point; later runs are compared with the run before them.
- There is one run per scheduled time. If Chab could not run a time, it does not make it up later; the next scheduled time runs as usual.
- A run starts as a normal operation. It shows in the team's operation history
and its
operation_idis the full result, kept like any other result. monthly_credit_capis the most credits the monitor's runs may use in a calendar month (UTC). Without it, a monitor gets enough for every scheduled run of a month. A run that would go over the cap is skipped withmonthly_cap_reached. A run the team balance cannot cover is skipped withnot_enough_credits.- Hosted MCP connections have a daily spending limit. A monitor made through
hosted MCP must fit in it, and its runs count toward it together with what
the connection starts itself. A run that would go over it is skipped with
connection_daily_limit;chab_monitor_runanswersspend_threshold_exceeded.
What is compared
change_kind says how runs are compared:
| Kind | Tools | What a change is |
|---|---|---|
ranks |
search.serp, search.web, seo.domains.keywords, seo.ranks.check |
A result that is new, gone, or moved up or down, biggest moves first. With track_domain, only results on that domain count. seo.domains.keywords and seo.ranks.check compare each keyword's position; a keyword a rank check could not check is not counted as gone. |
ai_visibility |
search.ai_visibility |
Mentions of each brand going up or down, in total and per platform. |
page |
scrape.markdown |
Lines of text added or removed, and a new page title. Spaces and empty lines are ignored. |
fields |
any other tool | Top-level result fields that changed, appeared or went away. Fetch times are ignored. |
Each run has changes with a summary in plain words, counts and items.
baseline: true marks the first run. observed shows what the run saw, such
as the positions it found.
Alerts
alert.email(defaulttrue) emails the team members when a run finds a change, and once when three runs in a row fail.alert.webhook_urlwithalert.webhook_secret(at least 16 characters) sends aPOSTfor the same events, signed like operation callbacks:Chab-Signatureis an HMAC-SHA256 of{Chab-Timestamp}.{raw body}with your secret. The body hasid,type(monitor.changedormonitor.failing),created_atanddatawith themonitorand therun. A failed delivery is tried two more times. The secret is never returned;webhook_secret_setsays one is saved.
Run statuses
| Status | Meaning |
|---|---|
pending |
Waiting to start. A run that hits a rate limit or a busy tool waits here and tries again each minute, up to five times. |
running |
Its operation is running. |
succeeded |
Done and compared. |
failed |
The tool failed, or the run could not start. reason has the error code. |
skipped |
Not started on purpose: monthly_cap_reached, not_enough_credits, needs_paid_credits, connection_daily_limit or paused. |
reason_message explains the reason in plain words.
GET/v1/monitors
Lists the team's monitors you may see, oldest first, with limit (1 to 100,
default 50) and cursor. Each has its latest_run.
curl https://www.chab.ai/v1/monitors?limit=20 \
-H "Authorization: Bearer CHAB_API_KEY"
POST/v1/monitors
Creates a monitor. Needs an Idempotency-Key header.
{
"name": "CRM ranking",
"operation_key": "search.serp",
"input": {"query": "best crm for small business", "engine": "google", "location": {"country": "US"}, "language": "en"},
"track_domain": "example.com",
"schedule": {"frequency": "daily", "time": "07:00", "timezone": "Europe/Berlin"},
"monthly_credit_cap": 200,
"alert": {"email": true}
}
input is checked like a start of the tool. Errors in it come back as
validation_failed with fields such as input.query. Callback fields are not
accepted in input; use alert instead. The response has the monitor with
estimated_credits_per_run.
curl -X POST https://www.chab.ai/v1/monitors \
-H "Authorization: Bearer CHAB_API_KEY" \
-H "Idempotency-Key: monitor-001" \
-H "Content-Type: application/json" \
-d '{"operation_key":"search.serp","input":{"query":"best crm for small business","engine":"google","location":{"country":"US"},"language":"en"},"track_domain":"example.com","schedule":{"frequency":"daily","time":"07:00","timezone":"Europe/Berlin"},"monthly_credit_cap":200}'
GET/v1/monitors/{monitor_id}
Returns the monitor and its 30 most recent runs as recent_runs.
curl https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k \
-H "Authorization: Bearer CHAB_API_KEY"
PATCH/v1/monitors/{monitor_id}
Changes the fields you send: name, input, track_domain, schedule,
monthly_credit_cap and alert. The tool of a monitor cannot change. A new
schedule starts at its next scheduled time. A new input or track_domain
makes the next run a new starting point. Needs an Idempotency-Key header.
curl -X PATCH https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k \
-H "Authorization: Bearer CHAB_API_KEY" \
-H "Idempotency-Key: monitor-001" \
-H "Content-Type: application/json" \
-d '{"schedule":{"frequency":"weekly","weekday":"monday","time":"07:00","timezone":"Europe/Berlin"}}'
DELETE/v1/monitors/{monitor_id}
Deletes the monitor and its run history. Its past runs stay in the team's
operation history. Needs an Idempotency-Key header.
curl -X DELETE https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k \
-H "Authorization: Bearer CHAB_API_KEY" \
-H "Idempotency-Key: monitor-001"
POST/v1/monitors/{monitor_id}/pause
Stops the runs until you resume. Needs an Idempotency-Key header.
curl -X POST https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k/pause \
-H "Authorization: Bearer CHAB_API_KEY" \
-H "Idempotency-Key: monitor-001"
POST/v1/monitors/{monitor_id}/resume
Starts the runs again. If the current scheduled time has not run yet, it runs
within a minute. Needs an Idempotency-Key header.
curl -X POST https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k/resume \
-H "Authorization: Bearer CHAB_API_KEY" \
-H "Idempotency-Key: monitor-001"
POST/v1/monitors/{monitor_id}/run
Runs the monitor once now and returns the run with HTTP 202. It is charged
like a normal run and counts toward the monthly cap. There is at most one
extra run per monitor and minute; a second call in the same minute returns the
same run. Needs an Idempotency-Key header.
curl -X POST https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k/run \
-H "Authorization: Bearer CHAB_API_KEY" \
-H "Idempotency-Key: monitor-001"
GET/v1/monitors/{monitor_id}/runs
Lists all runs, newest first, with limit (1 to 100, default 50) and
cursor. changed=true returns only the runs that found a change.
curl https://www.chab.ai/v1/monitors/mon_01jz7h0a1b2c3d4e5f6g7h8j9k/runs?changed=true \
-H "Authorization: Bearer CHAB_API_KEY"
Errors
| Code | When |
|---|---|
validation_failed |
A field or the tool input is not valid. |
operation_not_available_on_free |
The team has only free credits. |
token_spending_disabled |
The key may not spend the team balance. |
api_scope_missing |
The key may not start the monitor's tool. |
not_found |
No such monitor in your team, or not one you may see. |