Get All Template

To get the design template follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: GET

API URL: https://pulsewavemail.com/api/get-design/template

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/get-design/template',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/get-design/template"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/get-design/template',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/get-design/template' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/get-design/template")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "templates": [
            {
                "id": 1,
                "template_name": "Blank Template",
                "preview_image": "blank.png",
                "json_code": "{}",
                "html_code": "{}",
                "is_blank": 1,
                "created_at": null,
                "updated_at": "2023-11-11T08:43:54.000000Z"
            },
            ...
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

Get Dynamic Content

Dynamic content use your design template to replace dynamic value e.g. ((first_name)) follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: GET

API URL: https://pulsewavemail.com/api/get-dynamic/content

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/get-dynamic/content',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});




                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/get-dynamic/content"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/get-dynamic/content',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/get-dynamic/content' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/get-dynamic/content")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "contents": [
            "first_name",
            "last_name",
            "email",
            "alt_email",
            "country",
            "state",
            "city",
            "address_line1",
            "address_line2",
            "state_province_region",
            "postal_code",
            "full_name",
            "father_name",
            "designation",
            "age",
            "company_name",
            "birth_date",
            "join_date",
            "sender_name",
            "sender_address",
            "unsubscribe_preferences"
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

All Single Send

To get all single send list follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: GET

API URL: https://pulsewavemail.com/api/single-send/list

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Response Body

id: single send id

user_id: owner id of the specific single send

template_id: design template id

recipient_id: list of recipients who is you targeting

exclude_specific_recipient_id: list of recipients who is you want to avoid

sender_id: which sender do you want to send from

unsubscribe_group_id: if you want to avoid some of unsubscribe recipients

single_send_name: the name of your single send for easily identifier

from_sender: the email address which you want to use for sending mail

reply_to: the email address which you want to your client reply

subject: the subject of your single send mail

preheader: the preheader of your single send mail

schedule_type: the mail triggered time. if 0 then it triggered immediately and if 1 it triggered specific date and time

schedule_date: mail triggered date

schedule_time: mail triggered time

status: 3 types of status, 0 stands for initiate, 1 stands for ready to send, 2 stands for running, and 3 stands for completed

utr: unique uuid for single send

template_json: the mail template in json formate

template_html: the mail template in html formate

triggered,delivered,unique_opens,total_opens,bounces,unsubscribes the total number of statics

sent_at: when the single send triggered at

                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/single-send/list',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single-send/list"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single-send/list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/single-send/list' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single-send/list")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "singleSends": [
            {
                "id": 42,
                "user_id": 6790,
                "template_id": 2,
                "recipient_id": [
                    {
                        "id": "1",
                        "table": "contacts_"
                    }
                ],
                "exclude_specific_recipient_id": [],
                "sender_id": 3,
                "unsubscribe_group_id": 4,
                "single_send_name": "Wedding Send",
                "from_sender": "anikdey141997@gmail.com",
                "reply_to": "anikdey141997@gmail.com",
                "sender_name": null,
                "sender_address": null,
                "subject": "Congratulation for your new journey",
                "preheader": "This is your first journey",
                "schedule_type": 0,
                "schedule_date": "0000-00-00",
                "schedule_time": "00:00:00",
                "status": 3,
                "utr": "cce4b9b4-843e-11ee-b389-b42e9970e591",
                "template_json": null,
                "template_html": null,
                "triggered": 4,
                "delivered": 4,
                "unique_opens": 2,
                "total_opens": 5,
                "bounces": 0,
                "unsubscribes": 1,
                "unique_open_token": {
                    "1": "X6OZMRXVFZEUOS3",
                    "3": "8S6VAFD7E25H91K"
                },
                "sent_at": "2023-11-16 11:14:41",
                "created_at": "2023-11-16T05:12:55.000000Z",
                "updated_at": "2023-11-16T06:38:19.000000Z"
            },
            ...
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "PublicKey": [
            "The public key field is required."
        ],
        "SecretKey": [
            "The secret key field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Create Single Send

To create new contact follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: POST

API URL: https://pulsewavemail.com/api/single/send/create

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

template_id * integer

The template id is the design which you want to add. you will get template_id from Get All Template endpoint. If you want to add your custom template then send template id 1

template_json longText

This is your single send email template json code. if you want to use our build in template then make it empty. if you provide json code then make template_html empty

template_html longText

This is your single send email template html code. if you want to use our build in template then make it empty. if you provide html code then make template_json empty

sender_id* integer

The sender you want to use for mail triggered. you will get sender_id from Sender List

unsubscribe_group_id* integer

if you want to avoid some of unsubscribe recipients. you will get unsubscribe_group_id from Unsubscribe Group List endpoint

single_send_name* string

The name of the single send

subject* string

The subject line of your mail

preheader* string

The preheader line of your mail

recipient_id* array

Which recipient do you want to targeting. you can target contact and segment recipients. for contact recipients contacts_{contact_type_id} e.g. contacts_10 and for segment recipient segments_{segment_id} e.g. segments_25

exclude_specific_recipient_id array

Which recipient do you want to avoid. you can target contact and segment recipients. for contact recipients contacts_{contact_type_id} e.g. contacts_10 and for segment recipient segments_{segment_id} e.g. segments_25

schedule_type* boolean

If you want to send mail immediately then keep schedule_type 0. or if you want send mail in schedule the remain it 1

schedule_date date

If you want to schedule in mail. date format would be y-m-d

schedule_time time

If you want to schedule in mail.

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/single/send/create',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'template_id': '2',
    'sender_id': '3',
    'unsubscribe_group_id': '5',
    'single_send_name': 'Birthday Invite',
    'subject': 'welcome to birthday party',
    'preheader': 'The party held on',
    'recipient_id[0]': 'contacts_3',
    'recipient_id[1]': 'segments_1',
    'schedule_type': '0'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single/send/create"

payload={'template_id': '2',
'sender_id': '3',
'unsubscribe_group_id': '5',
'single_send_name': 'Birthday Invite',
'subject': 'welcome to birthday party',
'preheader': 'The party held on',
'recipient_id[0]': 'contacts_3',
'recipient_id[1]': 'segments_1',
'schedule_type': '0'}
files=[

]
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single/send/create',
  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('template_id' => '2','sender_id' => '3','unsubscribe_group_id' => '5','single_send_name' => 'Birthday Invite','subject' => 'welcome to birthday party',
                               'preheader' => 'The party held on','recipient_id[0]' => 'contacts_3','recipient_id[1]' => 'segments_1','schedule_type' => '0'),
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/single/send/create' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'template_id="2"' \
--form 'sender_id="3"' \
--form 'unsubscribe_group_id="5"' \
--form 'single_send_name="Birthday Invite"' \
--form 'subject="welcome to birthday party"' \
--form 'preheader="The party held on"' \
--form 'recipient_id[0]="contacts_3"' \
--form 'recipient_id[1]="segments_1"' \
--form 'schedule_type="0"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single/send/create")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = [['template_id', '2'],['sender_id', '3'],['unsubscribe_group_id', '5'],['single_send_name', 'Birthday Invite'],['subject', 'welcome to birthday party'],
            ['preheader', 'The party held on'],['recipient_id[0]', 'contacts_3'],['recipient_id[1]', 'segments_1'],['schedule_type', '0']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "utr": "89c5e886-94f3-11ee-8d33-b42e9970e591"
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "single_send_name": [
            "The single send name field is required."
        ],
        "sender_id": [
            "The sender id field is required."
        ],
        "subject": [
            "The subject field is required."
        ],
        "preheader": [
            "The preheader field is required."
        ],
        "unsubscribe_group_id": [
            "The unsubscribe group id field is required."
        ],
        "schedule_type": [
            "The schedule type field is required."
        ],
        "recipient_id": [
            "The recipient id field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Duplicate Single Send

To duplicate one single send to another follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: GET

API URL: https://pulsewavemail.com/api/single/send/duplicate?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/single/send/duplicate?utr=cce4b9b4-843e-11ee-b389-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single/send/duplicate?utr=cce4b9b4-843e-11ee-b389-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single/send/duplicate?utr=cce4b9b4-843e-11ee-b389-b42e9970e591',
  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_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/single/send/duplicate?utr=cce4b9b4-843e-11ee-b389-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single/send/duplicate?utr=cce4b9b4-843e-11ee-b389-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Duplicated Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Get Single Send Details

To get details of single send follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: GET

API URL: https://pulsewavemail.com/api/single-send/details?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Response Body

id: single send id

user_id: owner id of the specific single send

template_id: design template id

recipient_id: list of recipients who is you targeting

exclude_specific_recipient_id: list of recipients who is you want to avoid

sender_id: which sender do you want to send from

unsubscribe_group_id: if you want to avoid some of unsubscribe recipients

single_send_name: the name of your single send for easily identifier

from_sender: the email address which you want to use for sending mail

reply_to: the email address which you want to your client reply

subject: the subject of your single send mail

preheader: the preheader of your single send mail

schedule_type: the mail triggered time. if 0 then it triggered immediately and if 1 it triggered specific date and time

schedule_date: mail triggered date

schedule_time: mail triggered time

status: 3 types of status, 0 stands for initiate, 1 stands for ready to send, 2 stands for running, and 3 stands for completed

utr: unique uuid for single send

template_json: the mail template in json formate

template_html: the mail template in html formate

triggered,delivered,unique_opens,total_opens,bounces,unsubscribes the total number of statics

sent_at: when the single send triggered at

                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/single-send/details?utr=cce4b9b4-843e-11ee-b389-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single-send/details?utr=cce4b9b4-843e-11ee-b389-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single-send/details?utr=cce4b9b4-843e-11ee-b389-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/single-send/details?utr=cce4b9b4-843e-11ee-b389-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single-send/details?utr=cce4b9b4-843e-11ee-b389-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "singleSend": [
            {
                "id": 42,
                "user_id": 6790,
                "template_id": 2,
                "recipient_id": [
                    {
                        "id": "1",
                        "table": "contacts_"
                    }
                ],
                "exclude_specific_recipient_id": [],
                "sender_id": 3,
                "unsubscribe_group_id": 4,
                "single_send_name": "Wedding Send",
                "from_sender": "anikdey141997@gmail.com",
                "reply_to": "anikdey141997@gmail.com",
                "sender_name": null,
                "sender_address": null,
                "subject": "Congratulation for your new journey",
                "preheader": "This is your first journey",
                "schedule_type": 0,
                "schedule_date": "0000-00-00",
                "schedule_time": "00:00:00",
                "status": 3,
                "utr": "cce4b9b4-843e-11ee-b389-b42e9970e591",
                "template_json": null,
                "template_html": null,
                "triggered": 4,
                "delivered": 4,
                "unique_opens": 2,
                "total_opens": 5,
                "bounces": 0,
                "unsubscribes": 1,
                "unique_open_token": {
                    "1": "X6OZMRXVFZEUOS3",
                    "3": "8S6VAFD7E25H91K"
                },
                "sent_at": "2023-11-16 11:14:41",
                "created_at": "2023-11-16T05:12:55.000000Z",
                "updated_at": "2023-11-16T06:38:19.000000Z"
            }
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Update Single Send

To update single send follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: POST

API URL: https://pulsewavemail.com/api/single/send/update

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

utr * string

The single send identifier. which single send you want to update

template_id * integer

The template id is the design which you want to add. you will get template_id from Get All Template endpoint. If you want to add your custom template then send template id 1

template_json longText

This is your single send email template json code. if you want to use our build in template then make it empty

template_html longText

This is your single send email template html code. if you want to use our build in template then make it empty

sender_id* integer

The sender you want to use for mail triggered. you will get sender_id from Sender List

unsubscribe_group_id* integer

if you want to avoid some of unsubscribe recipients. you will get unsubscribe_group_id from Unsubscribe Group List endpoint

single_send_name* string

The name of the single send

subject* string

The subject line of your mail

preheader* string

The preheader line of your mail

recipient_id* array

Which recipient do you want to targeting. you can target contact and segment recipients. for contact recipients contacts_{contact_type_id} e.g. contacts_10 and for segment recipient segments_{segment_id} e.g. segments_25 /p>

exclude_specific_recipient_id array

Which recipient do you want to avoid. you can target contact and segment recipients. for contact recipients contacts_{contact_type_id} e.g. contacts_10 and for segment recipient segments_{segment_id} e.g. segments_25 /p>

schedule_type* boolean

If you want to send mail immediately then keep schedule_type 0. or if you want send mail in schedule the remain it 1

schedule_date date

If you want to schedule in mail. date format would be y-m-d

schedule_time time

If you want to schedule in mail.

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/single/send/update',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'utr': '89c5e886-94f3-11ee-8d33-b42e9970e591',
    'template_id': '2',
    'sender_id': '3',
    'unsubscribe_group_id': '5',
    'single_send_name': 'Birthday Invite',
    'subject': 'welcome to birthday party',
    'preheader': 'The party held on',
    'recipient_id[0]': 'contacts_3',
    'recipient_id[1]': 'segments_1',
    'schedule_type': '0'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single/send/update"

payload={'utr': '89c5e886-94f3-11ee-8d33-b42e9970e591',
'template_id': '2',
'sender_id': '3',
'unsubscribe_group_id': '5',
'single_send_name': 'Birthday Invite',
'subject': 'welcome to birthday party',
'preheader': 'The party held on',
'recipient_id[0]': 'contacts_3',
'recipient_id[1]': 'segments_1',
'schedule_type': '0'}
files=[

]
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single/send/update',
  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('utr' => '89c5e886-94f3-11ee-8d33-b42e9970e591','template_id' => '2','sender_id' => '3','unsubscribe_group_id' => '5','single_send_name' => 'Birthday Invite','subject' => 'welcome to birthday party',
                              'preheader' => 'The party held on','recipient_id[0]' => 'contacts_3','recipient_id[1]' => 'segments_1','schedule_type' => '0'),
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/single/send/update' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'utr="89c5e886-94f3-11ee-8d33-b42e9970e591"' \
--form 'template_id="2"' \
--form 'sender_id="3"' \
--form 'unsubscribe_group_id="5"' \
--form 'single_send_name="Birthday Invite"' \
--form 'subject="welcome to birthday party"' \
--form 'preheader="The party held on"' \
--form 'recipient_id[0]="contacts_3"' \
--form 'recipient_id[1]="segments_1"' \
--form 'schedule_type="0"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single/send/update")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = [['utr', '89c5e886-94f3-11ee-8d33-b42e9970e591'],['template_id', '2'],['sender_id', '3'],['unsubscribe_group_id', '5'],['single_send_name', 'Birthday Invite'],['subject', 'welcome to birthday party'],
            ['preheader', 'The party held on'],['recipient_id[0]', 'contacts_3'],['recipient_id[1]', 'segments_1'],['schedule_type', '0']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "utr": "89c5e886-94f3-11ee-8d33-b42e9970e591"
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "single_send_name": [
            "The single send name field is required."
        ],
        "sender_id": [
            "The sender id field is required."
        ],
        "subject": [
            "The subject field is required."
        ],
        "preheader": [
            "The preheader field is required."
        ],
        "unsubscribe_group_id": [
            "The unsubscribe group id field is required."
        ],
        "schedule_type": [
            "The schedule type field is required."
        ],
        "recipient_id": [
            "The recipient id field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Delete Single Send

To deleted single send follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: DELETE

API URL: https://pulsewavemail.com/api/single/send/delete?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'DELETE',
  'url': 'BASE_URL/single/send/delete?utr=cce4b9b4-843e-11ee-b389-b42e9970e593',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single/send/delete?utr=cce4b9b4-843e-11ee-b389-b42e9970e593"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single/send/delete?utr=cce4b9b4-843e-11ee-b389-b42e9970e593',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request DELETE 'BASE_URL/single/send/delete?utr=cce4b9b4-843e-11ee-b389-b42e9970e593' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single/send/delete?utr=cce4b9b4-843e-11ee-b389-b42e9970e593")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body

123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Bulk Delete Single Send

To multiple delete of single send follow the example code and be careful with the parameters.

Base Urlhttps://pulsewavemail.com/api/


HTTP Method: POST

API URL: https://pulsewavemail.com/api/single/send/bulk-delete

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

strIds* array

strIds must be type array.

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/single/send/bulk-delete',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    'strIds[0]': '8',
    'strIds[1]': '44'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/single/send/bulk-delete"

payload='strIds%5B0%5D=8&strIds%5B1%5D=44'
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY',
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/single/send/bulk-delete',
  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 => 'strIds%5B0%5D=8&strIds%5B1%5D=44',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY',
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/single/send/bulk-delete' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'strIds[0]=8' \
--data-urlencode 'strIds[1]=44'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/single/send/bulk-delete")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
request["Content-Type"] = "application/x-www-form-urlencoded"
request.body = "strIds%5B0%5D=8&strIds%5B1%5D=44"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314