campaigns_preflight
The compliance pre-flight report for a campaign: who the country, opt-out, personal-mailbox and evidence rules will exclude, and why. Covers the segment's NEW leads plus the leads already enrolled and not finished.
Show the user headline first: allowed of total contacts can be emailed, set_aside held back now, would_set_aside more once rules in warn mode are switched on (they are still emailed today), plus summary / would_summary, the one-line explanations to quote. groups is the same split by short label, each contact counted once (largest first).
Also returns totals (allowed = no finding at all, excluded = blocked by a rule in enforce mode, warned = would be excluded once that rule is enforced), tiers (country rule tiers), reasons (the details: one row per reason and country, with a short label and why/fix text, class, consent_can_lift, can_unlock — the customer can lift it per lead: a consent record, or for personal_mailbox (class business_use) an existing customer, a published business listing or leads_confirm_business_use — and a few example_lead_sqids), workspace_checks (sender details, GDPR legitimate-interest assessment and privacy notice when EU/EEA/UK leads are present), mailboxes (health of the campaign's mailboxes), report_hash, and acknowledgement (whether the user's acknowledgement still covers this report).
Lists over 20,000 leads are sampled evenly and the counts scaled (sample). The report is cached for two minutes; pass refresh=true after fixing something. Excluded leads are dropped automatically at generate, approve and send — this report makes that visible.
Typical flow: show the report to the user, then campaigns_preflight_acknowledge with its report_hash, then campaigns_activate.
Method: GET /api/v1/workspaces/{workspace_sqid}/campaigns/{sqid}/preflight/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sqid": "<sqid>"
},
"name": "campaigns_preflight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sqid | Yes | ||
| refresh | No | Rebuild the report instead of using the 2-minute cache. |