Bulk Upsert Auto Monitor Setups
Auto-monitor-setups
Bulk Upsert Auto Monitor Setups
Create or update up to 100 auto monitor setups in a single request, keyed by external_id
POST
Bulk Upsert Auto Monitor Setups
Creates or updates up to 100 auto monitor setups in one request, keyed by
external_id. Designed for IaC-style clients that would otherwise fan out one HTTP call per setup.
Each item is upserted independently using the same semantics as Update by External ID: if a setup with the given external_id exists in the project it is replaced (status reset to pending, evaluators replaced wholesale); otherwise it is created.
All API requests require authentication. Pass your API key as a Bearer token in the
Authorization header.
See Authentication for details.Atomic Semantics
The batch is applied atomically — it either fully succeeds or nothing is written. If any item fails validation, or the database write fails, no setups are persisted. On success the endpoint returns200 OK with the full list of upserted setups.
Because the batch is all-or-nothing, there are no per-item status flags: every item in the response was written successfully. Failures are surfaced as a single request-level error (400 or 500) identifying the first offending item.
Request Body
Array of setups to upsert. Must contain between 1 and 100 items. Each item has the same shape as the Create request body:
| Field | Type | Required | Description |
|---|---|---|---|
external_id | string | Yes | Unique identifier for the setup within the project. Must be unique across items in the same batch. |
evaluators | string[] | Yes | List of evaluator slugs to run on matched spans. See Evaluator Slugs. |
selector | object[] | No | Array of filter rules used to match spans. See the Create endpoint for the selector schema. |
evaluator_configs | object[] | No | Optional per-evaluator configuration overrides. |
Example Request
Response
200 OK
Returned when the entire batch is upserted successfully. Thesetups array contains one entry per input item, in the same order as the request. Each entry is a full setup object, matching the Create response shape.
400 Bad Request
Returned when the batch is rejected without writing any items. Theerror message identifies the first offending item by index. Causes:
- Empty
setupsarray —setups must contain at least 1 item - More than 100 items —
setups exceeds max of 100 - Any item missing
external_id—setups[N]: external_id is required - Two items in the batch share the same
external_id—setups[N]: duplicate external_id "..." (also at setups[M]) - Any item fails validation — e.g. an unknown evaluator slug, an invalid selector, or an invalid evaluator config, prefixed with the item index:
setups[N]: evaluators[0]: unknown evaluator slug "..."

