mcp-server

v0.1.0
@batuenergy/mcp-server Checked 1 day ago Published 1 month ago

Official Batu Energy MCP server — CFE bills, payment status, files, collection jobs, and monitoring for AI agents

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

batu_list_tax_rates

List tax regimes and the fraction each applies to a bill subtotal — `iva` at 0.16 and `iva_frontera` at 0.08 for the northern border zone. GLOBAL reference data. The join is `code`, not `id`: a contract carries the regime code, so that is what connects a row here to the bills it prices. `rate` is a FRACTION (0.16), never a percentage.

ParameterTypeDescription
limitintegerMaximum number of rows to return in this page (default 50, max 500). A larger value is clamped, not rejected. (default 50, max 500 — larger values are clamped, not rejected)
offsetintegerNumber of rows to skip before this page (offset pagination).
searchstringCase-insensitive substring match over the regime code and description (at most 200 characters). An unmatched value is an empty page, not an error.

batu_list_utility_contracts

List the utility contracts bonded to the caller’s sites — the agreements Batu collects bills against, one per service point. NOT global reference data like the catalogs above: these are the caller’s own rows, and a contract bonded to several of their sites appears ONCE. `rpu` is the exact identity filter and answers "which contract is this service point" in one call; `search` is the substring one, and is also how you reach a service point a non-CFE utility numbers in some other format. Soft-deleted contracts are excluded unless include_deleted is set; a deleted one carries a `deleted_at`…

ParameterTypeDescription
include_deletedbooleanInclude soft-deleted contracts (default `false`). A deleted contract keeps its site bond and its `deleted_at` is set; nothing else about the row changes.
limitintegerMaximum number of contracts to return in this page (default 50, max 200). A larger value is clamped, not rejected. (default 50, max 200 — larger values are clamped, not rejected)
offsetintegerNumber of contracts to skip before this page (offset pagination).
rpustringReturn only the contract for this exact 12-digit CFE RPU. This is an identity filter, not a substring match — `search` is the substring one, and it is also how you reach a service point whose utilit…
searchstringCase- and accent-insensitive substring match over the RPU and the service name (at most 200 characters). An unmatched value is an empty page, not an error.
site_idstringReturn only the contracts bonded to this site (`sit_…`). A site in another organization matches nothing — it is an empty page, never another tenant’s contracts.
statusstringFilter by lifecycle status. `terminated` contracts are kept for their billing history; omit the filter to see every status.

batu_get_utility_contract

Retrieve one utility contract by id (uct_...), including `version` — the optimistic-locking token — and `deleted_at`, which is non-null on a soft-deleted contract. A contract that does not exist, one bonded to no site of the caller’s, and a malformed id all answer the same 404, so neither the existence of an id nor its shape reveals anything. `rpu` is the utility’s identifier for the service point and is the same value batu_list_bills, batu_list_jobs and the monitoring tools filter by.

ParameterTypeDescription
id *stringUtility contract public id, e.g. uct_01HX...

batu_list_bills

List CFE electricity bills accessible to the API key. Cursor-paginated; returns bill metadata plus line-item concepts (consumption kWh, demand kW, amounts MXN). Filters: rpu, payment_status (pending|paid|overdue|unknown), status (pending|validated), period_start_from/period_start_to (YYYY-MM-DD), year_month, service_name, site_name, site_id (sit_..., the bills of the contracts linked to that site — prefer it over site_name, which is not unique), is_monitored, and free-text search. Sort with sort_by + sort_dir.

ParameterTypeDescription
cursorstringPagination cursor from the previous response’s `next_cursor`. Omit it for the first page.
is_monitoredbooleanReturn only monitored (`true`) or unmonitored (`false`) contracts.
limitintegerMaximum number of items to return in this page. (max 5000)
payment_statusstringFilter bills by payment status (for example `pending` / `paid`). Comma-separated; allowed values: pending, paid, overdue, unknown.
period_start_fromstringEarliest billing-period start date to include (`YYYY-MM-DD`).
period_start_tostringOnly bills whose billing period ends on or before this date (`YYYY-MM-DD`).
rpustringCFE service number (RPU) to filter by. Comma-separated.
searchstringFree-text search across the resource’s main fields.
service_namestringFilter by the contracted service name. Comma-separated.
site_idstringNarrow to bills of the utility contracts linked to these sites (`sit_…`), comma-separated. A site you cannot see matches nothing. Comma-separated.
site_namestringFilter by site name. Comma-separated.
sort_bystringField to sort the results by: a bill header field (e.g. `period_start`, `total_amount`) or `concept:<conceptName>`.
sort_dirstringSort direction: `asc` or `desc`.
sourcestringFilter by the source the bill was ingested from. `payment_check` marks a placeholder the payment-status check created for a period with no collected bill — period and payment status only, no charges…
statusstringFilter by validation status: `pending` (not yet reviewed) or `validated`. Comma-separated; allowed values: pending, validated.
year_monthstringFilter bills by billing month (`YYYY-MM`). Comma-separated.

batu_get_bill

Retrieve a single CFE bill by its id (bil_...), including full line-item concepts with a concept_meaning legend explaining each CFE charge.

ParameterTypeDescription
id *stringBill public id, e.g. bil_01HX...

batu_get_payment_status

Latest payment status per RPU: one row per CFE service with payment_status (pending|paid|overdue|unknown), due_date, and period_end of the most recent bill. The fastest way to answer "which services have unpaid bills?".

ParameterTypeDescription
rpustringCFE service number (RPU) to filter by. Comma-separated.

batu_list_files

List bill files (PDF, XML/CFDI, images). Each item carries a fresh presigned download URL valid for 15 minutes. Filter by rpu, bill_id, or type (pdf|xml|cfdi|image). Set latest_only=true to get only files of each RPU's NEWEST bill — the one-call answer to "the latest PDF per service" (mutually exclusive with bill_id).

ParameterTypeDescription
bill_idstringReturn only files attached to this bill (`bil_…`). Comma-separated.
cursorstringPagination cursor from the previous response’s `next_cursor`. Omit it for the first page.
latest_onlybooleanRestrict to the files of each RPU’s most recent bill. Mutually exclusive with `bill_id`, which already selects exactly one bill.
limitintegerMaximum number of items to return in this page. (max 100)
rpustringCFE service number (RPU) to filter by. Comma-separated.
typestringFilter by type. Comma-separated; allowed values: pdf, xml, cfdi, image.

batu_download_files_zip

Bundle every bill file matching the filter into one ZIP and return a presigned download URL (1-hour TTL). At least one filter is required. Synchronous — large bundles can take up to a minute.

ParameterTypeDescription
bill_idstringReturn only files attached to this bill (`bil_…`). Comma-separated.
latest_periodsintegerOnly the documents of each RPU’s N most recent billing periods (by `year_month`), ranked after the other filters apply — `latest_periods: 4` with `type: ["pdf"]` is the last four PDF receipts of e…
period_start_fromstringOnly documents of bills whose billing period starts on or after this date (`YYYY-MM-DD`).
period_start_tostringOnly documents of bills whose billing period ends on or before this date (`YYYY-MM-DD`).
rpustringCFE service number (RPU) to filter by. Comma-separated.
typestringFilter by type. Comma-separated; allowed values: pdf, xml, cfdi, image.
year_monthstringOnly documents of bills labelled with these billing months (`YYYY-MM`), as `year_month` on `GET /v1/bills`. Comma-separated.

batu_collect_bills

Queue a CFE bill-collection job for an RPU. The RPU does NOT need to be pre-registered — new RPUs are onboarded automatically (service_name required only then). Set monitor=true to enable recurring automatic collection and payment_monitor=true for recurring payment checks. By default the pipeline serves from cache when recent data exists (completes in seconds, no CFE visit); set force_refresh=true to force a LIVE CFE collection — use it to pull missing PDFs or refresh stale periods (1-5 min, consumes a collection credit). Idempotent: repeating the call returns the in-flight job instead of…

ParameterTypeDescription
rpu *stringRequired. The 12-digit CFE service number (RPU) to collect bills for. It must be a 12-digit CFE service identifier.
force_refreshbooleanRe-collect periods already stored instead of skipping them.
latest_totalnumberThe total of the most recent CFE bill you already hold, in MXN. Lets the collector stop early when nothing new has been issued.
monitorbooleanKeep collecting new bills for this RPU automatically.
payment_monitorbooleanKeep checking this RPU’s payment status automatically.
period_countintegerHow many billing periods to collect: `-1` for every period available, or an integer between 1 and 48.
service_namestringThe name the service is registered under at CFE. Required the first time an RPU is collected; afterwards it is remembered.
site_namestringName for the site created for this RPU, if it is new.

batu_get_bill_aggregates

Monthly spend and consumption totals across the bills an API key can see — one row per billing month with total_sum (MXN, string), kwh_sum and bill_count. Answers "what did we spend per month" in one call instead of paging batu_list_bills and summing. Accepts the same filters as batu_list_bills.

ParameterTypeDescription
contract_idstringNarrow to specific utility contracts (`uct_…`), comma-separated. Comma-separated.
is_monitoredbooleanReturn only monitored (`true`) or unmonitored (`false`) contracts.
payment_statusstringFilter bills by payment status (for example `pending` / `paid`). Comma-separated; allowed values: pending, paid, overdue, unknown.
period_start_fromstringEarliest billing-period start date to include (`YYYY-MM-DD`).
period_start_tostringOnly bills whose billing period ends on or before this date (`YYYY-MM-DD`).
rpustringCFE service number (RPU) to filter by. Comma-separated.
searchstringFree-text search across the resource’s main fields.
service_namestringFilter by the contracted service name. Comma-separated.
site_namestringFilter by site name. Comma-separated.
statusstringFilter by validation status: `pending` (not yet reviewed) or `validated`. Comma-separated; allowed values: pending, validated.
tariffstringFilter by CFE tariff (for example `GDMTH`). Comma-separated.
year_monthstringFilter bills by billing month (`YYYY-MM`). Comma-separated.

batu_get_job

Get the status of a job (job_...) — a bill collection, a payment check or a site metrics collection. Read `type` first: it selects which progress and result the job carries. Statuses progress queued → running → completed | partial_success | failed. Once a bill collection completes, query batu_list_bills for the data.

ParameterTypeDescription
id *stringJob public id, e.g. job_01HX...

batu_list_jobs

List the jobs the org has queued, newest first — bill collections, payment checks and site metrics collections in one list. Cursor-paginated. Use it to see what is running or what failed after a batch — filter status to "failed" to find work needing batu_retry_job. Filters compose (AND): status, type, target_type + target_id (rpu is the alias for CFE services), site_id (jobs for CFE services linked to those sites, or run against one of them), search, payment_status, and created_from/created_to.

ParameterTypeDescription
created_fromstringEarliest creation time to include — an ISO 8601 date (`YYYY-MM-DD`) or datetime. Accepts an ISO 8601 date (`YYYY-MM-DD`) or a full datetime.
created_tostringLatest creation time to include — an ISO 8601 date (`YYYY-MM-DD`) or datetime. Accepts an ISO 8601 date (`YYYY-MM-DD`) or a full datetime.
cursorstringPagination cursor from the previous response’s `next_cursor`. Omit it for the first page.
limitintegerMaximum number of items to return in this page. (max 100)
payment_statusstringFor payment checks, filter by the outcome the check reported. Comma-separated; allowed values: paid, pending, overdue, unknown.
rpustringCFE service number (RPU) to filter by, comma-separated. An alias of `target_type=utility_contract` plus `target_id`; prefer those. Comma-separated.
searchstringFree-text search across the target’s label and identifier.
site_idstringNarrow to jobs for these sites (`sit_…`), comma-separated: a job for a CFE service linked to one of them, or a job that runs against one of them. A site you cannot see matches nothing. Comma-separat…
sort_bystringField to sort the results by. `rpu` is a deprecated alias of `target_label` — it sorts by the target’s label, whatever the target type.
sort_dirstringSort direction: `asc` or `desc`.
statusstringFilter by job status, comma-separated. Comma-separated; allowed values: queued, running, completed, partial_success, failed, cancelled.
target_idstringFilter by the target’s identifier, comma-separated — an RPU for `utility_contract`, a site public id (`sit_…`) for `site`. Comma-separated.
target_typestringFilter by what the job runs against: a CFE service (`utility_contract`) or a site.
typestringFilter by job type.

batu_get_job_stats

Counts of the org's jobs by status (queued, running, completed, partial_success, failed, cancelled) — one counter per status, so unfiltered they sum to the same corpus batu_list_bills' job list reports as total. The cheap poll-stop condition after batu_collect_bills_batch: when queued + running reaches zero, every job has settled — far cheaper than polling batu_get_job per id.

ParameterTypeDescription
exclude_actor_typestringExclude jobs started by this actor type (for example `system`, to see only human-started work).
target_typestringFilter by what the job runs against: a CFE service (`utility_contract`) or a site.

batu_collect_bills_batch

Queue bill collection for many RPUs in ONE call (up to 500). Credentials and org context are resolved once, so for a portfolio this is substantially cheaper than calling batu_collect_bills per RPU. Returns created/failed counts plus per-record errors — a partially rejected batch still queues the accepted records. Poll progress with batu_get_job_stats.

ParameterTypeDescription
records *arrayRequired. Up to 500 collection records, one per RPU.

batu_retry_job

Requeue a FAILED job for another attempt. Revives the same job record — same id, same configuration, retry_count incremented — and is NOT the same as calling batu_collect_bills again (which creates or dedups against active jobs). Two rules, both answering job_not_retryable: only jobs whose status is "failed" can be retried, and only bill_collection / payment_check jobs are retryable here — a metrics_collect job is refused whatever its status (restart it with a site collection instead).

ParameterTypeDescription
id *stringJob public id, e.g. job_01HX...

batu_get_monitoring

Monitoring state per RPU: whether recurring bill collection (monitoring) and recurring payment checks (payment_monitoring) are active, plus collection health — last_collection {job_id, status, error_code} and latest_period_end. A failed last_collection with an old latest_period_end means the RPU is silently stale (e.g. RPU_SERVICE_NAME_MISMATCH) and needs attention. Enable via batu_collect_bills flags; disable via batu_stop_monitoring.

ParameterTypeDescription
rpustringCFE service number (RPU) to filter by. Comma-separated.

batu_stop_monitoring

Stop recurring monitoring for an RPU. scope: "collection" (bill downloads), "payment" (payment checks), or "all" (default). Already-collected bills remain queryable.

ParameterTypeDescription
rpu *stringCFE service number (RPU) — exactly 12 digits
scopestringWhich subscriptions to act on: `collection` (bill collection), `payment` (payment checks) or `all`. Defaults to `all`.

batu_start_monitoring

Start recurring monitoring for an RPU Batu already holds a contract for. scope: "collection" (daily bill downloads), "payment" (payment-status checks), or "all" (default). The exact inverse of batu_stop_monitoring. To onboard an RPU Batu has never seen, use batu_collect_bills with monitor: true instead — that registers the service, collects its history and subscribes in one operation. Enabling "payment" also runs the first check immediately, and needs the org's CFE credentials configured.

ParameterTypeDescription
rpu *stringCFE service number (RPU) — exactly 12 digits
scopestringWhich subscriptions to act on: `collection` (bill collection), `payment` (payment checks) or `all`. Defaults to `all`.

batu_check_payment_now

Run one payment-status check for an RPU immediately instead of waiting for the next daily run. Returns 202 with a job_id — poll it with batu_get_job. Requires payment monitoring to be active already (turn it on with batu_start_monitoring scope="payment"). Repeat calls while a check is still running return that same in-flight job_id, so retrying is safe.

ParameterTypeDescription
rpu *stringCFE service number (RPU) — exactly 12 digits

batu_whoami

Identity probe for the current API key: returns the key id (apk_...) and the org id (org_...) it belongs to. Use to confirm which organization the agent is acting on.

batu_get_energy_summary

Aggregate energy metrics for a site over a time window: total consumption (kWh), peak demand (kW), rolling 15-min max demand, solar generation, `expected_generation` (the design simulation, when the site has one), `benchmarks` (the generation a linked PPA or installer warranty guarantees, when the site has one), plus a CFE TOU breakdown (base/intermedio/punta) for time-of-use tariffs. Each metric carries value, unit, a data-quality indicator, and `records` — the RAW number of points read. Treat `records` as the honesty check: a metric ABSENT was never computed, `records: 0` with a value pres…

ParameterTypeDescription
from *stringRequired window, with `to` strictly after `from`. An ISO 8601 datetime is an exact instant; a DATE-ONLY value (`2026-09-19`) means midnight in the site’s timezone (UTC if the site has none), so whol…
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringRequired window, with `to` strictly after `from`. An ISO 8601 datetime is an exact instant; a DATE-ONLY value (`2026-09-19`) means midnight in the site’s timezone (UTC if the site has none), so whol…
granularitystringBucketing for the returned series: `none` (default, one total for the window), `day` (at most 365 days per request) or `month` (at most 1095 days). Unit nouns, not `daily`/`monthly`.

batu_get_monitoring_status

Derived health verdict for a site's metering: overall status (active/warning/error/paused/inactive) plus the evidence — `reasons` (what degraded it) and `provenance` (per signal: collection, data_quality, freshness, payment, configuration — observed when, and whether stale). Also carries `connection` (freshness rollup; null means the site has NO measured source at all — a stated absence, not a disconnection), `quality` (completeness over a window ending yesterday; null means nothing could be graded, not zero), and `sources` (per-source detail). Ratios are 0..1, not percentages. Use to an…

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...

batu_list_monitoring_status

The SAME health verdict as batu_get_monitoring_status, for one page of the organization's live sites at once — the go-to read for "which of my sites are down?". A site whose own derivation failed comes back with `status: null` (a stated absence), never a fabricated verdict. `aggregates` and `facets` describe the WHOLE filtered set, not the page — never sum the page to get them, and at connection_scope="device" `sites_by_connection_state` is a tally, not a partition. Page with `cursor` (opaque; it names a position in an ordering recomputed from live signals, not a snapshot) or jump with `pa…

ParameterTypeDescription
connection_scopestringWhether `connection_states` is matched against the site’s roll-up or its individual devices.
connection_statesstringFilter by connection state, comma-separated. Unrecognised values are IGNORED rather than rejected, so a saved filter keeps working when the vocabulary grows. Comma-separated; allowed values: conectado…
cursorstringPagination cursor from the previous response. This list’s order is recomputed per request over live health signals, so the cursor names a POSITION in the current ordering — a row whose health chan…
limitintegerMaximum number of sites to return in this page. (default 25, max 200 — larger values are clamped, not rejected)
module_scopestringNarrow to sites actually SET UP for monitoring (at least one active, measured source). Applied before everything else, so data, total, aggregates and facets all describe the narrowed set. The dropped…
pageinteger1-based page number, for the random access a pager needs. Send `cursor` or `page`, never both.
searchstringFree-text search across site name and customer id. An unmatched term is an empty list, never an error.
sortstringResult ordering. Defaults to worst-severity-first, so the sites that need attention lead.
window_daysintegerSize of the data-quality window, in days. Bounded rather than clamped: an over-wide window changes what the completeness numbers mean, so narrowing it silently would report one window’s figures unde…

batu_get_energy_summary_batch

batu_get_energy_summary for MANY site/window pairs in ONE call — use this instead of looping the single read when comparing sites. Each entry succeeds or fails on its own: a failed entry carries an `error` object (SITE_NOT_FOUND or READ_FAILED) and never fails the whole call. Same per-metric shape (and the same `records` honesty rule) as the single read, including `benchmarks` inside each entry's `summary`.

ParameterTypeDescription
reads *arrayThe reads to perform, up to 150 per call. Each entry is `{ site_id, from, to }`. A malformed entry rejects the WHOLE request (400); a per-site ACCESS outcome degrades that entry only.

batu_get_metrics_topology

The org's metering topology, three pivots: "sites" (sites → devices → metric streams), "site-metrics" (sites → metrics → sources, includes asset-less CSV/derivation sources), "integrations" (integrations → credential statuses → devices → site assignments). Use to understand what feeds what before reading energy data.

ParameterTypeDescription
view *stringWhich pivot of the topology graph to return.

batu_get_asset_fleet

Fleet health overview: every asset with connection health (live/unstable/disconnected/never), last-seen provenance, data quality, measured variables, and site deployments. The go-to read for "which devices are down?".

ParameterTypeDescription
makestringFilter by device make/brand.
searchstringFree-text search across the resource’s main fields.
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_get_asset_health

Deep health detail for ONE asset: the fleet summary plus every metric it feeds (fed_metrics — stream, type, cadence, per-feed freshness/data-quality) and whether it carries a per-asset credential. Complements batu_get_asset (inventory fields).

ParameterTypeDescription
asset_public_id *stringAsset public id, e.g. ast_01HX...

batu_list_metric_coverages

Ingestion coverage windows per metric source: [started_at, ended_at) spans of persisted data (ended_at null = still open) with point counts. Use to find data gaps before reading energy for a window.

ParameterTypeDescription
limitintegerMaximum number of items to return in this page. (default 100, max 500 — larger values are clamped, not rejected)
metric_source_idstringReturn only the coverage windows of this metric source (`msr_…`).
offsetintegerNumber of items to skip before this page (offset pagination).
open_onlybooleanReturn only windows that are still open (no end yet).

batu_compute_bill

Compute a simulated CFE bill for a site as DATA — per-charge line items (concept, quantity, unit rate, amount), the consumption/demand quantities they price, and subtotal/tax/total (fixed-decimal strings, IVA included). The components half of the computed-bill split; use batu_compute_bill_pdf when you want the rendered document instead. Nothing is stored. tariff_code re-prices against another tariff (what-if).

ParameterTypeDescription
from *stringThe billing window, as ISO 8601 UTC `from` and `to` — `to` strictly after `from`, at most 366 days apart. Window start.
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringThe billing window, as ISO 8601 UTC `from` and `to` — `to` strictly after `from`, at most 366 days apart. Window end.
year_month *stringThe billing month as `YYYY-MM` (month range-checked, `01`–`12`). Selects the published tariff rates and the contract active for that period. Use YYYY-MM.
energy_adjustmentnumberPositive multiplier applied to the measured energy and demand before pricing (the supply factor override). Accepts a number or a numeric string.
tariff_codestringRe-price against another CFE tariff's published rates instead of the site contract's (what-if). The pricing zone still comes from the contract. 1–32 characters of letters, digits, space, `_`, `.` an…

batu_compute_bill_pdf

Compute a simulated CFE bill for a site over a window (from the site's measured energy and published tariff rates), rendered as a PDF. Returns a download link that expires in ~15 minutes. For a month already generated, use batu_get_bill_pdf instead (cheap — no recompute). 400 if the site has no contract with a tariff and pricing zone for the period (tariff_code re-prices against a different tariff but does not replace the contract); 404 if no published rates exist for the period.

ParameterTypeDescription
from *stringThe billing window, as ISO 8601 UTC `from` and `to` — `to` strictly after `from`, at most 366 days apart. Window start.
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringThe billing window, as ISO 8601 UTC `from` and `to` — `to` strictly after `from`, at most 366 days apart. Window end.
year_month *stringThe billing month as `YYYY-MM` (month range-checked, `01`–`12`). Selects the published tariff rates and the contract active for that period. Use YYYY-MM.
energy_adjustmentnumberPositive multiplier applied to the measured energy and demand before pricing (the supply factor override). Accepts a number or a numeric string.
tariff_codestringRe-price against another CFE tariff's published rates instead of the site contract's (what-if). The pricing zone still comes from the contract. 1–32 characters of letters, digits, space, `_`, `.` an…

batu_get_bill_pdf

Fetch a fresh download link for an ALREADY-generated bill PDF (site + month) — no recompute; link expires in ~15 minutes. 404 if none exists for that month yet (generate with batu_compute_bill_pdf).

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...
year_month *stringThe billing month as `YYYY-MM` (month range-checked, `01`–`12`). Selects the published tariff rates and the contract active for that period. Use YYYY-MM.
tariff_codestringRe-price against another CFE tariff's published rates instead of the site contract's (what-if). The pricing zone still comes from the contract. 1–32 characters of letters, digits, space, `_`, `.` an…

batu_collect_site_metrics

Trigger a REAL device-data pull for every active source at a site (the metrics collect verb). Returns a job (job_..., type "metrics_collect"). Runs take minutes — poll with batu_get_job until status is completed, partial_success, or failed. Omit from/to for the default window (the 3 most recent full days in the site's local timezone, ending yesterday). Idempotent: re-invoking while an identical pull is in flight returns the SAME job instead of starting another.

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...
fromstringOptional collection window as ISO 8601 UTC datetimes — send both or neither. Omitted, the collector picks its own window. At most 31 days. Window start.
tostringOptional collection window as ISO 8601 UTC datetimes — send both or neither. Omitted, the collector picks its own window. At most 31 days. Window end.

batu_get_site_collections

DEPRECATED — use batu_list_jobs (filter target_type "site", target_id the site id, type "metrics_collect") for the list, and batu_get_job for one run. Kept so ids already held keep resolving: pass `id` (job_...) for one run's status, result and error, or omit it for the newest-first list. Both answer with the job resource and carry Deprecation and Link headers. A failed run reads back with status "failed" and an error message — reads themselves never fail for a failed run.

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...
idstringJob public id (job_...) — omit to list
limitintegerMaximum number of items to return in this page. (default 20, max 100 — larger values are clamped, not rejected)
offsetintegerNumber of items to skip before this page (offset pagination).

batu_get_savings

Deprecated — use batu_list_reports / batu_get_report (GET /v1/sites/{id}/reports). Read the persisted savings report for a site and window (keyed by the `to` month). Returns baseline vs. actual totals, gross/net savings, savings %, per-deduction detail, and `baseline` — the no-solar counterfactual report (tariff, zone, energy, subtotal/tax/total). `baseline_bill_id` is null for reports computed after release 1 (use baseline.report_id) and `savings_config_id` is null when the site has no legacy config. Returns 404 if no report has been generated — call batu_generate_savings first. Optiona…

ParameterTypeDescription
from *stringRequired reporting window as ISO 8601 UTC datetimes. The report is keyed by the `to` month. Window start.
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringRequired reporting window as ISO 8601 UTC datetimes. The report is keyed by the `to` month. Window end.
config_idstringPin the report to one savings configuration (`scf_…`) instead of the site’s resolved default. Deprecated: a config is a label since release 1; pass `track`
kindstringWhich savings result: `savings_net` (baseline − the grid bill − every linked PPA bill; the default when omitted) or `savings_grid` (baseline − the grid bill only; needs no PPA terms). Prefer `/v…
trackstringWhich measurement track to read on. Omitted, it resolves to `utility_bill` when the site has one, otherwise to the single track it does have. Ignored when `config_id` pins a config — that IS the tra…

batu_get_savings_window

Every persisted savings cycle for a site inside a window, on one track — per-cycle baseline/deductions/gross/net/percentage with the EXACT persisted cycle bounds, the energy-credit balance, and the bills the read considered. Unlike batu_get_savings (one month, 404 when absent) this always answers for an accessible site: when savings cannot be reported it says WHY via `configured: false` + `not_configured_reason` (no_report, no_config_on_track, no_bills, no_baseline, no_deductions). The totals carry the latest cycle's `baseline` (counterfactual report) and a nullable `baseline_bill_id` (null…

ParameterTypeDescription
from *stringRequired window as ISO 8601 UTC datetimes (date-only callers convert at their own boundary). Window start.
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringRequired window as ISO 8601 UTC datetimes (date-only callers convert at their own boundary). Window end.
trackstringWhich measurement track to read on. Omitted, it resolves to `utility_bill` when the site has one, otherwise to the single track it does have. Ignored when `config_id` pins a config — that IS the tra…

batu_generate_savings

Deprecated — use batu_create_report (POST /v1/sites/{id}/reports). Generate (compute + persist) a savings report for a site and window. Nothing to configure first: eligibility is derived on every call, and a site that cannot have savings answers 422 with the reason as the error code — no_grid_contract, ambiguous_grid_contract, no_grid_bills or no_generation_data (also savings_unmigrated while a legacy PPA config awaits migration, and ppa_terms_missing when a linked PPA has no terms in force for the period). Regenerating a month stores a new report; reads serve the newest. dry_run computes…

ParameterTypeDescription
from *stringRequired reporting window as ISO 8601 UTC datetimes. The report is keyed by the `to` month. Window start.
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringRequired reporting window as ISO 8601 UTC datetimes. The report is keyed by the `to` month. Window end.
baseline_basisstringOperator override for how the baseline is built this cycle. Omitted, a stored override is INHERITED (a re-run keeps the decision); `auto` is the explicit way to clear it.
config_idstringPin the report to one savings configuration (`scf_…`) instead of the site’s resolved default. Deprecated: a config is a label since release 1; pass `track`
dry_runbooleanCompute everything and write NOTHING (no bill, no report). Answers 200 instead of 201; the id of every row the run did not write is the empty string.
kindstringWhich savings result: `savings_net` (baseline − the grid bill − every linked PPA bill; the default when omitted) or `savings_grid` (baseline − the grid bill only; needs no PPA terms). Prefer `/v…
trackstringWhich measurement track to read on. Omitted, it resolves to `utility_bill` when the site has one, otherwise to the single track it does have. Ignored when `config_id` pins a config — that IS the tra…

batu_create_report

Compute and persist ONE report of a site for a window, and return it. `kind` is required: baseline_simulation (the no-solar cost of the period), savings_grid (baseline − the grid bill), savings_net (baseline − the grid bill − every linked PPA bill) or grid_simulation (what the site owes the grid WITH solar, from metrics only — no bill; a derived import never credits exports: exports_uncredited). Both savings kinds reuse the period’s newest baseline (or compute one). Eligibility is derived per kind; a refusal is a 422 whose error code is the reason (no_grid_contract, ambiguous_grid_co…

ParameterTypeDescription
from *stringRequired window as ISO 8601 UTC datetimes. A computed period is filed under the `to` month. Window start.
kind *stringRequired. The report to compute. `baseline_simulation` — the no-solar cost of the period (needs a grid contract with a priceable tariff and consumption or generation data); `savings_grid` — baseli…
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringRequired window as ISO 8601 UTC datetimes. A computed period is filed under the `to` month. Window end.
baseline_basisstringOperator override for how the baseline is built. Omitted, a savings kind REUSES the period’s newest baseline (and its decision); any value re-prices a new baseline — `auto` clears a stored overrid…
dry_runbooleanCompute everything and write NOTHING (no bill, no report). Answers 200 instead of 201; the id of every row the run did not write is the empty string.
trackstringWhich measurement track: `utility_bill` (periods derived from the CFE invoice cycle) or `calendar` (your plain from/to). Omitted, it resolves to `utility_bill` when the site has it, otherwise to the s…

batu_list_reports

Every report of a site whose period overlaps a window — the NEWEST report per (kind, period), newest period first. Optional `kind` and `track` filters (omitted = all). Each report carries `kind`, inclusive `period_start`/`period_end` days and that kind’s `outputs`; the savings kinds name their baseline in `baseline.report_id`. A read — it never computes; an empty list means nothing was computed yet (call batu_create_report).

ParameterTypeDescription
from *stringRequired window as ISO 8601 UTC datetimes. A computed period is filed under the `to` month. Window start.
site_public_id *stringSite public id, e.g. sit_01HX...
to *stringRequired window as ISO 8601 UTC datetimes. A computed period is filed under the `to` month. Window end.
kindstringOnly this kind. Omitted, every kind. `baseline_simulation` — the no-solar cost of the period (needs a grid contract with a priceable tariff and consumption or generation data); `savings_grid` — ba…
trackstringWhich measurement track: `utility_bill` (periods derived from the CFE invoice cycle) or `calendar` (your plain from/to). Omitted, it resolves to `utility_bill` when the site has it, otherwise to the s…

batu_get_report

One report by id (rpt_...) — any version, including one a newer computation of the same period has replaced in batu_list_reports. 404 covers an unknown id and another site’s or organization’s report alike.

ParameterTypeDescription
report_id *stringReport public id, e.g. rpt_01HX...
site_public_id *stringSite public id, e.g. sit_01HX...

batu_list_report_schedules

The site’s live report schedules — one recurring report subscription per (kind, track): utility_bill schedules run per collected CFE bill (on_bill), calendar schedules run monthly on run_day. Scheduled runs are enabled in a follow-up release: until then nothing runs and next_run_at / last_run_at / last_report_id / last_refusal are null (not "never will").

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...

batu_create_report_schedule

Subscribe a site to a recurring report (kind + track + first_period; run_day 1–28 for calendar, absent for utility_bill). Each run will compute what batu_create_report computes. 422 on a track/trigger mismatch or bad run_day; 409 when a live schedule of the same (kind, track) exists — list it instead. Runs start once scheduled runs are enabled in a follow-up release.

ParameterTypeDescription
first_period *stringRequired. The earliest period the schedule covers (`YYYY-MM-DD`); earlier periods are never computed by it.
kind *stringRequired. The report every run computes: `baseline_simulation`, `savings_grid` or `savings_net`.
site_public_id *stringSite public id, e.g. sit_01HX...
track *stringRequired. `utility_bill` runs once per collected CFE bill (`trigger: on_bill`); `calendar` runs each calendar month (`trigger: monthly`, on `run_day` of the following month).
activebooleanWhether the schedule runs. Defaults to true.
baseline_basisstringThe baseline basis every run passes: `auto` (the default — the rule decides), `measured` or `invoice_reconstructed`.
run_dayintegerDay of the month (1–28) a `monthly` schedule runs for the previous month. Required for monthly; must be absent for on_bill.
triggerstringOptional — derived from `track` (utility_bill ⇔ on_bill, calendar ⇔ monthly); any other pairing is 422.

batu_update_report_schedule

Pause/resume (active), move run_day or change baseline_basis of a report schedule, with its current version from batu_list_report_schedules (409 when stale — re-list and retry). kind, track and trigger are immutable (409).

ParameterTypeDescription
report_schedule_id *stringReport schedule public id, e.g. rsc_01HX...
site_public_id *stringSite public id, e.g. sit_01HX...
version *integerRequired. The schedule’s current `version` (optimistic locking); re-read it if you get a 409.
activebooleanPause (`false`) or resume (`true`) the schedule.
baseline_basisstringThe baseline basis every run passes (`auto`, `measured`, `invoice_reconstructed`).
kindstringImmutable after create: a different value answers 409 (delete the schedule and create another).
run_dayintegerDay of the month (1–28) a `monthly` schedule runs. Not settable on an on_bill schedule (422).
trackstringImmutable after create: a different value answers 409 (delete the schedule and create another).
triggerstringImmutable after create: a different value answers 409 (delete the schedule and create another).

batu_list_savings_configs

Deprecated since release 1 — nothing to configure; use batu_create_report (POST /v1/sites/{id}/reports), which derives eligibility. Read-only view: the site’s legacy configurations, or — with none — its grid contract as the one derived entry (id uct_...). `enabled` is the site’s derived eligibility, never a stored flag.

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...

batu_get_savings_config

Deprecated since release 1 — nothing to configure; use batu_create_report (POST /v1/sites/{id}/reports), which derives eligibility. One entry of the derived view by id — a legacy configuration (scf_...) or the grid contract (uct_...) naming the derived entry — with the fields batu_list_savings_configs returns plus `version`. 404 covers unknown, another site’s and another organization’s alike — the body is identical, so it is never an existence oracle.

ParameterTypeDescription
savings_config_id *stringEntry id from batu_list_savings_configs: a legacy scf_01HX... or the grid uct_01HX....
site_public_id *stringSite public id, e.g. sit_01HX...

batu_create_savings_config

Deprecated since release 1 — nothing to configure; use batu_create_report (POST /v1/sites/{id}/reports), which derives eligibility. Writes nothing: the body is validated as before and the answer is the site’s existing entry (a legacy configuration, or the grid contract as the derived entry). Optional grid_contract_id (uct_...) names the grid when the site has several.

ParameterTypeDescription
baseline_contract_type *stringRequired (deprecated — validated, never stored).
billing_period_type *stringRequired (deprecated — validated, never stored): `calendar` or `utility_bill`.
deduction_contract_types *arrayRequired (deprecated — validated, never stored); must not include the baseline.
name *stringRequired. Display name for the configuration. Deprecated: nothing is configured since release 1 — accepted and validated, never stored; `POST /v1/sites/{id}/savings` derives eligibility
site_public_id *stringSite public id, e.g. sit_01HX...
enabledbooleanWhether the configuration participates in savings generation. Strictly `true` or `false`. Deprecated: derived since release 1 — the answered `enabled` is the site’s eligibility
grid_contract_idstringThe site’s grid (supply) contract (`uct_…`) — names the derived entry and picks the grid when the site has several. 404 when the contract is not visible to you; 422 `contract_not_on_site` when i…

batu_list_sites

List sites (physical locations) in the org, with pagination. Each site carries version, customer_id, lifecycle_status and contract_count.

ParameterTypeDescription
limitintegerMaximum number of items to return in this page. (default 50, max 200 — larger values are clamped, not rejected)
module_scopestring`monitoring` narrows to sites actually SET UP for monitoring (at least one active, measured source; decommissioned sites excluded) — the same set `GET /metrics/monitoring-status?module_scope=monitor…
offsetintegerNumber of items to skip before this page (offset pagination).
searchstringFree-text search across the resource’s main fields.
statusstringFilter by lifecycle status: `active`, `inactive` or `decommissioned`.

batu_get_site

Get one site by id (sit_...), including its full location sub-resource, metadata, version, customer_id, lifecycle_status and contract_count.

ParameterTypeDescription
id *stringSite public id, e.g. sit_01HX...

batu_list_assets

List assets (physical devices — inverters, meters, batteries) in the org.

ParameterTypeDescription
limitintegerMaximum number of items to return in this page. (default 50, max 200 — larger values are clamped, not rejected)
makestringFilter by device make/brand.
offsetintegerNumber of items to skip before this page (offset pagination).
searchstringFree-text search across the resource’s main fields.
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_get_asset

Get one asset by id (ast_...).

ParameterTypeDescription
id *stringAsset public id, e.g. ast_01HX...

batu_list_metric_streams

List metric streams — the (site, metric-type) channels that hold time-series (e.g. a site's solar_generation stream). Filter by site, metric type, or status.

ParameterTypeDescription
limitintegerMaximum number of items to return in this page. (default 50, max 200 — larger values are clamped, not rejected)
metric_typestringFilter by metric type.
offsetintegerNumber of items to skip before this page (offset pagination).
searchstringFree-text search across the resource’s main fields.
sitestringFilter by site (`sit_…`). You can set a site id in the **Variables** panel (bottom-right).
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_get_metric_stream

Get one metric stream by id (mst_...).

ParameterTypeDescription
id *stringMetric stream public id, e.g. mst_01HX...

batu_get_stream_data

A metric stream's normalized time series over a UTC window — the raw data behind every energy read. Omit interval for the data AS RECORDED (the stream's native cadence); pass one to downsample with the metric type's aggregator or your override. Bounded windows: 5m/15m up to 31 days, 1h up to 92, 1d up to 366. Values are in the metric type's unit. Gap slots are absent from points (never null); expected_points vs actual_points and data_quality quantify completeness, and the availability tool maps exactly where the holes are. Empty windows return points: [].

ParameterTypeDescription
from *stringThe window to read, as ISO 8601 UTC `from` and `to` (`to` strictly after `from`). Per-interval ceilings: `5m` 31 days, `15m` 31 days, `1h` 92 days, `1d` 366 days. With no `interval`, the ceiling is th…
metric_stream_id *stringMetric stream public id, e.g. mst_01HX...
to *stringThe window to read, as ISO 8601 UTC `from` and `to` (`to` strictly after `from`). Per-interval ceilings: `5m` 31 days, `15m` 31 days, `1h` 92 days, `1d` 366 days. With no `interval`, the ceiling is th…
aggregatorstringHow to fold each interval. Omit it and the metric type’s own aggregator applies.
intervalstringAggregate to this cadence. Omit it and the points come back at the stream’s native (finest active source) cadence — aggregation is opt-in, never silently applied.

batu_get_stream_availability

Where a metric stream actually has data — coverage windows and gaps over a UTC window, derived live from the stored readings (outages inside a collected day show up). Per source: contiguous windows with point counts plus the complementary gaps; the two tile the requested window, leading and trailing silence included. Up to 366 days at any cadence (the response ships transitions, not points). Raise min_gap_seconds to ignore short dropouts. Calculated streams report an empty sources list.

ParameterTypeDescription
from *stringThe window to scan, as ISO 8601 UTC `from` and `to` (`to` strictly after `from`, at most 366 days apart — the response ships windows and gaps, not points, so a year of 5-minute data is small). Windo…
metric_stream_id *stringMetric stream public id, e.g. mst_01HX...
to *stringThe window to scan, as ISO 8601 UTC `from` and `to` (`to` strictly after `from`, at most 366 days apart — the response ships windows and gaps, not points, so a year of 5-minute data is small). Windo…
min_gap_secondsintegerTreat a hole shorter than this as continuous coverage. Between 60 and 2678400 seconds.

batu_get_source_data

ONE metric source's time series — the diagnostic drill-down behind the blended stream read. No splice: exactly what this feed delivered. Omit interval for the source's own cadence (data as recorded); pass one to downsample. Use it to inspect redundant feeds separately or verify what a vendor actually sent. Same bounded windows and completeness fields as the stream read.

ParameterTypeDescription
from *stringThe window to read, as ISO 8601 UTC `from` and `to` (`to` strictly after `from`). Per-interval ceilings: `5m` 31 days, `15m` 31 days, `1h` 92 days, `1d` 366 days. With no `interval`, the ceiling is th…
metric_source_id *stringMetric source public id, e.g. msr_01HX...
to *stringThe window to read, as ISO 8601 UTC `from` and `to` (`to` strictly after `from`). Per-interval ceilings: `5m` 31 days, `15m` 31 days, `1h` 92 days, `1d` 366 days. With no `interval`, the ceiling is th…
aggregatorstringHow to fold each interval. Omit it and the metric type’s own aggregator applies.
intervalstringAggregate to this cadence. Omit it and the points come back at the stream’s native (finest active source) cadence — aggregation is opt-in, never silently applied.

batu_list_metric_sources

List metric sources — the per-integration feeds that populate a stream (a stream can have several redundant sources, priority-spliced). Filter by stream, asset, or integration.

ParameterTypeDescription
assetstringFilter by asset (`ast_…`).
integrationstringFilter by integration (`int_…`).
limitintegerMaximum number of items to return in this page. (default 50, max 200 — larger values are clamped, not rejected)
metric_streamstringFilter by metric stream (`mst_…`).
offsetintegerNumber of items to skip before this page (offset pagination).
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_get_metric_source

Get one metric source by id (msr_...).

ParameterTypeDescription
id *stringMetric source public id, e.g. msr_01HX...

batu_list_integrations

List available integrations (vendor connectors, e.g. Growatt) with their capability manifest.

ParameterTypeDescription
include_internalbooleanInclude internal-only integrations (`true`/`false`).
limitintegerMaximum number of items to return in this page. (default 50, max 500 — larger values are clamped, not rejected)
metric_typestringKeep only integrations whose manifest declares a variable mapping to this metric type — a `mtp_…` id or the type’s api name (e.g. `solar_generation`). An unknown value is an empty result, not an…
offsetintegerNumber of items to skip before this page (offset pagination).
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_get_integration

Get one integration by id (int_...), including its capability manifest.

ParameterTypeDescription
id *stringIntegration public id, e.g. int_01HX...

batu_list_metric_types

List metric types (the measurement vocabulary, e.g. solar_generation, consumption). The `variable` name is usable in place of an id when creating streams/provisioning. Pass `integration_id` to keep only the metric types that integration can collect.

ParameterTypeDescription
integration_idstringRestrict the catalog to the metric types the named integration’s connector declares (`int_…`).
limitintegerMaximum number of items to return in this page. (default 50, max 500 — larger values are clamped, not rejected)
offsetintegerNumber of items to skip before this page (offset pagination).
searchstringFree-text search across the resource’s main fields.
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_list_makes

List device makes (manufacturers, e.g. growatt, sma). The `name` is usable in place of an id when provisioning.

ParameterTypeDescription
limitintegerMaximum number of items to return in this page. (default 50, max 500 — larger values are clamped, not rejected)
offsetintegerNumber of items to skip before this page (offset pagination).
searchstringFree-text search across the resource’s main fields.
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_list_credentials

List vendor credentials configured for the org (secret values never returned). Use to see which integration credentials exist before exploring or provisioning.

ParameterTypeDescription
integrationstringFilter by integration (`int_…`).
limitintegerMaximum number of items to return in this page. (default 50, max 200 — larger values are clamped, not rejected)
offsetintegerNumber of items to skip before this page (offset pagination).
statusstringFilter by lifecycle status (for example `active` / `inactive`).

batu_explore_integration

Discover the devices reachable through an integration credential (does not persist anything). Returns devices in asset shape, ready to feed into batu_provision_assets.

ParameterTypeDescription
id *stringIntegration public id (int_...)
credentialstringExplore through this credential (`ins_…`). Omit it to use your first active credential for the integration. Cannot be combined with `external_id`.
external_idstringNarrow the discovery to ONE device by its VENDOR device id — not an `ast_` public id. Uses your first active credential, so it cannot be combined with `credential`.

batu_provision_assets

Batch-onboard sites + devices + metric streams in one call — the fastest path from "vendor credential" to "collecting data". Each site is either referenced (ref) or created; each device declares its integration, make, and the streams to collect. Caps: 1-50 sites, up to 50 assets/site, 200 assets total. Always returns a per-site → per-asset result vector; a failed site skips its assets but never rolls back other sites. Use batu_explore_integration to discover devices first.

ParameterTypeDescription
sites *arraySite groups to provision, 1..50. Each is `{ site: { ref } | { create }, assets: [...] }`. A group must create at least one stream or archive at least one source; a call carries at most 200 assets in T…

batu_get_organization

The organization this API key belongs to — its `name`, `slug`, `logo_url` and `segment`. Takes NO arguments and cannot be pointed at another organization: a key is issued for exactly one, so the credential is the selection. Use it to confirm which organization you are acting for before writing anything, and to label Batu data with the organization’s own display name. `version` is the optimistic-locking token for the organization record, shared with its settings. Plan and subscription state are deliberately NOT here.

batu_get_organization_settings

The organization’s reporting defaults and its site-lifecycle vocabulary. Takes no arguments, same as batu_get_organization. THE REASON TO CALL IT: `lifecycle_statuses` is what a site’s `lifecycle_status` resolves against — that field is an open string because every organization defines its own phases, so match it against `key` to get the human `label`, the `bucket` (onboarding | activos | inactivo) and the badge `color`. The list is the EFFECTIVE catalog and is never empty: an organization that has not customized it reads the four defaults, which is what its sites are actually filed unde…

batu_list_members

The people in the organization — the roster you assign sites to. Each entry carries the MEMBERSHIP id (mem_...), which is what batu_assign_site_member takes, plus the person behind it (name, username). `email` is ALWAYS null on this credential — it is withheld from API keys, so treat a null as "not available to you", never as "no email on file". Only ACTIVE members appear. Start here before assigning: a profile id (prf_...) is NOT accepted by the assignment tools.

ParameterTypeDescription
limitintegerMaximum number of items to return in this page. (default 100, max 500 — larger values are clamped, not rejected)
offsetintegerNumber of items to skip before this page (offset pagination).
rolestringFilter by the member’s role in the organization.
searchstringFree-text search across member name and email (at most 200 characters). For machine credentials the email side matches EXACTLY, never by substring.

batu_get_member

One member by membership id (mem_...) — use when you have an id from a site-assignee list and want the person behind it. `email` is always null on this credential (withheld from API keys). Returns 404 for an id outside your organization.

ParameterTypeDescription
member_id *stringMembership public id, e.g. mem_01HX...

batu_list_site_assignees

Who is responsible for a site. An assignee owns the location and every utility contract (RPU) linked to it. Each entry carries the ASSIGNMENT id (sia_...) and, under `member`, the membership id (mem_...) the assign/unassign tools take.

ParameterTypeDescription
site_public_id *stringSite public id, e.g. sit_01HX...

batu_assign_site_member

Make a member responsible for a site. `member` is a MEMBERSHIP id (mem_...) from batu_list_members — a profile id (prf_...) is rejected, because assignment is per-organization. Idempotent: re-assigning someone already assigned returns the existing assignment, never a duplicate.

ParameterTypeDescription
member *stringRequired. The membership id (`mem_…`) to assign to this site — from `GET /v1/admin/members`. A profile id (`prf_…`) is NOT accepted: a membership is per-organization, a profile is global.
site_public_id *stringSite public id, e.g. sit_01HX...

batu_unassign_site_member

Remove a member’s responsibility for a site. Idempotent: unassigning someone who is not assigned returns removed:false with a 200, so a retry is always safe. A 404 means the site or the member is not in your organization — not that they were unassigned.

ParameterTypeDescription
member *stringMembership public id (mem_...), from batu_list_site_assignees
site_public_id *stringSite public id, e.g. sit_01HX...