v1

latestSwagger 2.0MIT2026-07-17233380637.0 KB
Email Campaigns

Update an email campaign

put/emailCampaigns/{campaignId}

Path parameters

campaignIdinteger required

Id of the campaign

Request body

tagstring

Tag of the campaign

namestring

Name of the campaign

htmlContentstring

Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty

htmlUrlstring url

Url which contents the body of the email message. REQUIRED if htmlContent is empty

scheduledAtstring

UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).

subjectstring

Subject of the campaign

previewTextstring

Preview text or preheader of the email campaign

replyTostring email

Email on which campaign recipients will be able to reply to

toFieldstring

To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization

attachmentUrlstring url

Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps

inlineImageActivationboolean

Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts.

mirrorActiveboolean

Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign

recurringboolean

FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times

footerstring

Footer of the email campaign

headerstring

Header of the email campaign

utmCampaignstring

Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed

paramsobject

Pass the set of attributes to customize the type 'classic' campaign. For example, {"FNAME":"Joe", "LNAME":"Doe"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'

sendAtBestTimeboolean

Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled.

abTestingboolean

Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B

subjectAstring

Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value

subjectBstring

Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value

splitRuleinteger

Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else

winnerCriteria'open' | 'click'

Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record

winnerDelayinteger

Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record

ipWarmupEnableboolean

Available for dedicated ip clients. Set this to true if you wish to warm up your ip.

initialQuotainteger

Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.

increaseRateinteger

Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.

unsubscriptionPageIdstring

Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page.

updateFormIdstring

Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form.

Example request

{
  "tag": "Newsletter",
  "sender": {
    "name": "Mary from MyShop",
    "email": "newsletter@myshop.com",
    "id": 3
  },
  "name": "Newsletter - May 2017",
  "htmlContent": "<!DOCTYPE html> <html> <body> <h1>Confirm you email</h1> <p>Please confirm your email address by clicking on the link below</p> </body> </html>",
  "htmlUrl": "https://html.domain.com",
  "scheduledAt": "2017-06-01T12:30:00+02:00",
  "subject": "Discover the New Collection !",
  "previewText": "Thanks for your order!",
  "replyTo": "support@myshop.com",
  "toField": "{FNAME} {LNAME}",
  "recipients": {
    "exclusionListIds": [
      8
    ],
    "listIds": [
      32
    ],
    "segmentIds": [
      23
    ]
  },
  "attachmentUrl": "https://attachment.domain.com",
  "inlineImageActivation": true,
  "mirrorActive": true,
  "footer": "[DEFAULT_FOOTER]",
  "header": "[DEFAULT_HEADER]",
  "utmCampaign": "NL_05_2017",
  "params": {
    "FNAME": "Joe",
    "LNAME": "Doe"
  },
  "sendAtBestTime": true,
  "abTesting": true,
  "subjectA": "Discover the New Collection!",
  "subjectB": "Want to discover the New Collection?",
  "splitRule": 50,
  "winnerCriteria": "open",
  "winnerDelay": 50,
  "ipWarmupEnable": true,
  "initialQuota": 3000,
  "increaseRate": 70,
  "unsubscriptionPageId": "62cbb7fabbe85021021aac52",
  "updateFormId": "6313436b9ad40e23b371d095"
}

Response

Email Campaign has been updated