Overview

You can use this request to send an email to your subscribers.

The Method

API-Method
RESTPOSThttps://[Your URL] /api/2.0/email_actions/send/:id

Parameters

PropertyTypeDescriptionRequired
$idintegerThe ID of the email.yes

Example Request

<?php
$username = 'administrator';
$apiKey = '7IjRKva9OzwCsy9xaCwsihA6HxUTwE7a_999';
$localUrl = 'https://localhost';

$messageId = 34;
$url = $localUrl . '/api/2.0/email_actions/send/' . $messageId;
$method = 'POST';
$auth = base64_encode($username . ':' . $apiKey);

$cSession = curl_init();

curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_POSTFIELDS, '{}');
curl_setopt($cSession, CURLOPT_HTTPHEADER, [
    'Authorization: Basic ' . $auth,
    'Content-Type: application/json'
]);

$response = curl_exec($cSession);
var_dump($response);

curl_close($cSession);

Example Response

{
   "links":[
      {
         "title":"Self",
         "rel":"self",
         "href":"http:\/\/localhost\/api\/2.0\/email_actions\/send\/34"
      
},
      {
         "title":"Home",
         "rel":"home",
         "href":"http:\/\/localhost\/api\/2.0\/"
      
}
   
],
   "item":{
      "id":34,
      "hash":"UkNKbjGke1IJ4e3N",
      "campaign_id":0,
      "recreated_from_message_id":0,
      "type":"email",
      "campaign_name":"",
      "subject":"asd",
      "from_email":"[email protected]",
      "from_name":"",
      "reply_email":"[email protected]",
      "preheader_text":"asd",
      "html_original":"<html>...Your Email HTML Here...</html>",
      "text_original":"",
      "is_html_fetch_from_url":"no",
      "html_fetch_url":"",
      "html_fetch_when":"now",
      "is_text_fetch_from_url":"no",
      "text_fetch_url":"",
      "text_fetch_when":"now",
      "is_copy_text_auto":"yes",
      "remove_duplicates":"no",
      "attachments":"",
      "has_dynamic_attachments":"no",
      "thumbnail":"default.png",
      "list_ids":"4",
      "filter_id":0,
      "import_id":0,
      "message_workflow_id":0,
      "template_id":0,
      "create_date":1588154572,
      "is_scheduled":"no",
      "send_scheduled_date":0,
      "scheduled_recurrence":"once",
      "scheduled_previous_message_id":0,
      "preparation_date":0,
      "preparation_count":0,
      "send_date":0,
      "approval_required":"no",
      "approval_request_date":0,
      "approval_name":"",
      "approval_email":"",
      "approved_date":0,
      "inline_css":"no",
      "embed_images":"no",
      "track_links":"yes",
      "track_reads":"yes",
      "track_attachments":"no",
      "unsubscribe_type":"standard",
      "insert_unsubscribe_link":"yes",
      "include_analytics":"no",
      "include_custom_analytics":"no",
      "analytics_custom_tag":"",
      "analytics_tag":"",
      "analytics_medium_tag":"email",
      "total_sent":0,
      "total_actual_sent":0,
      "total_failed":0,
      "total_actual_failed":0,
      "total_to_be_queued":1,
      "total_queued":0,
      "total_in_queue":0,
      "total_link_clicks":0,
      "total_link_clicks_unique":0,
      "total_link_clicks_anonymous":0,
      "total_reads":0,
      "total_reads_inferred":0,
      "total_reads_unique":0,
      "total_reads_anonymous":0,
      "message_total_reads_unique_desktop":0,
      "message_total_reads_desktop":0,
      "message_total_reads_unique_web":0,
      "message_total_reads_web":0,
      "message_total_reads_unique_mobile":0,
      "message_total_reads_mobile":0,
      "message_total_reads_unique_unknown":0,
      "message_total_reads_unknown":0,
      "total_unsubscribes":0,
      "total_bounces":0,
      "total_bounces_hard":0,
      "total_bounces_soft":0,
      "total_bounces_policy":0,
      "total_bounces_blacklist":0,
      "total_complaints":0,
      "total_complaints_real":0,
      "total_complaints_fbl":0,
      "total_forwards":0,
      "total_autoresponders":0,
      "total_unique_ attachments":0,
      "total_attachments":0,
      "total_bounces_unidentified":0,
      "send_share_report":"no",
      "share_report_recipients":"",
      "share_report_delay_days":0,
      "share_report_allow_export":"no",
      "status":"prepare",
      "priority":"medium",
      "character_set":"utf-8",
      "encoding":"8bit"
   
}
}