---
title: "Preview Agent"
method: POST
path: "/api/v1/agents/preview"
tags: ["agents"]
---

# Preview Agent

`POST /api/v1/agents/preview`

Dry-run a trigger over the last N days: how many emails would this agent
have sent? Doubles as query validation — a broken query returns ok=False with
the HogQL error rather than a count.

## Headers

- `authorization` string, nullable — Bearer <token>

## Request body

- AgentPreviewRequest
  - `event_name` string, nullable
  - `property_filters` AppSchemasAgentPropertyFilter[]
    - `key` string, required
    - `operator` string, required
    - `value` string, required
    - `type` string, nullable
  - `trigger_clauses` TriggerClause[]
    - `event` string, required
    - `property_filters` AppSchemasAgentPropertyFilter[]
      - `key` string, required
      - `operator` string, required
      - `value` string, required
      - `type` string, nullable
    - `presence` 'did' | 'not_did'
    - `not_delay_days` integer, nullable
  - `trigger_match` 'any' | 'all'
  - `condition_window_days` integer
  - `window_days` integer
  - `daily_cap` integer, nullable
  - `activity_gate` GateCondition[]
    - `field` string, required
    - `operator` string, required
    - `value` string, required

## Response `200`

Successful Response

- EnvelopeAgentPreviewResponse
  - `data` AgentPreviewResponse, required
    - `window_days` integer, required
    - `matched` integer, required
    - `known_customers` integer, required
    - `estimated_sends` integer, required
    - `ok` boolean
    - `error` string, nullable
    - `notes` string[]
  - `meta` Meta
    - `request_id` string
    - `timestamp` string, date-time
    - `total` integer, nullable
    - `truncated` boolean, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/minro/apis/minro-cs-platform.md) · [All operations](https://skmtc.dev/minro/apis/minro-cs-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/minro/minro-cs-platform/revisions/eb854265cf29/schema)
