Campaigns
Send Lead Event
Record a per-phone event so future campaign sends can include or exclude that lead
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
Generic per-phone event stream. Use this to tell Setter “this phone number did event X at time T” so future campaign sends can include or exclude that lead based on whether the event happened (optionally within a time window). Typical event types:mastery_purchase, webinar_attended, trial_started, cart_abandoned. You choose the names — they’re free strings scoped to your organization.
Shape-agnostic: this endpoint accepts either real-time per-event POSTs (one event per call) or bulk batches (up to 50,000 events per call). Both produce the same rows; the filter logic doesn’t care which shape was used.
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.
How sends consume these events
When configuring a send under Campaigns → Sequence → Add a send, enable Event filter and pick:- Mode —
exclude(skip leads that have the event) orinclude(only send to leads that have the event). - Event type — must match the
eventTypeyou POST. - Within last (minutes, optional) — only consider events whose
occurredAtis within this many minutes of the send firing.
- Skip anyone who’s ever purchased Mastery:
{ mode: "exclude", eventType: "mastery_purchase" }(no window — sticky event) - Skip anyone currently in the live event:
{ mode: "exclude", eventType: "webinar_attended", within: { minutes: 120 } }(windowed — “currently attending”)
Idempotency and validation
The unique key(organizationId, phoneE164, eventType, occurredAt) makes retries safe — re-POSTing the same batch returns duplicates = received and inserted = 0.
Invalid rows (bad phone, missing/invalid occurredAt, oversize metadata) are rejected per-row, not per-batch — you get a structured rejects[] array back rather than a 400 for the whole call. The first 50 rejection reasons are returned for debugging.
Phone normalization
phoneE164 is parsed via libphonenumber. Accepts the value with or without leading + and tolerates common formatting variants. Numbers that don’t parse are reported in rejects[] with reason invalid phoneE164.
Caps
| Limit | Value |
|---|---|
| Events per request | 50,000 |
| Request body size | 10 MB |
eventType length | 128 chars |
metadata per event (encoded) | 8 KB |
Example Usage
Real-time single event (Bearer API key)
Bulk batch (HMAC signature)
Authorizations
Bearer token authentication using your API key
Body
application/json
Response
Batch processed. Inspect inserted / duplicates / rejected for outcome detail.
Available options:
accepted Number of entries in the input events array.
Newly stored rows.
Entries that collided with an existing (organizationId, phoneE164, eventType, occurredAt) row.
Entries that failed validation (bad phone, invalid date, oversize metadata).
First 50 rejected entries with a reason (debugging aid).

