This API sends out an existing email in your Juvlon account to specific lists.
Clicks will be tracked if the “Track Links” email setting was configured to true while creating the email in your Juvlon account.
You have the option to initiate an existing automation after this API call. In order to do so, specify the automation ID and the step ID of your workflow in the sendMailerToLists() API call. The API will send the email and start a new transaction that will ensure carrying out of all the steps / actions as defined in your workflow for this email sending. The facility to enable you to create automation workflows on your own is currently being worked upon. In the meantime, please contact Juvlon Support to create an automation workflow for you, which you can immediately start using in your API calls and carry out automations.
This API needs to be called using an HTTP Post method with data in JSON format as shown below.
URL: https://api2.juvlon.com/v4/sendMailerToLists
JSON Parameters
'{"apiKey":"$apiKey", "mailerID":"$mailerID", "listID":"$listID", "scheduleTime":"$scheduleTime", "sendUnique":"$sendUnique", "customField":"$customField", "automationID":"$automationID", "stepID":"$stepID" }';
Arguments
Name | Type | Description | Default |
---|---|---|---|
apikey | String | Mandatory. The apiKey that gives you access to our HTTP APIs.The apiKey authenticates you and helps us to identify your Juvlon account. | |
mailerID | Int | Mandatory. The message ID of the already created email in your Juvlon account that you would like to send. | |
listID | String | Mandatory. Comma separated list IDs of all the existing lists in your Juvlon account that you would like to send the email to. | |
scheduleTime | String | Optional. By default the email will be sent out immediately. However, you can schedule the sending to be carried out at a later time with the help of this argument and providing the date and time in the “yyyy-MM-dd HH:mm:ss” format• yyyy: The year in your send date. Eg. “2019”.• MM: 2-digit month value. E.g “05” for May.• dd: 2-digit day of the month value. E.g. “09” for the 9th of a month.• HH: 2-digit hour component of the time that you want to specify, using the 24-hour format. E.g. “16” for 4 PM.• mm: 2-digit minutes component of the time that you want to specify.• ss: 2-digit seconds component of the time that you want to specify. | |
sendUnique | Int | Set flag 1 (default) for unique sending, 0 for duplicate sending.• Unique Sending: Sends a single email per email address (refers to the latest uploaded record for personalization data).• Duplicate Sending: Sends as many number of emails as the number of records present for a certain email address in the list.Example for Duplicate Sending: Let’s consider an email recipient with multiple policies. Thus, if you uploaded a list with different policy numbers for the same email address using the upload option “Add all email addresses / mobile numbers (includes duplicates)”, and created an email with the policy number field as personalization in the email body, then you can send out separate emails to the same email recipient for each of the different policy numbers that the recipient holds using the duplicate sending option. | |
customField | String | Customized text for your internal tracking. | |
automationID | Int | The ID of the automation workflow pre-defined in your Juvlon account which you would like to initiate with the current sending. E.g. extract all the subscriber who have opened their emails and send them another email / sms. | |
stepID | Int | The step ID in the automation workflow that should get carried out. |
Return value
Name | Type | Description | Default |
---|---|---|---|
code | String | The Success or Error response code as returned by the API. Please refer to the section “Possible-Response-Codes” for more details. | |
status | String | Description of the error code returned. | |
transactionId | String | A number generated by the API to uniquely identify the current call. Also known as the API_Call_ID. |
Usage / Example(s)
PHP Example Code for Integration
$url = 'https://api2.juvlon.com/v4/sendMailerToLists'; $data = '{"apiKey":"KEY", "mailerID":"28", "listID":"5085,5086,5087", "scheduleTime":"2020-01-25 15:30:00", "sendUnique":"1", "automationID":"2", "stepID":"1" }'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $res1 = curl_exec($ch); curl_close($ch);
Success-Response
HTTP/1.1 HTTP/1.1 { "code":200, "status":"Success", "transactionId":327 }
Error-Response
HTTP/1.1 { "code":402, "status":"Error" }
Possible-Response-Codes
200 Success: API Request Accepted 401 Error:Invalid Method 402 Error: Unauthorized/Empty Key 403 Error: Unauthorized/Invalid Key 404 Error: Account Sending Blocked 405 Error: Your Juvlon account is expired 448 Your Juvlon account is Deactivated 408 Error: HTML content not provided 413 Error: Blacklisted domain in the HTML 414 Error: Sender Domain Blacklisted 415 Error: Reply-to domain blacklisted 426 Error: Mailer ID does not exist in your Juvlon account 430 Error: Mailer ID provided is not an email 433 Error: ScheduleTime Less than currentTime 434 Error: ScheduleTime not in YYYY-MM-DD format 435 Error: List ID Empty/Non Numeric provided 436 Error: non-existing / invalid sendUnique 437 Error: List Volume count 0 438 Error: mailerID Empty/Non Numeric provided 444 Low Subscriber credit 445 Low Email credit 453 Error: Too many requests per API call 501 Error: Severe server error. Try later