Schedule Campaign

The Schedule Campaign command allows you to set a campaign to deploy at a specific date and time on a one time or recurring basis.   

The Schedule Campaign command requires the following arguments: Command, Realm, Password, List, Format, Start Date and Time.


The command is ‘schedule_deployment’, the realm is ‘myrealm’ and the password is ‘mypass’.  The list properties are defined in list with ID ‘5’, the template content to send is defined in the list properties, and all contacts in the list will be sent the Plain Text format at 11:30 am on September 20, 2012.

Before deploying a campaign, every email address to receive the message must be subscribed to the list.  If a contact does not exist or is not subscribed to the list, no message will be sent to that contact.

The Schedule Campaign command does not check to ensure contacts exist in the list or list segment.  If there are 0 contacts, the command will return SUCCESS and be scheduled.  If there are no contacts at run time, no campaign will deploy and a failure message will be sent to the Notification email address.

Return Count

The Schedule Campaign command can also return the contact count for the campaign by using the command 'scheduledeploymentreturncount'.  It works the same as the basic 'schedule_deployment' but also returns the number of pieces that would send if the campaign were to launch immediately. **

Super List

Prior to v12.05.0, Schedule Campaign deploys campaigns of type Normal only and does not deploy a Super List.  Super List deployment can only be scheduled through the user interface or in versions before v12.05.0.

Time Zone

Schedule Campaign Start and End times are based on the system time zone, and ignore the timezone set for the Account.  For example, if the database timezone is set to PST, but the Account uses EST when displaying the time in the user interface, the API will always schedule based on the PST time.  Your campaign scheduled to run at 12:30 PM will deploy at 12:30 PM PST / 3:30 PM EST.  

As of 12.06.0, you may select to use the Account's timezone instead with the use_timezone attribute.  If use_timezone = 1, then your campaign scheduled to run at 12:30 PM will deploy at 12:30 PM EST.

Customized Content

Templates support the option of sending customized information.  While you can pass in custom data with the Send command, the Schedule Campaign command will only use the data associated to each contact for each message. 

However, you can customize the List From and Reply To address using custom contact data fields.  This can be accomplished by setting the custom data in the List properties (From = "%%$myfrom%%" <%%$myemail%%>).

When the message is sent, the publisher will grab the data stored in the Contact's custom data field to fill in the address settings:

From: "My Custom From Address" <>


Using all commands and arguments (please note the command is wrapped for display purposes only):


A message from List ‘5’ with MIME content from Template ‘42’ will be sent to all contacts that match the rules defined in segmentation rule ‘9’ and are not in the suppression list 'suppress.txt'.  The message will repeat weekly on Monday and Wednesday at 9:30 am starting on September 26, 2012.  Successful results return:



The Schedule Campaign command outputs either a SUCCESS or FAILURE message. 


The Schedule Campaign command success message is the simple word 'SUCCESS'.  The result format is:


The Schedule Campaign command with the additional 'returncount' returns the number of contacts currently matching the List Count minus any Segment or Suppression rules.** The result format is:

SUCCESS: [count]


A Schedule Campaign command will fail for several reasons, such as if the List or Template does not exist, or the List is missing a From address.  The result format is:

FAILURE: [Reason]


The command support the following arguments: 







Defines the command to use.

cmd=[schedule_deployment, scheduledeploymentreturncount]




Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.





Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.



List ID


Identifier of the list properties to use.


Template ID


Identifier of the template content to send.  If no template id defined in the call, the default template defined in the List properties will be used.  If no template is defined there, the call will fail.  In the template, both formats must be defined in order to send MIME.




To specify the format of the email messages, set Format to the corresponding value:

0 = send Contact Selected Format
1= send Plain Text only
2 = send HTML only
99 = send Multipart MIME


Segmentation Rule


Identifier of the segmentation rule to use to limit the contacts.   If no segmentation rule is specified or is set to 0, the campaign will deploy to every contact in the List.


Seed List


To seed a campaign with test addresses from a Seed List, set the seed_list id.


Suppression List


To suppress contacts in the list from recieving the message, use the Suppression List by defining the Name of the Suppression LIst.

suppression_list=[suppression list name]

Set Data Macro


To set contact data when a campaign is deployed, define the Set Data Macro ID.


Campaign Alias


An optional text string to help you distinguish the campaign from others deployed from the same list.


Send RSS


By default, campaigns will send to all contacts, including any RSS contacts.  to prevent messages from deploying to RSS Contacts, set to 0.

*Removed in v11.16.0




To send to only a specific number of contacts, define a limit.  This is useful for testing message content to a group of test contacts.  Limit is not supported when sending an AB Definition.

Fillin Fields*  

If the List and Template contain fillin fields, set the values by defining the fillin_name and fillin_values, where N is a number starting with 0 up to 9 (limited to 10 fillin fields at this time).  For example:

&fillin_name0=Subject &fillin_value0=Welcome &fillin_name1=City &fillin_value1=Seattle

**NOTE: If a fillin field has been defined as Required in a List, Template, or Article, then it must be defined in the Schedule Campaign command, otherwise the command will fail with the following error:

FAILURE: missing value for required fillin field [fillin field name]

&fillin_nameN=[fillin_field_name] &fillin_valueN=[fillin_field_value]

Seed Delivery


To seed a campaign with email addresses associated with monitored mailboxes (ie: Return Path), set Delivery to 1.  This feature is limited in its availability and must be enabled in your Realm settings.  When the campaign is complete, the results of the Deliverability Report are available in the Campaign Details.



Released in v10.8.0

Send Notification  

After the campaign has completed, a notification email will be sent to the specified email address.

notify_email=[email address]

Start Date


The date to start sending the campaign. If it is not defined, the campagain will be immediately deployed.

mm = two digit number for the month, 01 to 12
dd = two digit number for the day, 01 to 31
yyyy = four digit year




Start Time


The time to run the campaign.  If it is not defined, the campagain will be immediately deployed.

hh = two digit number for the hour in twenty four hour notation, 00 to 23
mm = two digit number for the minute, 00 to 59



End Date


The date to stop sending the campaign. If it is not defined, the campagain will be immediately deployed.

mm = two digit number for the month, 01 to 12
dd = two digit number for the day, 01 to 31
yyyy = four digit year




No End Date


To schedule a repeating campaign that never ends, set to 1 and do not define the End Date. If set to 1, any defined End Date will be ignored.



Workflow Send Time


Specify the number of hours prior to the scheduled time to send the Workflow message.  This is only valid if Workflow is enabled for the list. 

hh = one or two digit number to indicate the hour from 0 to 72
0 = send at scheduled time



Repeat Frequency


To schedule a repeating campaign, set the frequency.  If set to weekly, you must also set the week day to 1 for each day to send.

0 = one time, do not repeat
1 = hourly
2 = daily
3 = weekly
4 = monthly
6 = every 15 minutes
7 = every 30 minutes  




Use Time Zone


If your Account is set to use a timezone other than the default server timezone (usually PST), the campaign is scheduled using the default servers timezone  To use the Account specific timezone instead, set to 1.  

*Time Zone option added in v12.06.0





Set verbose to true to output XML formatted settings for the scheduled campaign.  By default, this flag is set to false.



Email Campaign Labels


Define labels to associate the campaign for later reporting.  Labels are optional.  The label name must match a valid label of the specified type already defined in your Realm.  Use Get Email Labels to get a list of defined Campaign Labels.

Email Campaign Label support added in v12.06.0. 

Email Campaign Label support is deprecated in v15.14.0 in preference to new Label support.



Account Profile   

To use an Account Profile other than that assigned to the list, define the Account Profile ID.  

*Account Profile support added in v12.03.0.

Email Snapshot  

Email Snapshot will create and store the HTML and image screenshot of each message sent, including contact-specific personalization.  If your Realm is enabled for Email Snapshot, to store a copy of each message, set the 'snapshot' argument to 1.  

Email Snapshot support added in v15.00.00.


Comma separated list of up to 10 labels, identifiers of custom keywords to group and report items that have a similar use or purpose.  The label(s) must be defined for the Realm in order to save.  Use Get Labels to see a list of valid labels. 

Label support added in v15.14.00 to replace deprecated Email Campaign Labels.


** Time Zone support, Email Campaign Label support, and Schedule Campaign with Count added in v12.06.0 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk