Send Email (Batch)

Send Email (Batch)

POST /Email/Batch/  

This endpoint is used to send an email to multiple recipients in one go. The emails can be sent immediately or can be scheduled for delivery at a later date and time.

   

Usage scenario for this endpoint:  

This endpoint is especially useful for sending out email marketing campaigns like promotions for upcoming sales, special discount coupons, or event promotions, etc., to your contact lists.



End Point  

https://apiemail.Alendei.com/email/batch



Required Parameters

Usage

Description

Access Token or API Key

Authorization: Bearer {token} header

Pass the API key in the request header for request authentication.

Recipient

Included email "care@Alendei.com"

In case you would like to send the email to multiple recipients and wish to specify the recipients manually, use the parameter recipients to pass the email addresses of the intended recipients as an array.

ListId

listId (uuid) eg: "3fa85f64-5717-4562-b3fc-2c963f66afa6

In case you wish to send the email to contacts of a particular CRM list, pass the list ID of the desired list as the parameter value. In case you wish to send the email to multiple contact lists, you can pass multiple List IDs as an array.

Sender Name

From Email Name

This parameter specifies the name that you want to display as the sender name for the email. This name helps the email recipients identify who sent them the email.

Sender From

From Email address Example. marketing@yourdomain.com

This parameter specifies the email address you want to display as the sender address for the email and the name that you want to display as the sender name for the email.

These details helps the email recipients identify who sent them the email.

Note: By default, you can only use care@Alendei.com as the sender email for your emails. In case you wish to use your domain address as the sender email, please write to us at care@Alendei.com.

Reply to email

reply-to emails

This parameter specifies the email address at which you would like to receive replies from your email recipients, and the display name that you wish to use for the address.

Subject

Use Nice and catchy Subject lines (you can also use Personalization in your subject lines)

This parameter specifies the text that you would like to appear in the email's subject field.

Preheader

Preheader can be Dynamic using Personalization tags

This parameter specifies the text you would like to appear in the email's preheader area, i.e., the area after the subject line.

Email Campaign ID

Use Email Template ID of your Alendei Platforms Account

If you are using the Alendei Platforms Email Creator to design your email, pass the Email Campaign ID of the email you want to send as the parameter value.

Email Campaign ID is the unique identifier for an email campaign created in your Alendei Platforms account.

HTML Body

Use your own HTML

If you are designing your email in HTML, encode it into Base64 format and pass it as the parameter value.

Webhook URL

Delivery Status

Use this parameter to specify the webhook URL where you want to receive delivery status updates for the email being sent. When the destination email client returns a delivery status, the status is instantly posted to this webhook URL. Using a Webhook enables your application to receive delivery updates as they happen, in an easily parsable JSON format.

Updates will be sent for the following delivery statuses:

+ Processed

+ Dropped

+ Deferred

+ Bounce

+ Delivered

+ Open

+ Click

+ Spam Report

+ Unsubscribe

 



Optional Parameters

Usage

Description

Personalization Substitution Tags

personalizationSubstitutionTags : { "tagName": "[name]", "tagValue": "Care" }

These tags help you insert dynamic data at the time of email sending. In order to substitute the data at the time of the sending, follow the pattern "substitution_tag":"value” to substitute for the key/value pairs.

-- In case you use the parameter 'recipients' to identify the email recipients, the substitutions will work as specified.

-- In case you use both the parameters listID and recipients to identify the email recipients, and the information passed under recipients is not in conformity with the information stored in the CRM list, data will get substituted on the basis of information passed under the parameter recipients.

-- In case you use the parameter ListID to identify multiple Lists, and a contact exists in both the lists with different information, data will get substituted from either of the lists on a random basis.

ScheduledDate-time

RFC3339 format (Y-m-d\TH:i:sP)

Pass the scheduled date and time of the email distribution in RFC3339 format (Y-m-d\TH:i:sP). The date and time passed in this parameter will be converted as per the offset value specified in your account settings.


This example demonstrates how to send an email batch with with manually added recipients :


post url: https://apiemail.Alendei.com/email/batch

{
"sendingDetails": {
  "listId": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "senderFrom": {
    "email": "care@Alendei.com",
    "displayName": "Alendei Platforms"
  },
  "replyTo": {
    "email": "care@alendei.com",
    "displayName": "Alendei Platforms"
  },
  "subject": "hi [name] Weekend Discount Sale upoto 40% Off",
  "preHeaderText": "Grab 40% Discount only for next 2 hours ",
  "emailBody": "Your email HTML encoded in base64 format",
  "scheduleDateTime": "2021-10-24T14:15:22Z",
  "emailCampaignId": "00000000-0000-0000-0000-000000000000",      
  "webHookUrl": "https://webhook-url.yourdomain.com"
},
"recipients": [
  {
    "to": "care@Alendei.com",
    "personalizationSubstitutionTags": [
      {
        "tagName": "[name]",
        "tagValue": "Care"
      }
    ]},
      {
    "to": "care1@Alendei.com",
    "personalizationSubstitutionTags": [
      {
        "tagName": "[name]",
        "tagValue": "Care1"
      }
    ]
  }
]
}

Returns a 202 Accepted response with content on success.

Response Body  

 

{
  "status": true,
  "message": "Batch request accepted",
  "data": {
    "BatchId": "c7e24370-2e51-4294-8010-ace5881efca3"
    "QueuedTimestamp": 1630481768446
  }
}

 


    • Related Articles

    • Email Send Overview

      What is Email Send API? The Alendei Platforms Email Send API helps you programmatically send emails from your web application to your subscribers' email addresses. The Send API uses HTTP verbs and a RESTful endpoint structure to ensure flexibility ...
    • Send Email (Single)

      POST /email/Single/ This endpoint is used to send a single email to a single recipient. The emails can be sent immediately or scheduled for delivery at a later date and time. Usage scenario for this endpoint: This endpoint is especially useful for ...
    • Email Trigger

      POST /Email/Predefinedemail This endpoint is used to trigger email sendings based on pre-saved email trigger templates. Email trigger templates allow you to save all the details necessary to 'trigger' an email sending as a template. Doing so helps ...
    • Email Platform | Guidance Document

      Email platform 1) Dashboard: This section serves as the central hub where all aggregated APIs for various resources are displayed. As you scroll down, you'll find key highlights from the last message sent as well as insights into customer growth. 2) ...
    • Delisting requests through Microsoft Office 365 Anti-Spam IP Delist Portal

      In the event that you utilize a Microsoft or Office 365-hosted email address and experience a failure or soft bounce, it is possible that the Microsoft has blocked the sender IP address due to certain reasons. This situation may occur even if the all ...