/** * @example * { * campaignId: 1000000 * } */ export interface UpdateEmailCampaignRequest { /** Id of the campaign */ campaignId: number; /** 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 when abTesting is set to true. subjectA & subjectB are mandatory together & 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 */ abTesting?: boolean; /** 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' */ attachmentUrl?: string; /** To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. */ emailExpirationDate?: UpdateEmailCampaignRequest.EmailExpirationDate; /** Footer of the email campaign */ footer?: string; /** Header of the email campaign */ header?: string; /** 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** */ htmlContent?: string; /** Url which contents the body of the email message. **REQUIRED if htmlContent is empty** */ htmlUrl?: string; /** 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%. */ increaseRate?: number; /** Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. */ initialQuota?: number; /** 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_. */ inlineImageActivation?: boolean; /** **Available for dedicated ip clients**. Set this to true if you wish to warm up your ip. */ ipWarmupEnable?: boolean; /** Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign */ mirrorActive?: boolean; /** Name of the campaign */ name?: string; /** Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField** */ params?: Record; /** Preview text or preheader of the email campaign */ previewText?: string; /** Segment ids and List ids to include/exclude from campaign */ recipients?: UpdateEmailCampaignRequest.Recipients; /** **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 */ recurring?: boolean; /** Email on which campaign recipients will be able to reply to */ replyTo?: string; /** 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). */ scheduledAt?: string; /** Set this to true if you want to send your campaign at best time. Note:- **if true, warmup ip will be disabled.** */ sendAtBestTime?: boolean; /** Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** */ sender?: UpdateEmailCampaignRequest.Sender; /** Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else */ splitRule?: number; /** Subject of the campaign */ subject?: string; /** Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value */ subjectA?: string; /** Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value */ subjectB?: string; /** Tag of the campaign */ tag?: string; /** 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 */ toField?: string; /** 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. */ unsubscriptionPageId?: string; /** **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. */ updateFormId?: string; /** Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed */ utmCampaign?: string; /** Customize the utm_content value. Appears on outgoing tracking links alongside utm_campaign. Only alphanumeric characters and spaces are allowed */ utmContent?: string; /** Customize the utm_id value. Appears on outgoing tracking links alongside utm_campaign. When omitted or empty, the utm_id entry from the account's global utm_settings is used if enabled; otherwise no utm_id parameter is emitted. */ utmId?: string; /** Customize the utm_medium value. When omitted or empty, the utm_medium entry from the account's global utm_settings is used if set; otherwise the default `email` is used. */ utmMedium?: string; /** Customize the utm_source value. When omitted or empty, the utm_source entry from the account's global utm_settings is used if set; otherwise the account default (`brevo` or `sendinblue`) is used. */ utmSource?: string; /** Customize the utm_term value. Appears on outgoing tracking links alongside utm_campaign. Only alphanumeric characters and spaces are allowed */ utmTerm?: string; /** Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed */ winnerCriteria?: UpdateEmailCampaignRequest.WinnerCriteria; /** 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. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed */ winnerDelay?: number; } export declare namespace UpdateEmailCampaignRequest { /** * To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. */ interface EmailExpirationDate { /** Duration of the email expiry. maximum duration can be 3600 days or 480 weeks or 120 months. */ duration?: number | undefined; /** unit of the duration */ unit?: EmailExpirationDate.Unit | undefined; } namespace EmailExpirationDate { /** unit of the duration */ const Unit: { readonly Days: "days"; readonly Weeks: "weeks"; readonly Months: "months"; }; type Unit = (typeof Unit)[keyof typeof Unit]; } /** * Segment ids and List ids to include/exclude from campaign */ interface Recipients { /** List ids which have to be excluded from a campaign */ exclusionListIds?: number[] | undefined; /** Segment ids which have to be excluded from a campaign. */ exclusionSegmentIds?: number[] | undefined; /** Lists Ids to send the campaign to. **Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty** */ listIds?: number[] | undefined; /** **Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it.** Segment ids to send the campaign to. */ segmentIds?: number[] | undefined; } /** * Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}** */ interface Sender { /** Sender email from which the campaign emails are sent */ email?: string | undefined; /** Select the sender for the campaign on the basis of sender id. **In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)**. */ id?: number | undefined; /** Sender Name from which the campaign emails are sent */ name?: string | undefined; } /** Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed */ const WinnerCriteria: { readonly Open: "open"; readonly Click: "click"; }; type WinnerCriteria = (typeof WinnerCriteria)[keyof typeof WinnerCriteria]; }