Useful Apps for Digital Marketing

How to Integrate SendPulse with Your Platform Using API

how to integrate api what is api

API allows services and applications to exchange data in a fast and precise manner, which draws attention of not only web developers but also specialists without a strong technical background. Marketers appreciate API’s ability to find the most effective combination of platforms without worrying that the formats of different systems may be incompatible.

In this article, we will explain how to use SendPulse email service API. You will also get our step-by-step guide on creating an email campaign and getting statistics on it.

What is an API

API stands for Application Programming Interface. It is an interface where applications interact in the process of completing a certain common task.

API was designed to enable the exchange of data between applications and services. This is why it doesn’t have a common interface with various icons and buttons — unlike interfaces designed for users of applications. API is represented by a set of ready-made classes, functions, procedures, structures, and constants.

In fact, you use it daily: transferring information from one app to another or setting up tasks on the automated pairing of systems. For instance, API is used when online services offer you to log in with your social media account instead of requiring registration.

How API helps marketers

Marketers need to be flexible while getting the necessary information. As a rule, they gather data from multiple channels, which hardly ever suggest a common interface. When information is transferred from one system to another via API, such interfaces don’t really matter. What matters is that both systems recognize common parameters of requests and replies. This way, data transfers quickly, which is essential for tasks that require speed and precision.

To get an idea of how an API can be useful for a marketer, they should find out what data is available via that API and how to get it. Ask a web developer to check the API you are interested in and discuss possible options for integration.

What you can do with SendPulse API

Use SendPulse API for operations with mailing lists, senders, email campaigns and templates, as well as blacklists. Check your account balance and get information on the campaigns.

You may find the complete SendPulse API documentation on our website. It contains requirements for developers who create integrations.

How to use SendPulse services via API

We used an API testing tool called Postman to illustrate workflow examples. This application is available for Mac, Windows and Linux, and it doesn’t require knowledge of any programming language. The app operates in launch, testing, documentation, and tracking modes. Feel free to use any similar application for your purposes.

Let’s have a look at an example which shows how to create an email campaign via API and how to get its statistics.

1. Authorize in the service

Get the personal access token applying the method from SendPulse documentation. Use API ID and API Secret values indicated in your SendPulse account settings.

api id and secret
API ID and API Secret values displayed in SendPulse account settings

Send an API request with these values to obtain the access token. The service will send you back the token and indicate its type.

access token
Response from SendPulse with the access token and its type

You will need this token to sign each API request. Note that the token is only valid for one hour and after expiry, it requires renewal — you should repeat Step 1 for that. Besides, for security reasons, users can update API ID and API Secret values in SendPulse account settings. Once you have done that, generate a new access token.

2. Create an address book

creating address book
Creating an address book in SendPulse via API

3. Get the address book ID

Use the API method to obtain detailed information on email addresses from the book. We recommend that you save the ID value to be able to identify address books in further operations.

address book id
Address books’ IDs in reply of SendPulse email service API

4. Upload email addresses into the address book

When email addresses are added to the address book, the corresponding variables are transferred as well — in this case, it is the {{Name}} variable with {{Elvira}} value.

adding email address
Adding email addresses to a mailing list via API

5. Upload email template

If you already have a template, upload it into the service using the method provided in SendPulse documentation.

adding email template
Uploading a template into SendPulse via API

Before creating a campaign, define the ID of the template you have uploaded. Once you get a list of all templates, identify the one you need by the name.

email template id
ID of the uploaded email template

If you don’t have a template yet, build one in SendPulse drag and drop editor.

6. Create a campaign to be sent to the whole address book

Replace the “body” parameter with “template_id” parameter using the ID value you got on the previous step.

email template id value
Value of “Template_id” parameter in SendPulse API

7. Retrieve information on the campaign

It is important for marketers to know the information on the status of the sent campaign, and SendPulse API allows getting it. As illustrated below, one can see the following data: the sender name and address, the email subject and content, the number of emails in the campaign, its status, and the sending date.

email statistics
Information on the sent campaign received via SendPulse email service API

Through various API methods, we have created an email campaign based on a custom template, and retrieved information on it.

Detailed statistics on email campaigns are available directly in your SendPulse account.

8. Check how the email displays in the recipient’s mailbox

As you see on the illustration below, subscriber’s name appeared in the header: the variable {{Name}} was transferred into the header when we added recipients to the address book.

email template
Variable’s value transferred into a header when the contact was added to the address book via SendPulse API

9. Option to send an automated series of emails

After adding a template (Step 5), you can send a series of automations. For instance, a date could be selected as a starting condition of the series. Let’s say, we pick the first order anniversary as the date and an email with a special offer as the first element of the automated series.

After this email has been sent on the specified date, there is an option to send a webhook. This way a special variable will be automatically added for the subscriber on the mailing list, depending on their actions with the email — they may open it, unsubscribe, or mark it as spam.

email flow in automation 360
Sample SendPulse Automation 360 series flow

This way, you can set the transfer of data on your subscribers’ actions with the email and forward it to your system. These results can be used in your further work with the customers.

What’s in the outcome

API simplifies complex cooperation between systems. A user doesn’t have to process a large volume of data for each system because API lets the systems cooperate, facilitating the marketer’s job. Show this article to a web developer and just start integrating SendPulse with your project via API.

How to Integrate SendPulse with Your Platform Using API
5 (100%) 2 votes

SendPulse is an email service with additional channels: web push notifications, SMS and Viber

Up to 15,000 emails for free every month. Web push notifications are completely free.

Sign up for a free accountHow does it work

Send me new articles by email