Skip to main content
POST
/
api
/
campaigns
/
{id}
/
pause
Pause a running campaign
curl --request POST \
  --url https://app.puffle.ai/api/campaigns/{id}/pause \
  --header 'Authorization: Bearer <token>'
{
  "campaign": {
    "id": "8c2b2d4e-e29b-41d4-a716-446655440000",
    "user_id": "11111111-1111-1111-1111-111111111111",
    "type": "email",
    "name": "Q2 Enterprise Outreach",
    "status": "paused",
    "daily_limit": 50,
    "stop_on_reply": true,
    "open_tracking": true,
    "signature": "Best,\n%first_name%",
    "skip_other_campaigns": null,
    "operating_hours": null,
    "stats": {
      "total": 120,
      "sent": 34,
      "replied": 4
    },
    "created_at": "2026-04-18T15:12:00Z",
    "updated_at": "2026-04-22T09:05:00Z",
    "sender_accounts": []
  }
}

Overview

Flips an active 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:
  1. A compare-and-set update on campaigns.status (fast, the only step that can fail the request).
  2. Completes every outstanding Trigger.dev waitpoint token for this campaign’s prospects with { paused: true }, so sleeping per-prospect 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

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 paused. Returns the updated campaign row with status: "paused".

campaign
object
required

The campaign row after the status transition. status is now paused.