nevent_quote_campaign
Estimate the credit cost and eligible audience of a campaign BEFORE sending it. Read-only pre-flight check against nev-api POST /campaigns/quote — it never debits credits and never sends. Call this after nevent_create_campaign and before nevent_schedule_campaign: scheduling a campaign the tenant cannot afford fails at send time with a 402. Returns cost (credits required), available (credits in the pool), missing (shortfall), recipientCount, affordable (boolean — the gate to check), blocked, unlimited, and an audience block with uniqueAudience, estimatedEligible per channel, eligibleAnyChannel and emailExclusions (no_email / invalid_email / opt_out / unknown). The audience block is null when the estimate could not be computed: any channel mix touching WhatsApp, more than 20 segments, or a data-api timeout — cost and recipientCount are still valid in that case. Use segment_ids from nevent_list_segments; omit them to quote the full addressable audience. Set transactional=true only for genuinely transactional sends (order confirmations, ticket delivery) — it estimates against the TRANSACTIONAL consent mode, which reaches recipients who opted out of marketing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Delivery channel to quote (nev-api CommunicationChannel enum). Legacy values EMAIL/SMS/WHATSAPP are accepted and mapped to the _ONLY variants. Channel mixes involving WhatsApp return a null audience block. | |
| segment_ids | No | Segment IDs to quote (optional, max 20). Omit to quote the full addressable audience for the channel. More than 20 segments makes the backend skip the audience estimate. | |
| transactional | No | Whether this is a transactional campaign (default false). Transactional uses the TRANSACTIONAL consent mode for the audience estimate, which reaches recipients who have opted out of marketing. |