Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
SendCloud Portal
Sitecore Send API documentation
  • Introduction to the Sitecore Send API
        • Get all campaigns by page
        • Get all campaigns by page and page size
        • Get campaign details
        • Get all senders
        • Get sender details
        • Create a draft campaign
        • Manage a transactional campaign
        • Dynamic templates for transactional campaign
        • Clone an existing campaign
        • Delete a campaign
        • Update a draft campaign
        • Test a campaign
        • Send a campaign
        • Schedule a campaign
        • Unschedule a campaign
        • Get campaign statistics
        • Get campaign statistics with paging and filter
        • Get campaign summary
        • Get campaign activity by location
        • Get campaign link activity
        • Get A/B campaign summary
  1. Campaigns
  1. Sitecore Send API documentation
  2. API reference
  3. Campaigns
  4. Update a draft campaign

Update a draft campaign

POST /campaigns/{CampaignID}/update.{Format}

Updates the details of an existing draft campaign in your account. Non-draft campaigns cannot be updated. If you are updating a regular campaign, you can ignore the A/B split campaign parameters.

Request

ParameterInTypeRequiredDescription
AcceptheaderstringtrueDetermines the expected format and data type to retrieve the response data.Value: application/json
CampaignIDpathstringtrueThe ID of the campaign that you want to update.
FormatpathstringtrueThe supported file format for getting a response.Possible values: json and xml
apikeyquerystringtrueThe API key of your account.
NamebodystringtrueThe name of the campaign.
SubjectbodystringfalseThe subject line of the campaign.
SenderEmailbodystringfalseThe email address of the campaign sender.
ReplyToEmailbodystringfalseThe email address selected to receive replies from the campaign. This must be one of your campaign senders. If not specified, the SenderEmail is assumed.
ConfirmationToEmailbodystringfalseThe email address used to send a confirmation message when the campaign has been successfully sent. This can be any valid email address. If not specified, the SenderEmail is assumed.
HTMLContentbodystringfalseThe full HTML content of the campaign. You can use this instead of WebLocation. Omitting this when updating a draft will remove the HTML content.
WebLocationbodystringfalseThe URL used to retrieve the HTML content of the campaign. Sitecore Send automatically moves all CSS inline.
MailingListsbodyarrayfalseA list of email lists in your account that is used to send the campaign.
SegmentIDbodystringfalseThe ID of a segment in the selected email list. If not specified, the campaign is sent to all active subscribers of the email list.
IsABbodyBooleanfalseA flag that defines if a campaign is an A/B split campaign. If true, you must fill out A/B split campaign parameters.
TrackInGoogleAnalyticsbodyBooleanfalseSpecifies if tracking is enabled for the campaign. You must have Google Analytics configured on your site to use this feature.

A/B split campaign parameters

Use these parameters when updating an A/B split campaign. If you specify any of the parameters below when updating a regular campaign, they are ignored in the request.

NameInTypeRequiredDescription
ABCampaignTypebodystringtrueSpecify the type of test to be performed in the AB split campaign to determine the winning version
- test two different versions of the subject line.Content - test two different versions of the campaign content.Sender - test two different versions of the campaign sender.
SubjectBbodystringfalseIf testing A/B split campaigns with two subject line versions, this is the second subject version of the subject.
WebLocationBbodystringfalseIf testing A/B split campaigns with two HTML content versions, this is the web location of the second HTML content version.
SenderEmailBbodystringfalseIf testing A/B split campaigns with two sender versions, this is the email address of the second campaign sender. This must be one of the senders defined in your account.
HoursToTestbodyintegerfalseSpecify how long the test runs, before determining the winning campaign version to be sent to the rest of the recipients.This must be an integer between 1 and 24.
ListPercentagebodyintegerfalseSpecifies a portion of the target recipients to get the test campaign versions. For example, if you specify 10, then 10% of your recipients receive campaign A and another 10% receive the campaign B version.This must be an integer between 5 and 40.
ABWinnerSelectionTypebodystringfalseSpecifies the method to determine the winning version for the test. If not set, OpenRate is assumed.OpenRate -determine the winner based on the version that achieved more opens.TotalUniqueClicks - determine the winner based on the version that achieved more unique link clicks.
POST https://{hostname}/v3/campaigns/{CampaignID}/update.{Format}?apikey=

Request body:
{
  "Name": "Test campaign",
  "Subject": "Some subject",
  "SenderEmail": "[email protected]",
  "ReplyToEmail": "[email protected]",
  "ConfirmationToEmail": "[email protected]",
  "WebLocation": "http://www.mysite.gr/newsletter/index",
  "MailingLists": \[
    {
      "MailingListID": "adaf2fe1-55db-42dc-aaf8-56d8f502138d",
      "SegmentID": "10166"
    },
    {
      "MailingListID": "dce99b7a-2619-4805-aaeb-7fecdcb3c71b"
    }
  \],
  "IsAB": "true",
  "ABCampaignType": "Content",
  "WebLocationB": "http://www.mysite.gr/newsletter/index",
  "HoursToTest": "2",
  "ListPercentage": "20",
  "ABWinnerSelectionType": "OpenRate"
}
curl --include \\
     --request POST \\
     --header "Content-Type: application/json" \\
     --header "Accept: application/json" \\
     --data-raw '{
    "Name": "Test campaign",
    "Subject": "Some subject",
    "SenderEmail": "[email protected]",
    "ReplyToEmail": "[email protected]",
    "ConfirmationToEmail": "[email protected]",
    "WebLocation": "http://www.mysite.gr/newsletter/index",
    "MailingLists": \[
        {
            "MailingListID": "adaf2fe1-55db-42dc-aaf8-56d8f502138d",
            "SegmentID": "10166"
        },
        {
            "MailingListID": "dce99b7a-2619-4805-aaeb-7fecdcb3c71b"
        }
    \],
    "IsAB": "true",
    "ABCampaignType": "Content",
    "WebLocationB": "http://www.mysite.gr/newsletter/index",
    "HoursToTest": "2",
    "ListPercentage": "20",
    "ABWinnerSelectionType": "OpenRate"
}' \\
'https://{hostname}/v3/campaigns/{CampaignID}/update.{Format}?apikey='

Response

StatusDescriptionHeadersSchema
200 OKThe request is successful.Content-Type
/jsonAccept
/json
N/A
{
  "Code": 0,
  "Error": null,
  "Context": null
}
  • Code - the response code. This is 0 if successful.

  • Error - the response error message. This is null if successful.

  • Context - this is null if successful.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use