Duplicate a campaign

Copy a campaign into a new draft with its own name, subject and recipients.

POST https://cotlet.dev/api/v1/privy/campaigns/{campaign_id}/duplicate

write

Does the same as Duplicate in the Campaigns menu, then sets the To field, the subject and the name. The copy keeps the original design and stays a draft, so nothing is sent. It reaches no one and a draft can be deleted from the Campaigns menu, so it does not wait for your OK. The body is not edited; change it in the Privy editor.

Parameters

Parameters: duplicate_campaign
NameTypeDescription
campaign_id string required string Campaign to copy (id from list_campaigns)
name string string Name of the copy
subject_line string string New subject line
segment_ids array array Segments to send to, replacing the original audience
exclude_segment_ids array array Segments to leave out

Request

cURL
curl -X POST https://cotlet.dev/api/v1/privy/campaigns/cmp_41c8/duplicate \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"October sale resend","subject_line":"In case you missed it: our October sale","segment_ids":["seg_7d20"]}'
Python
result = client.call("privy", "duplicate_campaign", {"campaign_id":"cmp_41c8","name":"October sale resend","subject_line":"In case you missed it: our October sale","segment_ids":["seg_7d20"]})
Node.js
const result = await cotlet.call('privy', 'duplicate_campaign', {"campaign_id":"cmp_41c8","name":"October sale resend","subject_line":"In case you missed it: our October sale","segment_ids":["seg_7d20"]});
CLI
cotlet call privy duplicate_campaign --data '{"campaign_id":"cmp_41c8","name":"October sale resend","subject_line":"In case you missed it: our October sale","segment_ids":["seg_7d20"]}'

Example response

JSON

{
  "campaign_id": "cmp_5b92",
  "title": "October sale resend",
  "status": "draft",
  "copied_from": "cmp_41c8",
  "subject_line": "In case you missed it: our October sale",
  "audience": {
    "included_segments": [
      "Did not open October sale"
    ],
    "excluded_segments": []
  }
}

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.