Skip to main content
DELETE
/
api
/
campaigns
/
{id}
Delete a campaign
curl --request DELETE \
  --url https://app.puffle.ai/api/campaigns/{id} \
  --header 'Authorization: Bearer <token>'
{
  "success": true
}

Overview

Deletes a campaign and everything that depends on it:
  • Cancels every Trigger.dev run for in-flight prospects (best-effort, batched in groups of 50)
  • Deletes the campaigns row — Postgres FK cascades remove: campaign_prospects, campaign_prospect_messages, campaign_sender_accounts links, campaign_sequence_nodes (and their AI extensions)
There is no undo. Sent messages stay in downstream provider systems (LinkedIn invitations already out, emails already delivered) — we only clean up our own state.

AI agent notes

Confirm with the human before calling. Deletion is total and irreversible. If the campaign has any sent prospects, 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 with resume
  • PATCH /api/campaigns/{id} with a renamed campaign + smaller sequence — if the user wants to pivot, not abandon
Best-effort trigger cancellation. The Trigger.dev run-cancel calls are wrapped in 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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Campaign UUID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Campaign deleted. All Trigger.dev runs cancelled; all cascaded rows removed.

success
enum<boolean>
required
Available options:
true