Send Single-Recipient Email

POST/api/v2/email/send

Base URL https://api.easify.liveBearer token and Accept header required Authentication →

This endpoint is used to send email from easify.

There is a rate limit of 15 requests per minute per API token. This count is shared by all API endpoints, including GET requests, except those with their own separate limit (/api/v2/sms/send, /api/v3/sms/send, etc.), so this endpoint is refused once your token has made 15 requests to the shared endpoints within a minute. If you exceed this limit, you will receive a 429 Too Many Requests status, along with a message indicating when you can try again.

The authenticated user must have access to the Email feature. Requests made without the proper feature permissions will receive a 490 status code response, indicating that a plan upgrade is required.

Request Body

sender string Sender’s Email Address (can be obtained from the email-senders API response) Required
receiver string Receiver's Email Address Required
subject string subject for Email Required
message string Email message body Required without Attachment
attachment string | file Email Attachment Required without Message
enable_unsubscribe integer To enable the unsubscribe URL in the email content (Set value as 1 for enable, Default 0) Optional
schedule_time string Timestamp for Schedule Email (The format should be YYYY-mm-dd H:i:s) Optional
schedule_timezone string Specify the Timezone for the Scheduled Email (Default: User’s Timezone) e.g., America/New_York Optional
additional_data json Additional data to send with the email, which will be returned in the email status event webhook Optional
from_name string The user can set the from_name for the email. By default, the selected sender's from_name will be used Optional

Example Request and Response

Request

{
  "sender": "appointments@example.com",
  "receiver": "alex@example.com",
  "subject": "Your appointment is confirmed",
  "message": "

Hi Alex,

Your appointment with ABC Company is confirmed for Tuesday, November 18 at 10:00 AM.

ABC Company, 123 Main Street, Springfield, IL 62701

",
"from_name": "ABC Company", "enable_unsubscribe": 1, "additional_data": { "name": "Alex", "id": "232" } }

Success Response:

{
  "status": true,
  "message": "Email processed successfully",
  "data": {
    "email_id": "6746c18a3b67fc3da50e****"
  }
}

Responses

Case Status Code Response
If the user does not provide a token in the header or provides an invalid token 401 { "status":false, "message":"Unauthenticated", "errors":[] }
If user provided invalid sender email address 400 { "status": false, "message": "Invalid Sender!", "errors": [] }
If the user provided email address is invalid because it is registered in theZeroBounce registry 400 { "status": false,' "message": "Invalid email address.", "errors": [] }
If the user does not have enough credits to send the email 400 { "status": false, "message": "Sorry, you do not have enough credits to send this email. Please recharge for more.", "errors": [] }
If the receiver's email address is in the unsubscribed list 422 { "message": "The receiver field must be a valid email address.", "errors": { "receiver": [ "The receiver field must be a valid email address." ] } }
If the user exceeds the allowed rate limit for requests 429 { "status":false, "message":"Too many requests. Try again in 59 seconds", "errors":[] }
If the user's subscription has ended 402 { "status":false,"message":"You need to recharge your account to proceed","errors":[] }
When the user account is inactive 403 { "status": false, "message": "Your account is currently inactive.", "errors": [] }
If the request comes from an IP address or domain that is not on the account's API whitelist 400 { "status": false, "message": "Access denied! Your IP or domain is not whitelisted.[ HostName : ] - [ Ip Address : << YOUR_SERVER_IP >>]", "errors": [] }

Code Examples

Send an email
php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.easify.live/api/v2/email/send',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => json_encode([
    'sender' => 'appointments@example.com',
    'receiver' => 'alex@example.com',
    'subject' => 'Your appointment is confirmed',
    'message' => '

Hi Alex,

Your appointment with ABC Company is confirmed for Tuesday, November 18 at 10:00 AM.

ABC Company, 123 Main Street, Springfield, IL 62701

',
'from_name' => 'ABC Company', 'enable_unsubscribe' => 1, 'additional_data' => [ 'name' => 'Alex', 'id' => '232', ], ]), CURLOPT_HTTPHEADER => [ 'Authorization: Bearer <>', 'Content-Type: application/json', 'Accept: application/json', ], ]); $response = curl_exec($curl); curl_close($curl); echo $response;