---
title: "Preview a CRM email audience"
method: POST
path: "/api/campaigns/preview"
tags: ["crm-email"]
---

# Preview a CRM email audience

`POST /api/campaigns/preview`

Admin-only. Resolves how many emails a send would actually deliver (commercial-communications opt-outs excluded) and estimates when the send finishes, accounting for the per-minute throttle and the nightly quiet-hours pause. Resolving the count costs about as much as the first send wave.

## Request body

- CRMAudiencePreviewRequest — Request to preview how many emails an audience would deliver, and when it finishes. Carries the same audience criteria as a send; ``scheduled_at`` is the planned start used for the completion estimate (defaults to now).
  - `patient_states` string[] — Stato paziente filters.
  - `patient_filters` string[] — Deprecated alias of patient_states.
  - `registration_reasons` string[] — Motivo iscrizione filters.
  - `filter_match` 'any' | 'all' — How stato and motivo filters combine: 'any' (OR, default) unions them; 'all' (AND) keeps only patients matching both a selected stato and a selected motivo.
  - `recipient_emails` string[] — Explicit recipient emails (CSV); take priority over the filters.
  - `scheduled_at` string, date-time, nullable — Planned send start for the completion estimate (defaults to now).

## Response `200`

Successful Response

- CRMAudiencePreviewResponse — Deliverable audience size and an estimated completion time for a send.
  - `recipient_count` integer, required — Audience size (filters: a COUNT excluding commercial opt-outs, exact for a single filter; CSV: uploaded addresses, opt-outs not resolved so possibly high).
  - `over_threshold` boolean, required — True when the audience exceeds the throttle threshold (send is staggered).
  - `throttle_rate_per_minute` integer, required — Emails per wave when throttled.
  - `throttle_threshold` integer, required — At/below this size the send goes out in a single wave.
  - `scheduled_at` string, date-time, required — Start time used for the estimate.
  - `estimated_completion_at` string, date-time, nullable — Estimated time the last email is dispatched, accounting for the per-minute throttle and the nightly quiet-hours pause. Null for an empty audience.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/corabea/apis/corabea-api.md) · [All operations](https://skmtc.dev/corabea/apis/corabea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corabea/corabea-api/revisions/d6ed0fec5d4f/schema)
