overview your first call subscribers mailing lists list ai campaigns sender profiles send campaign analytics insight

Email Marketing API Overview

Topics covered:

Introduction

The email blaster API uses an HTTPS RESTful architecture. This means that all data is sent and received using JSON.

If you are not familiar with JSON or REST, please take the time to do your own reading before commencing development. Further information can be found below:

Introduction to JSON: json.org
Introduction to REST: wikipedia - REST

For debugging and further assistance, Postman API tester is a great way to test your calls.

API Key

Before getting started with the email blaster API, you will first need to generate your secure API key. This allows access to the API and grants you permission to make requests. All requests should contain your API key.

The API key can be generated from inside your email blaster. From the main menu, select: apps > api.

Note: If you have not installed the API app inside your email blaster. You will first need to install it. From the main menu, click on: apps > add more apps.

Headers

When sending a JSON request to the API, please ensure that the Content-Type header of your request is set to:

application/json

Each API call should also include your API key. This should also be set as a header attribute:

api_key => {your_api_key}

As a security mechanism, sending an invalid API key, or not providing an API key in your requests will result in a temporary block from using the API. A block will occur after 5+ consecutive instances.

URL

The live production API can be reached by using the following URL:

https://api.emailblaster.cloud/2.0/

SSL

For added security and data protection, all requests should be made over SSL. The email blaster API provides a signed certificate for this purpose. All of your requests should be made to https pages (not http).

Request Types

The email blaster API uses the following http methods for requests:

GET This request is used to fetch data from the API. Using a GET will not make any changes or updates to stored data. It is simply a means to fetch resources.

POST Most commonly used to create a new data item. A POST request will normally create a new record.

PATCH Used to update a record, such as new subscriber details. You only need to provide the data which you wish to update.

DELETE The quick and easy way to delete a data item or record.

(Each request to the API must include one of the valid request type methods shown above.)

cURL Examples

Requests to the API will normally be made using the cURL library. This section provides example cURL requests:

GET

curl --header "application/json" \
--header "api_key:your_api_key" \
--request GET \
https://api.emailblaster.cloud/2.0/lists/folderview

POST

curl --header "application/json" \
--header "api_key:your_api_key" \
--request POST \
--data '{"email" : "bob@example.com","list" : "242"}' \
https://api.emailblaster.cloud/2.0/subscriber/subscribe

PATCH

curl --header "application/json" \
--header "api_key:your_api_key" \
--request PATCH \
--data '{"name" : "bob folder"}' \
https://api.emailblaster.cloud/2.0/lists/folderupdate/43

DELETE

curl --header "application/json" \
--header "api_key:your_api_key" \
--request DELETE \
https://api.emailblaster.cloud/2.0/subscriber/delete/42034

Error Response

When making any API call, a {status} value will always be returned. Monitoring the status value will enable you to check for any errors made during the call.

A successful request will always return:

{"status":"ok"}

Unsuccessful requests will return a descriptive error response, such as:

{"status":"invalid email"}

API Rate Limits

The Email Blaster API limits the number of requests that you can make. This helps improve the experience for all users and prevent abuse.

Each API key can make up to 60 requests per minute.

Should you exceed this limit, you’ll receive a 429 error with the following JSON body:

{"status":"too many requests"}

For frequently accessed values that do not change often, we recommend that you cache data inside your application. This will help prevent you from bumping into API throttling.

Each API request will return headers specifically relating to rate limiting. This helps you stay on top of your remaining calls:

X-RateLimit-Limit => The number of API requests you can make per minute
X-RateLimit-Remaining => The number of remaining API requests
X-RateLimit-Retry-After => The number of seconds before you can make another request
cloud