Create monitor
/monitorsCreate a monitor: a schedule that fills a dataset's output columns again daily, weekly, or monthly, compares each cell with the previous run, and can POST the results (or only changes) to a webhook. Pass dataset_id (or enrichment_id naming the dataset's enrichment) and, optionally, columns — the output column names each run fills (every one when omitted). The rows are the dataset's: a monitor takes no input; add rows with POST /datasets/{id}/rows.
Creating the monitor charges nothing. Every scheduled run is a fill of the dataset and charges the fill price (rows × the enrichment's per-row budget at most). estimate_cost: true returns the credit estimate for one scheduled run; max_credits refuses the monitor when that estimate is higher. Each run is listed by GET /monitors/{id}/runs and read by GET /runs/{id}/result; with output_format: include_diffs every cell carries previous_value and changed.
Request bodyrequired
dataset_idstringThe dataset to fill again on the schedule (ds_...). One of dataset_id / enrichment_id is required.
columnsarray of stringOutput column names each run fills. Omit for every output column, including ones added later.
enrichment_idstringInstead of dataset_id — the enrichment bound to the dataset (enr_...).
cadencestringrequiredHow often the monitor runs
minuteintegerrequiredMinute of the hour to run
hourintegerrequiredHour of the day to run
day_of_weekintegerDay of the week (0=Sunday, required for weekly)
day_of_monthintegerDay of the month (required for monthly)
timezonestringrequiredTimezone (e.g. 'UTC', 'America/New_York')
webhook_urlstring uriURL to receive results each scheduled run
alert_rulestringWhen the webhook fires — every run, only when a monitored cell changed since the previous run, or never (default each_run)
output_formatstringinclude_diffs adds previous_value and changed to every cell of the run's output and webhook payload (default current_only)
run_immediatelybooleanAlso run the monitor immediately after creation (a paid run)
estimate_costEstimateCostParamValidate and price the request without running or charging anything; the 200 response is the credit estimate (EstimateCostResult).
max_creditsMaxCreditsParamCredit ceiling. Refused with 422 credit_cap_exceeded (nothing charged) when the estimate's maximum exceeds it.
Responses
200estimate_cost only — the credit estimate for ONE scheduled run (the dataset's rows × the per-row budget; type monitor); nothing was created
estimate_costbooleanrequiredtypestringrequiredWhat would have been charged for (monitor = one scheduled run of the monitor)
The estimate made at kickoff next to what has been charged so far. estimate is null for runs
started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.
Attributes
estimateone ofrequiredAttributes
CreditEstimate model →
minimumnumberrequiredLeast the run can cost
expectednumberLikely cost from past runs of the same config; absent without history
typicalobjectRecent p25–p75 settled range for builds of this size; absent without a dataset build estimate
Attributes
lownumberrequiredhighnumberrequiredmaximumnumberrequiredMost the run can cost
upfrontnumberCredits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes
charged_upfrontbooleanrequiredtrue when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes
- null
credits_usednumberrequiredCredits charged so far (same value as the top-level credits_used)
credits_remainingnumberAccount balance. Only on estimates and credit errors.
sufficient_creditsbooleanWhether the balance covers estimate.maximum. Only on estimates and credit errors.
201Monitor created
idstringMonitor id (mon_...)
namestringenabledbooleancadencestringminuteintegerhourintegerday_of_weekintegernullableday_of_monthintegernullabletimezonestringwebhook_urlstring urinullablealert_rulestringoutput_formatstringnext_run_atstring date-timenullableschedule_summarystringHuman-readable schedule (e.g. "Daily at 9:00 UTC")
dataset_idstringThe dataset each run fills (ds_...)
dataset_namestringThe dataset's name
columnsarray of stringThe output column names each run fills (every one when absent)
enrichment_idstringThe dataset's enrichment
created_atstring date-time400The request is malformed or names a conflicting parameter combination
errorobjectrequiredAttributes
typestringrequiredMachine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)
messagestringrequiredHuman-readable explanation
detailsanyOptional extra context (e.g. per-field validation errors)
credit_detailCreditDetailThe estimate made at kickoff next to what has been charged so far. estimate is null for runs
started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.
Attributes
estimateone ofrequiredAttributes
CreditEstimate model →
minimumnumberrequiredLeast the run can cost
expectednumberLikely cost from past runs of the same config; absent without history
typicalobjectRecent p25–p75 settled range for builds of this size; absent without a dataset build estimate
Attributes
lownumberrequiredhighnumberrequiredmaximumnumberrequiredMost the run can cost
upfrontnumberCredits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes
charged_upfrontbooleanrequiredtrue when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes
- null
credits_usednumberrequiredCredits charged so far (same value as the top-level credits_used)
credits_remainingnumberAccount balance. Only on estimates and credit errors.
sufficient_creditsbooleanWhether the balance covers estimate.maximum. Only on estimates and credit errors.
401Missing or invalid API key (request_status body — see the AuthError schema)
request_statusstringmessagestringerror_typestring403The API key's account may not access this resource or endpoint (forbidden), or the account has not migrated to Datasets yet (feature_not_enabled — open Datasets in the app and click "Migrate to Datasets")
errorobjectrequiredAttributes
typestringrequiredMachine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)
messagestringrequiredHuman-readable explanation
detailsanyOptional extra context (e.g. per-field validation errors)
credit_detailCreditDetailThe estimate made at kickoff next to what has been charged so far. estimate is null for runs
started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.
Attributes
estimateone ofrequiredAttributes
CreditEstimate model →
minimumnumberrequiredLeast the run can cost
expectednumberLikely cost from past runs of the same config; absent without history
typicalobjectRecent p25–p75 settled range for builds of this size; absent without a dataset build estimate
Attributes
lownumberrequiredhighnumberrequiredmaximumnumberrequiredMost the run can cost
upfrontnumberCredits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes
charged_upfrontbooleanrequiredtrue when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes
- null
credits_usednumberrequiredCredits charged so far (same value as the top-level credits_used)
credits_remainingnumberAccount balance. Only on estimates and credit errors.
sufficient_creditsbooleanWhether the balance covers estimate.maximum. Only on estimates and credit errors.
404No resource with that id on this account
errorobjectrequiredAttributes
typestringrequiredMachine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)
messagestringrequiredHuman-readable explanation
detailsanyOptional extra context (e.g. per-field validation errors)
credit_detailCreditDetailThe estimate made at kickoff next to what has been charged so far. estimate is null for runs
started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.
Attributes
estimateone ofrequiredAttributes
CreditEstimate model →
minimumnumberrequiredLeast the run can cost
expectednumberLikely cost from past runs of the same config; absent without history
typicalobjectRecent p25–p75 settled range for builds of this size; absent without a dataset build estimate
Attributes
lownumberrequiredhighnumberrequiredmaximumnumberrequiredMost the run can cost
upfrontnumberCredits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes
charged_upfrontbooleanrequiredtrue when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes
- null
credits_usednumberrequiredCredits charged so far (same value as the top-level credits_used)
credits_remainingnumberAccount balance. Only on estimates and credit errors.
sufficient_creditsbooleanWhether the balance covers estimate.maximum. Only on estimates and credit errors.
422The request is valid but can't be executed (e.g. insufficient_credits, credit_cap_exceeded when max_credits is set, validation failure)
errorobjectrequiredAttributes
typestringrequiredMachine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)
messagestringrequiredHuman-readable explanation
detailsanyOptional extra context (e.g. per-field validation errors)
credit_detailCreditDetailThe estimate made at kickoff next to what has been charged so far. estimate is null for runs
started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.
Attributes
estimateone ofrequiredAttributes
CreditEstimate model →
minimumnumberrequiredLeast the run can cost
expectednumberLikely cost from past runs of the same config; absent without history
typicalobjectRecent p25–p75 settled range for builds of this size; absent without a dataset build estimate
Attributes
lownumberrequiredhighnumberrequiredmaximumnumberrequiredMost the run can cost
upfrontnumberCredits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes
charged_upfrontbooleanrequiredtrue when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes
- null
credits_usednumberrequiredCredits charged so far (same value as the top-level credits_used)
credits_remainingnumberAccount balance. Only on estimates and credit errors.
sufficient_creditsbooleanWhether the balance covers estimate.maximum. Only on estimates and credit errors.