Skip to main content
PUT
Upsert an Auto Monitor Setup by External ID
Idempotent full-replace of an auto monitor setup keyed by external_id. If no setup with the given external_id exists for the org/project, one is created and the response is 201 Created. If a setup already exists, all fields in the body fully replace the existing record and the response is 200 OK. The env_project_id is preserved across updates — it is only set on the create branch.
All API requests require authentication. Pass your API key as a Bearer token in the Authorization header. See Authentication for details.

Path Parameters

external_id
string
required
The external ID of the auto monitor setup to create or replace.Example: "my-agent-monitor-1"

Request Body

selector
object[]
required
An array of filter rules used to match spans. Each rule specifies an attribute key, a value to match, and a source indicating where the attribute lives. Only spans matching all provided rules will be evaluated. Must contain at least one filter.Each rule has the following fields:
evaluators
string[]
List of evaluator slugs to run on matched spans. One of evaluators or evaluator_configs is required.Example: ["answer-relevancy", "toxicity-detector"]See the full list of available slugs in the Evaluator Slugs reference.
evaluator_configs
object[]
Per-evaluator configuration, used in place of evaluators when you need to pass evaluator-specific options. One of evaluators or evaluator_configs is required.

Example Request

Response

200 OK

Returned when an existing setup was replaced. The response body is the updated auto monitor setup.

201 Created

Returned when a new setup was created. The response body is the newly created auto monitor setup. See the Create endpoint for the full response shape.

400 Bad Request

Returned when the request body is invalid (e.g. empty selector, missing both evaluators and evaluator_configs, or an unknown evaluator slug).

500 Internal Server Error