Pause Campaign
Campaigns
Pause Campaign
Halt an active campaign mid-send. Completes waitpoint tokens so Trigger.dev tasks observe the new state.
POST
Pause Campaign
CLI:
Overview
Flips anactive campaign to paused. Only active campaigns can be paused — every other status returns 400. The request body is empty.
Under the hood the server does two things:
- A compare-and-set update on
campaigns.status(fast, the only step that can fail the request). - Completes every outstanding Trigger.dev waitpoint token for this campaign’s leads with
{ paused: true }, so sleeping per-lead tasks wake up and re-check the status. This step is best-effort — token-completion failures are logged but do not surface as a 500.
AI agent notes
When to call. After a bounce spike, a misconfigured template, or explicit user intent. Validate on your side first — there’s no server-side dry-run.What changes immediately.
campaigns.status flips to paused synchronously. Sleeping tasks continue to exist on Trigger.dev until their waitpoint tokens resolve, but they will no-op on the pause check at the top of the engine loop.Idempotency. Not idempotent — a second call while already paused returns 400 (Only active campaigns can be paused). Treat that as a safe success for user-facing flows.Follow-up. Poll GET /api/campaigns/{id} to confirm status === "paused" before reporting success to the human. Resume later with POST /api/campaigns/{id}/resume.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Campaign UUID
Response
Campaign paused. Returns the updated campaign row with status: "paused".
The campaign row after the status transition. status is now paused.