---
title: "Create an auto monitor setup"
method: POST
path: "/v2/auto-monitor-setups"
tags: ["auto-monitor-setups"]
---

# Create an auto monitor setup

`POST /v2/auto-monitor-setups`

## Request

- Base URL: `https://api.traceloop.com`
- URL: `https://api.traceloop.com/v2/auto-monitor-setups`
- Auth: none declared
- TypeScript: <https://skmtc.dev/traceloop/apis/traceloop-api/docs/v2/auto-monitor-setups/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new auto monitor setup for automatic monitor creation.

The `selector` field is a map of span attribute key-value pairs used to filter which spans
this monitor applies to. Keys are span attribute names and values can be strings, numbers, or booleans.

Common selector keys:
- `gen_ai.system` — LLM provider (e.g. "openai", "anthropic")
- `gen_ai.request.model` — model name (e.g. "gpt-4o", "claude-3-5-sonnet")
- `gen_ai.request.max_tokens` — max tokens (number)
- Any other span attribute from your traces

## Request body

- RequestCreateAutoMonitorSetupInput
  - `evaluators` string[], required: List of evaluator slugs to run on matched spans
  - `external_id` string, required: Unique identifier for the auto monitor setup, used to reference it in future requests
  - `selector` object: Map of span attributes to filter which spans this monitor applies to. Keys are span attribute names (e.g. gen_ai.system, gen_ai.request.model) and values can be strings, numbers, or booleans. Example: {"gen_ai.system": "openai", "gen_ai.request.model": "gpt-4o", "gen_ai.request.max_tokens": 1000}

## Response `201`

Created

- ResponseAutoMonitorSetupResponse
  - `created_at` string
  - `env_project_id` string
  - `evaluators` ResponseAutoMonitorEvaluatorResponse[]
    - `binding_id` string
    - `error_message` string
    - `evaluator_id` string
    - `evaluator_type` string
    - `input_schema` EvaluatorProperty[]
      - `description` string
      - `enum_values` string[]: The allowed values for this property. Only applicable when `type` is `enum`.
      - `label` string
      - `name` string, required
      - `type` 'string' | 'int' | 'float' | 'boolean' | 'enum', required
    - `output_schema` EvaluatorProperty[]
      - `description` string
      - `enum_values` string[]: The allowed values for this property. Only applicable when `type` is `enum`.
      - `label` string
      - `name` string, required
      - `type` 'string' | 'int' | 'float' | 'boolean' | 'enum', required
    - `processed_at` string
    - `status` string
  - `external_id` string
  - `id` string
  - `init_rules` TypesRule[]
    - `key` string
    - `op` 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'in' | 'not_in'
    - `source` string
    - `value` string
    - `value_type` string
  - `org_id` string
  - `project_id` string
  - `status` string
  - `updated_at` string

## Other responses

- `400`: Invalid input
- `500`: Internal error

## Changes

- **2026-02-26** `ed3a7440b9d0`: 2 breaking, 7 warning, 5 info
  - the response property `init_rules/items/op` became optional for the status `201`
  - the response property `init_rules/items/source` became optional for the status `201`
  - removed the request property `entity_type`
  - removed the request property `entity_value`
  - …10 more
- **2026-02-04** `d9ff77e6da64`: 10 warning, 2 info
  - added the new `boolean` enum value to the `evaluators/items/input_schema/items/type` response property for the response status `201`
  - added the new `boolean` enum value to the `evaluators/items/output_schema/items/type` response property for the response status `201`
  - added the new `enum` enum value to the `evaluators/items/input_schema/items/type` response property for the response status `201`
  - added the new `enum` enum value to the `evaluators/items/output_schema/items/type` response property for the response status `201`
  - …8 more
- **2026-01-04** `c9d9747be16a`: 1 info
  - endpoint added
- **2026-01-01** `aef6c851927f`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/traceloop/apis/traceloop-api/changes/v2/auto-monitor-setups/post.md)

---

[API](https://skmtc.dev/traceloop/apis/traceloop-api.md) - [All operations](https://skmtc.dev/traceloop/apis/traceloop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traceloop/apis/traceloop-api/revisions/9c12a04a5947?raw)
