Campaigns
Filter Send Audience
Narrow a scheduled campaign send to a real-time include or exclude list of leads
POST
Documentation Index
Fetch the complete documentation index at: https://docs.trysetter.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Most campaign sends go to the full uploaded audience. This endpoint lets you narrow a specific send based on signals that aren’t known at upload time — e.g. “for tomorrow’s send, only message leads who completed step X by tonight.” POST aninclude or exclude list to a specific send up until 5 minutes before that send fires (the filter deadline).
Enabling on a send: in the campaign editor, toggle “Apply filter from inbound webhook” on for the target send. A send with the filter off ignores any webhook events targeting it.
Authentication
Pick the auth mode for inbound webhooks once per organization, in Settings → Webhooks:- API key (default) — Bearer-token auth using any active org-level API key.
- HMAC — generate a signing key, sign the raw request body with HMAC-SHA256, send as
X-Setter-Signature: sha256=<hex>. Multiple signing keys can be active concurrently for rotation.
When the filter is applied
The send’s recipient list is materialized about 60 seconds beforescheduledFor. At that moment:
- Every lead in the campaign’s audience whose ingest status is
okis loaded. - Opted-out phone numbers are dropped.
- The most recent filter event for that send is applied:
includekeeps only listed leads;excluderemoves them. - One row per remaining lead is inserted into the per-recipient send queue.
{ status: "already_received" } and are no-ops.
Lead matching
A lead in your filter payload matches an audience lead if either of these is true:- The payload’s
externalIdmatches the audience lead’sexternal_idcolumn from the CSV (case-sensitive). - The payload’s
phoneE164matches the normalized E.164 stored on the audience lead.
Combining with lead events
A send can have both an audience filter (this endpoint) and an event filter (matching against Send Lead Event) configured. Both must keep a recipient for them to receive the message — the filters are ANDed.Example Usage
HMAC signature
Bearer API key
Authorizations
Bearer token authentication using your API key
Body
application/json
Campaign that owns the targeted send.
Send to filter. Must currently be in pending status with audienceFilterMode = webhook_filtered.
include — send only to listed leads. exclude — send to everyone EXCEPT listed leads.
Available options:
include, exclude Required array length:
1 - 100000 elementsResponse
Filter event recorded (or duplicate of an earlier payload)

