Skip to main content
PATCH
/
api
/
v1
/
campaigns
/
{id}
curl -X PATCH https://api.sendpilot.ai/api/v1/campaigns/camp_xyz789 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "pause"
  }'
{
  "success": true,
  "campaignId": "camp_xyz789",
  "action": "pause",
  "newStatus": "paused",
  "message": "Campaign paused successfully"
}
Update a campaign’s state. Currently supports pausing and resuming campaigns.

Request

X-API-Key
string
required
Your API key
id
string
required
The campaign ID
action
string
required
The action to perform. Options: pause, resume

Response

success
boolean
Whether the action was successful
campaignId
string
Campaign identifier
action
string
The action that was performed
newStatus
string
The new status of the campaign
message
string
Confirmation message
curl -X PATCH https://api.sendpilot.ai/api/v1/campaigns/camp_xyz789 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "pause"
  }'
{
  "success": true,
  "campaignId": "camp_xyz789",
  "action": "pause",
  "newStatus": "paused",
  "message": "Campaign paused successfully"
}
When a campaign is paused or resumed, the corresponding webhook event (campaign.paused or campaign.resumed) will be sent to your registered webhook endpoints.