Duplicate campaign
Make a draft copy of a campaign, like Duplicate in the Campaigns tab.
POST https://cotlet.dev/api/v1/emailoctopus/campaigns/{campaign_id}/duplicate
Does what Duplicate in the campaign drop-down does: it starts a new campaign from an existing one, sent or draft, and returns the new campaign_id. The copy is a draft and reaches no one until schedule_campaign or send_campaign runs, so this tool needs no confirmation. Change the name, subject or sender with update_campaign, and the recipients with set_campaign_recipients.
Parameters
| Name | Type | Description |
|---|---|---|
| campaign_id string required | string | Campaign ID from list_campaigns. |
Request
curl -X POST https://cotlet.dev/api/v1/emailoctopus/campaigns/campaign_8c41d2/duplicate \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("emailoctopus", "duplicate_campaign", {"campaign_id":"campaign_8c41d2"}) const result = await cotlet.call('emailoctopus', 'duplicate_campaign', {"campaign_id":"campaign_8c41d2"}); cotlet call emailoctopus duplicate_campaign --data '{"campaign_id":"campaign_8c41d2"}' Example response
{
"campaign_id": "d5e8a3b1-62c9-4e70-8a14-9f0b7c2d6e83",
"name": "Autumn offer, last chance",
"status": "draft",
"copied_from": "c7a41b92-0d3e-4f58-b6a1-2e9d8c5f7014"
}