Campaign_Send_Transactional_Multiple( string keyint campaignIdarray contactsstring sourcearray replacements,optional struct optionalParameters)

Note: When using one of the API wrappers, you do not need to pass the API key. The wrapper will pass the key for you, your first parameter should be the second parameter in the signature.


Send a new message in a transactional Campaign

A transactional campaign is sent to one recipient at a time for a specific purpose with replacement values for tokens specific to that message. Ex: sending a user's authorization code following a signup action on your site. Replacements will override the value of a custom field with the same name in the Campaign.

If the content of your email included a string {activation_code}, your replacements could contain {'activation_code':'123'},and that value would be used only for this instance of the transactional campaign.

This function allows you to send transactional messages in batches of up to 1000 contacts, providing a replacement struct for each contact. If this call fails and returns an error struct, no messages will be sent. The List_Evaluate_Contacts call can help you find potential problems in your list prior to using this call. This behavior can be bypassed with the continueOnError optionalParameter. If continueOnError is specified, the number actually sent will be in the "successes" key of the return struct


  string key Your API key - used to authenticate your account
  int campaignId The campaign you wish to send
  array contacts An array of structs containing the contacts you wish to send this transactional campaign to
Each contact is a struct, which can contain:
- email => value
- customFieldToken => value
- customFieldId => value

A contact must have a valid email

contact = {"email":"", "first_name": "Test", "last_name":"User"}
contact = {"email":"", 1:"Support", 2:"User"}
  string source A short description of the source of your contact
  array replacements An array of token replacement values to be swapped in the message body
optional struct optionalParameters A struct of optional parameters, see below for valid keys

optionalParameters can include:

bool continueOnError Send to good contacts even if bad contacts are found, defaults to false


mixed Returns true on success, returns a struct on failure

Still need help? Contact Us Contact Us