Update campaign
Change the name, subject, preview text or sender of a draft campaign.
PATCH https://cotlet.dev/api/v1/emailoctopus/campaigns/{campaign_id}
write
Edits the set-up fields of a campaign that has not been sent: name, subject, preview text (the line shown after the subject in the inbox), sender name and sender email address. Fields you leave out stay as they are. The tool does not touch the design or the HTML of the email. It reaches no one, so it needs no confirmation.
Parameters
| Name | Type | Description |
|---|---|---|
| campaign_id string required | string | Campaign ID from list_campaigns. |
| name string | string | Internal name of the campaign; subscribers do not see it. |
| subject string | string | Subject line. |
| preview_text string | string | Preview text shown after the subject. |
| from_name string | string | Sender name. |
| from_email string | string | Sender email address verified in your account. |
Request
curl -X PATCH https://cotlet.dev/api/v1/emailoctopus/campaigns/campaign_8c41d2 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("emailoctopus", "update_campaign", {"campaign_id":"campaign_8c41d2"}) const result = await cotlet.call('emailoctopus', 'update_campaign', {"campaign_id":"campaign_8c41d2"}); cotlet call emailoctopus update_campaign --data '{"campaign_id":"campaign_8c41d2"}' Example response
{
"campaign_id": "d5e8a3b1-62c9-4e70-8a14-9f0b7c2d6e83",
"name": "Autumn offer, last chance",
"subject": "Last chance: Autumn offer",
"preview_text": "Ends Sunday",
"from_name": "Northside Bakery",
"from_email": "hello@northside.example",
"status": "draft"
}