Initiates the launch of an email campaign and returns an OK response from the API to confirm that the request has been received. The actual launch itself will take place after the launch request has been processed.
Warning: Launches are asynchronous operations, so a successful request might end up in a failed launch, e.g. when the email subject or recipient list was not specified. The Querying Email Campaign Data endpoint must be polled to obtain information on the launch progress, where the api_status and api_error parameters will contain the status.
Note: If an email campaign is launched, the segment or contact list specified in Creating an Email Campaign receives it.
Endpoint
POST https://api.emarsys.net/api/v2/email/<email_id>/launch
Parameters
Required parameters
Name | Type | Description | Comments |
---|---|---|---|
emailID | int | Email ID to launch, part of the URI |
Optional parameters
Name |
Type |
Description |
Comments |
---|---|---|---|
schedule |
datetime |
If specified, the launch will be scheduled for the set time (in the default timezone) of the customer. |
|
timezone |
string |
Applies the specified timezone to the launchtime in thescheduleparameter. |
See Time Zones for details. |
features |
array of strings |
Specifies additional features to enable for the email campaign. Valid values for features currently available via the API:
If any of the listed features is not available to you, contact Emarsys Support. |
URI Example
https://api.emarsys.net/api/v2/email/1234567890/launch
Request Example
{ "emailID": "1234567890", "schedule": "2011-08-12 08:35", "timezone": "America/New_York", "features": ["sto"] }
Result Example
{ "replyCode": 0, "replyText": "OK", "data": "" }
Errors
HTTP Code | Reply Code | Message | Description |
---|---|---|---|
400 | 6004 | Invalid email ID. | No email with the provided ID exists. |
400 | 6009 | Invalid date/time format. | Wrong formatting of the date/datetime value in the schedule parameter. |
400 | 6008 | Invalid timezone. | The value in the timezone parameter is invalid or not supported by the application. |
400 | 6032 | Contact list or segment is missing. | There is no recipient source defined. |
400 | 6033 | “fromname” is missing. | The email From (name) field is empty. |
400 | 6034 | “fromemail” is missing. | The email From (email address) field is empty. |
400 | 6035 | Subject is missing. | The email has no subject line. |
409 | 6003 | Invalid email status. | The email cannot be launched. Reason: It has already been launched either via the API or the Emarsys user interface. |
409 | 6005 | Child email cannot be launched. | Launching an A/B version child or a recurring email child is not supported. |
409 | 6069 | Incompatible settings. | Your email contains some settings which prevent its launch. Please contact Emarsys Support to resolve this issue. |
409 | 6070 | Personazation not supported. | Personalization features are not supported by broadcast Triggered Email campaigns. |
409 | 6071 | Conditions are not supported. | Conditional formatting is not supported by broadcast Triggered Email campaigns. |