---
title: "Preflight"
method: POST
path: "/api/v1/agents/copilot/preflight"
tags: ["agent-copilot"]
---

# Preflight

`POST /api/v1/agents/copilot/preflight`

Machine-run assumption checks for a not-yet-created agent config: does
the trigger data exist in this workspace, at what coverage, will the volume
fit the cap, can the chosen delivery mode deliver, and what workspace rules
interfere. Read-only; nothing is persisted.

## Headers

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

## Request body

- AgentCreate
  - `name` string, required
  - `channel` 'email' | 'push', nullable
  - `trigger_description` string, nullable
  - `trigger_source` 'posthog_event' | 'subscription_event' | 'enrichment' | 'agent_chain' | 'renewal_date' | 'habit_rebuild' | 'habit_maintenance' | 'first_week'
  - `event_name` string, nullable
  - `hogql_query` 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
  - `instructions` string, required
  - `sender_account` string, nullable
  - `sender_display_name` string, nullable
  - `resend_from_email` string, nullable
  - `reply_to` string, nullable
  - `auto_send` boolean
  - `delivery_mode` 'review' | 'auto' | 'slack' | 'discord' | 'resend' | 'autosend' | 'push' | 'info'
  - `autonomy_level` 'off' | 'shadow' | 'live', nullable
  - `info_channel` 'slack' | 'discord', nullable
  - `digest_id` string, uuid, nullable
  - `enrichment_backfill_days` integer
  - `min_confidence` number
  - `enrichment_match_all` boolean
  - `poll_from` string, date-time, nullable
  - `trigger_delay_hours` integer
  - `trigger_delay_minutes` integer
  - `stale_after_hours` integer, required
  - `renewal_offset_days` integer
  - `parent_agent_id` string, uuid, nullable
  - `ignore_list` string[]
  - `review_context_keys` string[]
  - `cooldown_days` integer
  - `daily_cap` integer, nullable
  - `context_mode` 'trigger' | 'activity_window'
  - `context_window_days` integer
  - `activity_gate` GateCondition[]
    - `field` string, required
    - `operator` string, required
    - `value` string, required
  - `copy_mode` 'ai' | 'template'
  - `copy_variants` CopyVariant[]
    - `condition` GateCondition — A predicate on local customer state (see agent_query.GATE_FIELDS).
      - `field` string, required
      - `operator` string, required
      - `value` string, required
    - `subject` string
    - `body` string
    - `format` 'text' | 'html'
  - `enrichment_context_threshold` number
  - `enrichment_instructions` string, nullable
  - `feedback_questions` string, nullable
  - `enabled` boolean

## Response `200`

Successful Response

- EnvelopePreflightReport
  - `data` PreflightReport, required
    - `generated_at` string, date-time, required
    - `verdict` 'pass' | 'warn' | 'fail', required
    - `checks` PreflightCheck[], required
      - `id` string, required
      - `status` 'pass' | 'warn' | 'fail', required
      - `title` string, required
      - `detail` string, required
  - `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)
