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
| Name | Type | Description |
|---|---|---|
| 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 -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}' result = client.call("mautic", "set_campaign_active", {"campaign_id":1,"active":True}) const result = await cotlet.call('mautic', 'set_campaign_active', {"campaign_id":1,"active":true}); cotlet call mautic set_campaign_active --data '{"campaign_id":1,"active":true}' Example response
{
"campaign_id": 15,
"name": "Birthday email",
"active": false
}