POST / email/send

Base URL: https://backend.easify.app/api/v2


This endpoint is used to send email from easify.

There is a rate limit of 15 requests per 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.

Authentication

The Easify API token used for authentication is passed in the header as a Bearer token, which can be obtained from the easify app under Settings > API Settings.

Headers

Authorization string required Bearer << YOUR_EASIFY_API_TOKEN_HERE >>

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

Sample Params and Success Response:

Request

{
  "sender": "sender@easify.app",
  "receiver": "receiver@easify.app",
  "subject": "Test Subject",
  "message": "Message",
  "from_name": "easify",
  "additional_data": { "name": "John", "id": "232" }
}

Success Response:

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

Api Response Status

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 does not have an enterprise plan 403 { "status": false, "message": "Access denied. Your current plan does not allow access to this feature. Please upgrade to the Enterprise plan.", "errors": [] }
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":[] }

PHP-cURL

php
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://backend.easify.app/api/v2/email/send',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array(
        'sender' => 'qa@easify.app',
        'receiver' => 'easify@easify.com',
        'subject' => 'Test',
        'message' => 'Hai'
    ),
    CURLOPT_HTTPHEADER => array(
        'Authorization: Bearer 1955|43da5bb5-5c2b-4059-a4de-d44bf****'
    ),
));

$response = curl_exec($curl);
curl_close($curl);

echo $response;

pixel for linkedin