Update campaign
Change the name, subject or sender of a draft campaign.
PATCH https://cotlet.dev/api/v1/mailjet/campaigns/{campaign_id}
write
Sets the campaign name, the subject line and the From name and address of a draft. A scheduled or sent campaign cannot be edited and returns an error. The sender address must be one you may use in Mailjet. The design is not touched. The change reaches no one and is undone by calling the tool again, so it does not wait for your OK.
Parameters
| Name | Type | Description |
|---|---|---|
| campaign_id integer required | integer | Campaign ID from list_campaigns. |
| name string | string | Campaign name. Only you see it. |
| subject string | string | Subject line, up to 100 characters. |
| sender_name string | string | From name. |
| sender_email string | string | From address you own or manage in Mailjet. |
Request
curl -X PATCH https://cotlet.dev/api/v1/mailjet/campaigns/1 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("mailjet", "update_campaign", {"campaign_id":1}) const result = await cotlet.call('mailjet', 'update_campaign', {"campaign_id":1}); cotlet call mailjet update_campaign --data '{"campaign_id":1}' Example response
{
"campaign_id": 7182934615,
"name": "Autumn offer, last chance",
"subject": "Last chance: Autumn offer",
"sender": "Northside Bakery <hello@northside.example>",
"status": "draft"
}