Delete Campaign
Campaigns
Delete Campaign
Cancel all running background jobs and remove the campaign plus every cascaded row. Irreversible.
DELETE
Delete Campaign
CLI:
Overview
Deletes a campaign and everything that depends on it:- Cancels every Trigger.dev run for in-flight leads (best-effort, batched in groups of 50)
- Deletes the
campaignsrow — Postgres FK cascades remove:campaign_prospects,campaign_prospect_messages,campaign_sender_accountslinks,campaign_sequence_nodes(and their AI extensions)
AI agent notes
Confirm with the human before calling. Deletion is total and irreversible. If the campaign has any
sent leads, their conversation history in our conversations table is lost too.Safer alternatives to offer first:POST /api/campaigns/{id}/pause— halts sends, keeps all data, reversible withresumePATCH /api/campaigns/{id}with a renamed campaign + smaller sequence — if the user wants to pivot, not abandon
Promise.allSettled — individual failures are swallowed, the DB delete proceeds either way. A 500 from this endpoint means the DB delete itself failed; run cancellation errors do not surface.