Skip to main content
POST
/
api
/
campaigns
/
{id}
/
pause
Pause Campaign
curl --request POST \
  --url https://app.puffle.ai/api/campaigns/{id}/pause \
  --header 'Authorization: Bearer <token>'
{
  "campaign": {
    "id": "<string>",
    "user_id": "<string>",
    "name": "<string>",
    "daily_limit": 4503599627370495,
    "stop_on_reply": true,
    "open_tracking": true,
    "signature": "<string>",
    "skip_other_campaigns": true,
    "operating_hours": {},
    "stats": {
      "total": 4503599627370495,
      "sent": 4503599627370495,
      "replied": 4503599627370495,
      "bounced": 4503599627370495,
      "completed": 4503599627370495,
      "timed_out": 4503599627370495,
      "connection_sent": 4503599627370495,
      "connected": 4503599627370495,
      "message_sent": 4503599627370495
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "sender_accounts": [
      {
        "id": "<string>",
        "email_address": "<string>",
        "provider_account_id": "<string>",
        "display_name": "<string>",
        "status": "<string>",
        "first_name": "<string>",
        "last_name": "<string>",
        "daily_limit": 4503599627370495,
        "weekly_connection_limit": 4503599627370495,
        "weekly_message_limit": 4503599627370495,
        "is_premium": true
      }
    ]
  }
}
CLI:
puffle campaign pause --id <id>

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 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

Authorization
string
header
required

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

Path Parameters

id
string
required

Campaign UUID

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.