Activate or pause campaign

Switches the Active state of a campaign on or off.

PUT https://cotlet.dev/api/v1/mautic/campaigns/{campaign_id}/active

write Confirm

Sets the Active switch of the campaign. Turning it on lets the campaign start sending to its contact sources, a segment or a form, so Mautic advises not to activate a campaign until you are ready for it to go live. Turning it off stops it. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: set_campaign_active
NameTypeDescription
campaign_id integer required integer Campaign ID from list_campaigns.
active boolean required boolean true turns the campaign on, false turns it off.

Request

cURL
curl -X PUT https://cotlet.dev/api/v1/mautic/campaigns/1/active \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active":true}'
Python
result = client.call("mautic", "set_campaign_active", {"campaign_id":1,"active":True})
Node.js
const result = await cotlet.call('mautic', 'set_campaign_active', {"campaign_id":1,"active":true});
CLI
cotlet call mautic set_campaign_active --data '{"campaign_id":1,"active":true}'

Example response

JSON

{
  "campaign_id": 15,
  "name": "Birthday email",
  "active": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.