Knowledgebase

Broadcast Schedule

Method: POST
Endpoint: /api/broadcastSchedule

Parameters

Parameter Type Required Description
name string Yes Title for schedule broadcast
type subscriber, segment Yes subscriber = scheduling on lists
segments = scheduling on segment
broadcast_ids comma seprated broadcast id(s) Yes Broadcast id(s) of broadcasts you want to schedule on
smtp_ids coma seprated smtp id(s) Yes Node id(s) of Sending Nodes you want to use to send emails
list_ids coma seprated list id(s) Yes if param type = subscriber List id(s) of Lists you want to schedule on
segment_ids coma seprated segment id(s) Yes if param type = segment Segment id(s) of segments you want to schedule on
smtp_sequence batch, loop Yes batch = a node will create connection once for a batch of contacts
loop = one node for each contact
sending_pattern random, sequential Yes random = system will use random node from selected node list for sending
sequential = system will use node in sequential order from selected node list for sending
sending_time now, later Yes now = send broadcast now
later = schedule in future
send_datetime timestap (format: Y-m-d H:i:s) Yes if param sending_time = later value must be greater than current datetime
sender_type smtp, list, custom Yes smtp = use sender information from smtp
list = use sender information from list
track_opens 0,1 (default: 0) No 0 = open tracking disabled
1 = open tracking enabled
track_clicks 0,1 (default: 0) No 0 = clicks tracking disabled
1 = clicks tracking enabled
unsub_shows 0,1 (default: 0) No Status of bounce account
0 = Inctive
1 = Active
track_duplicates 0, 1 (default: 0) No 0 = duplicate tracking diasbled
1 = duplicate tracking enabled
threads integer No number of threads for sending
unsubscribe_headers 0, 1 (default: 0) No 0 = unsubscribe headers diasbled
1 = unsubscribe headers enabled
unsubscriber_by_email 0, 1 (default: 0) No 0 = unsubscriber by email diasbled
1 = unsubscriber by email enabled
unsubscribe_email email Yes if param unsubscriber_by_email = 1 email
unsubscribe_link 0, 1 (default: 0) No 0 = unsubscribe link diasbled
1 = unsubscriber by email enabled
hourly_speed integer No rate of emails/hour
from_name string Yes if param sender_type = custom From name to use in email
from_email email Yes if param sender_type = custom From email to use in email
bounce_email email Yes if param sender_type = custom Bounce Account to use in email
reply_email email Yes if param sender_type = custom Reply email to use in email


Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result of the operation
response JSON Output of the operation
 

Example Request (CURL)

<?php
// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	'http://www.anydomain.com'; // Your Mumara Domain Name

// API Endpoint
$endpoint	=	'/api/broadcastSchedule';

$params = [
        'name'              =>      '[email protected]',
        'type'              =>      'subscriber',
        'broadcast_ids'     =>      '18',
        'smtp_ids'          =>      '26',
        'list_ids'          =>      '90',
        'smtp_sequence'     =>      'loop',
        'sending_pattern'   =>      'random',
        'sender_type'       =>      'smtp',
        'sending_time'      =>      'now',
        'response'          =>      '1'
];

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Executing cURL
$output = curl_exec ($ch);

// Printing Output
echo "<pre>";
echo json_encode(json_decode($output),JSON_PRETTY_PRINT );

// Closing cURL
curl_close ($ch);
?>

 

Example Response (JSON)

{
    "status": "success",
    "result": "Success: A broadcast has been scheduled successfully.",
    "response": {
        "campaign_type": "regular",
        "threads": 1,
        "send_datetime": "2020-10-21 13:23:45",
        "list_ids": "90",
        "from_attributes": "{\"unsubscribe_email\":null,\"unsubscribe_link\":null,\"unsubscribe_by_email\":null,\"from_name_list\":\"N\",\"from_name_smtp\":\"Y\",\"from_name\":null,\"bounce_email\":null,\"reply_email\":null,\"from_email\":null}",
        "name": "[email protected]",
        "unsub_show": 0,
        "track_opens": 0,
        "track_clicks": 0,
        "track_duplicate": 0,
        "unsubscribe_header": 0,
        "smtp_ids": "26",
        "current_smtp": 26,
        "smtp_sequence": "loop",
        "sending_pattern": "random",
        "campaign_ids": "18",
        "send_campaign": "now",
        "user_id": 2,
        "sender_option": "smtp",
        "hourly_speed": null,
        "masked_domain": null,
        "notification_email": null,
        "type": "subscriber",
        "thread_settings": 1,
        "updated_at": "2020-10-21 13:23:45",
        "created_at": "2020-10-21 13:23:45",
        "id": 193
    }
}
Status value of the success response will be "success"

 

Example Error Response (JSON)

{
    "status": "error",
    "result": {
        "name": [
            "Error: Missing required parameter, name"
        ],
        "type": [
            "Error: Missing required parameter, type"
        ],
        "broadcast_ids": [
            "Error: Missing required parameter, broadcast ids"
        ],
        "smtp_ids": [
            "Error: Missing required parameter, smtp ids"
        ],
        "smtp_sequence": [
            "Error: Missing required parameter, smtp sequence"
        ],
        "sending_pattern": [
            "Error: Missing required parameter, sending pattern"
        ],
        "sending_time": [
            "Error: Missing required parameter, sending time"
        ],
        "sender_type": [
            "Error: Missing required parameter, sender type"
        ]
    }
}

 

Possible Errors

  • Bounce address already exists.
  • Invalid hostname
  • Missing required parameters
  • Invalid methos
POST
/api/broadcastSchedule
Try it out