Send Email (Single)

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 sending recipient-specific one-time alert emails or updates.

 



End Point  

https://apiemail.alendei.com/email/single


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"

This parameter specifies the email address at which you want to send the email.

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 Personailization 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 Personailization 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 Template ID of the email you want to send as the parameter value.

Email Template 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, a 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. But in case you use the parameter 'listID' to identify the recipients, the data will get substituted on the basis of the information stored in the Alendei Platforms CRM for the recipient email address.

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.




Email and Email Template ID  

Every email campaign created in Alendei Platforms is assigned an Email Campaign ID that acts as a unique identifier for the email campaign.

   

Response  

In case there is a problem with the data in the request body, or if there are no properties included in the request, we'll return a 400 and 422 response along with additional details listing the cause.

   

Response Codes and their meanings  

Response Code

Code Meaning

202

Success, This endpoint returns a 202 Accepted response on success along with the details of the sent email. (As demonstrated below in the sample response body

400

Error -  Bad Request The endpoint returns a 400 response if the API request had an incorrect syntax.

422

Error - Un-processable Entity Response The endpoint returns a 422 response if the API request had invalid data.


This example demonstrates how to send a single email.


post url: https://apiemail.AlendeiPlatforms.com/email/single

{
"recipient": {
  "to": "care@alendei.com",
  "personalizationSubstitutionTags": [
    {
      "tagName": "[name]",
      "tagValue": "Care"
    }
  ]
},
"senderFrom": {
  "email": "care@alendei.com",
  "displayName": "AlendeiPlatforms"
},
"replyTo": {
  "email": "care@AlendeiPlatforms.com",
  "displayName": "AlendeiPlatforms"
},
"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"
}

Returns a 202 Accepted response with content on success.
      

Response Body  

{
"status": "Success",
"message": "Successfully accepted.",
"data": {
    "QueueId": "d6704765-7a6e-4f03-a6fd-10b2cd651482",
    "QueuedTimestamp": 1630487627367
}
}


 

    • 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 (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 ...
    • 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 ...