Creating and Sending Email Broadcast

This endpoint allows you to create and send multiple Email messages in a single API request.

Before creating and sending bulk Email messages you need to:

  • Create a Subscriber List that contains a column which stores the emails of the subscribers.
  • Once created the subscriber list, copy the unique identifier of the list (“listId”). This id will help you to send the messages to the subscribers that are added in that list.

In the following request body example, we are going to send this message "Welcome to EliPackage! This is a test" for each subscriber contained in the list.

When you create and sending multiple Email messages (Broadcast), the request body contains the following data:

HTTP Request: POST /broadcasts

{
  "deliveryMethod": "EMAIL",
  "campaignName": "Email Broadcast",
  "description": "Sending Broadcast now",
  "listId": 95830,
  "listField": "email",
  "message": "<p>Welcome to EliPackage!</p> <p>This is a test</p>",
  "origin": "[email protected]",
  "scheduleWithoutDate": false,
  "subject": "Email Test"
}

The parameters presented in the request body example when creating and sending the multiple Email messages are the following:

Parameter Required Description
deliveryMethod Yes

Specifies the type of delivery channel which the message will be sent: "SMS" ,"EMAIL", "PUSH", "RCS", "WHATSAPP".

In this case, we enter the "EMAIL" value to send the Email message.

campaignName Yes

Name of the campaign, used as the main identifier for the broadcast.

description Yes

Description of the broadcast.

listId Yes

Enter the unique identifier of the list which contains the Recipients (subscribers) of the broadcast.

listField Yes

Name of the column defined when creating the subscriber list that contains the emails of the subscribers.

message Yes

Content of the Email message that will be sent to the subscribers. This can be a simple text or HTML format.

origin Yes

Source address of the broadcast.

scheduleWithoutDate Yes

Define the Date & Time of your broadcast

  • true: Define the date and time when sending the Email messages.
  • false: Send the Email messages once the API Call is executed.

By default is false

subject Yes

Headline of the email.

broadcastDate No

Applies only when the "scheduleWithoutDate" is true. That is, when you want to define the date and time when sending the SMS messages.

Set the date and time when the SMS messages will be sent in UTC format: (yyyy-mm-dd-Thh:mm:ss.ssZ).

If you do not set the date, the sending of the broadcast will be pending.

filters No

Set the filter you want to apply on the message.

filterName No

Filter Name. The content is the name of the filter applied on the message.

throttle No

Message delivery speedometer.

By default, 160 messages are sent per second.

clientId No

Unique user identifier that can be used for reporting purposes.

When you created and sent the multiple Email messages, the response body contains the following data:

{
  "meta": {
    "timestamp": 1689879000421,
    "transactionId": "98835d43-46a0-474b-a768"
  },
  "data": {
    "id": 84288,
    "beginDate": "2023-07-20T18:50:00.383688185Z",
    "deliveryMethod": "EMAIL",
    "campaignName": "Email Broadcast",
    "createdBy": "[email protected]",
    "operator": "[email protected]",
    "description": "Sending Broadcast now",
    "listId": 95830,
    "listSize": 1,
    "listField": "email",
    "message": "<p>Welcome to EliPackage!</p> <p>This is a test</p>",
    "origin": "[email protected]",
    "broadcastDate": "2023-07-20T18:50:00.383677863Z",
    "broadcastStatus": "SENDING",
    "createdAt": "2023-07-20T18:50:00.378087288Z",
    "scheduleWithoutDate": false,
    "throttle": 160,
    "notSentCounter": 1,
    "messagesSentCounter": 0,
    "subject": "Email Test"
  }
}

Parameters presented in the response body example when creating and sending the multiple Email messages are the following:

Parameter Description
data Data contained once the broadcast was created and sent.
data.id Unique identifier of the broadcast.
data.beginDate Date on which the creation and sending of the Broadcast begins.
data.deliveryMethod

Delivery channel which the message will be sent: "SMS" ,"EMAIL", "PUSH", "RCS", "WHATSAPP".

In this case, we enter the "EMAIL" value to send the EMAIL message.

data.campaignName

Name of the campaign, used as the main identifier for the broadcast.

data.createdBy

User who created and sent the broadcast.

data.operator

User who is a member of the owner or creator of the broadcast.

data.description

Description of the broadcast.

data.listId

Unique identifier of the list which contains the Recipients (subscribers) of the broadcast.

data.listSize

Total number of lines read in the list.

data.listField

Name of the column defined when creating the subscriber list that contains the emails of the subscribers.

data.message

Content of the Email message that will be sent to the subscribers. This can be a simple text or HTML format.

data.origin

Source address of the broadcast.

data.broadcastDate

Optional. Applies only when the "scheduleWithoutDate" is true. That is, when you want to define the date and time when sending the Email messages.

Set the date and time when the Email messages will be sent in UTC format: (yyyy-mm-dd-Thh:mm:ss.ssZ).

If you do not set the date, the sending of the broadcast will be pending.

data.broadcastStatus

When the broadcast is created and sent, the system assigns one of the following possible statuses to a Broadcast:

  • "DONE": Broadcast sent.
  • "PENDING": The broadcast was created without a sending date → scheduleWithoutDate in true.
  • "SCHEDULE": scheduled delivery.
  • "SENDING": sending in progress.
  • "SUSPENDED": sending suspended (the broadcast was scheduled and was suspended)
  • "PAUSE": sending paused/stopped (the broadcast was in progress and was paused). Everything that was in transit will be processed.
  • "DONE_WITH_FLAWS": eady sent. Some recipients did not have the sending field (email or phone number).
  • "FATAL_ERROR": execution error. Contact support.
data.createdAt

Date when the broadcast was created and sent .

data.scheduleWithoutDate

Date & Time of your broadcast

  • true: Define the date and time when sending the Email messages.
  • false: Send the Email messages once the API Call is executed.

By default is false

data.throttle

Optional. Message delivery speedometer.

By default, 160 messages are sent per second.

data.notSentCounter

Total unsent messages.

data.messagesSentCounter

Total sent messages.

data.subject

Headline of the email.