Welcome to our self-help documentation

Our fast, easy and intuitive self-service documentation helps you effortlessly get to your answers. If you still don’t find what you need, our 24X7 online Developer Support is always ready to help.

Suggest Edits

Introduction

 

Pepipost is a cloud-based email delivery service that delivers highly personalized transactional emails to the inbox within seconds of your customer’s transaction. Pepipost helps you focus on your business without the cost and complexity of owning and maintaining an email infrastructure. It manages all the technicalities like scaling the infrastructure, ISP outreach, reputation monitoring, whitelist services and real-time analytics. Pepipost offers world class deliverability expertise to ensure that your emails get delivered on time and into the inbox.

Pepipost provides two ways to send an email:
1) through our SMTP relay.
2) through our Web API.

This document will share the details of the APIs which will help you to send emails and manage your Pepipost account.

Suggest Edits

Prerequisites

 

In order to use our API:

You need sign up for a Pepipost account, login and get the API key.
You must have one sending domain configured and active under your account.

Suggest Edits

SMTP or API

 

The choice on whether to use SMTP or API is completely different and dependent on your needs as well as the capability of the platform you are using to send this emails.

SMTP
API

Easy to connect and can connect to any system

Flexibility in sendings

Doesn’t involve any development from your side

Greater security

Better on a larger scale

A cloud based SMTP service might be as effective as a HTTP API and yet an API could offer a bit more flexibility in the level of customizations as well as faster times and relatively low chance of failure due to verification processes.

Suggest Edits

Introduction to API

 
Suggest Edits

Getting Started { API }

 

Current API Version
Our current API v2.0 provides functionalities for email sending, templating emails, managing sender domain, credit usage check and reports.

What's next?

In API v2.1, we will be expanding our API libraries across other modules like:

1. Report API

End points
Description

/stats

This endpoint allows you to retrieve all of your global email statistics between a given date range.

/tags

This endpoint allows you to retrieve a list of all of your tags.

/tags/stats

This endpoint allows you to retrieve all of your email statistics for each of your tags.

/tags/stats/sums

This endpoint allows you to retrieve the total sum of each email statistic for every tag over the given date range.

/stats/export

Unlike the event API module which gives you data in real time buffering mode, this API will help client in giving a one time dump of the accumulated event data.

/events/logs

The event API module will help the client in fetching the logs for transactions happened under different events.

Suggest Edits

API Endpoint

 

API Endpoint

All our APIs are accessible using the below endpoint: https://api.pepipost.com/v2/

Request data is passed to the API by POSTing JSON objects to the API endpoints with appropriate parameters. The documentation for each API call will contain more details about the parameters accepted by the call. As an alternative, you can also use HTTP POST parameters, just like submitting an HTML FORM, but JSON objects are recommended.

Output Formats

We have depricated XML output formats in APIv2.0. Now, all outputs are returned in:

json

Prerequisites

In order to use our API:

You need sign up for a pepipost account, login and get the API key.
You must have one sending domain configured and active under your account.

Suggest Edits

Are The APIs RESTful?

 

Most of the the Pepipost APIs are RESTful.

Note:

All API calls should be made with HTTP POST. You can consider any non-200 HTTP response code an error - the returned data will contain more detailed information

Suggest Edits

Passing Request Data

 

Request data is passed to the API by POSTing JSON objects to the API endpoints with appropriate parameters. The documentation for each API call will contain more details about the parameters accepted by the call. As an alternative, you can also use HTTP POST parameters, just like submitting an HTML FORM, but JSON objects are recommended.

Suggest Edits

Output Formats

 

Based on the calling method, we support two output formats:

json
xml

Error Code
Error Message
Event
Module

405

Method not allowed

This error code indicates that the request method is known by the server but has been disabled for this API call. Learn More

Method_error

100

api_key is not passed in the header

API key is not passed in the header

Validation_error

101

Invalid api_key passed

Invalid API key is passed in the API call

Validation_error

102

APIs from this IP address is not allowed

APIs from this IP address is not allowed

Validation_error

110

Blank content is passed in the payload

Blank content is passed in the payload

Common_error

111

Invalid JSON format passed in the API call

Invalid JSON format passed in the API call

Common_error

113

Parameter [KEY] not passed in the API call

Parameter [KEY] not passed in the API call

Common_error

130

Invalid domain name

Invalid domain name

Domain_error

131

Domain already added

The domain which you're trying to add was already added.

Domain_error

140

Invalid email address passed

Invalid email address passed.

Suppression_error

141

Invalid email domain passed

Invalid email domain passed.

Suppression_error

150

Invalid Tempalate ID passed

Invalid Tempalate ID passed

Template_error

151

Invalid Tempalate Name

Invalid Tempalate Name

Template_error

152

Template Content is passed as blank

Template Content is passed as blank

Template_error

153

Template size should be less than 10MB

Template size should be less than 10MB

Template_error

160

Start date and end date both should be in required format (yyyy-mm-dd)

Start date and end date both should be in required format (yyyy-mm-dd)

Credit_error

161

Start date should be less than end date

Start date should be less than end date

Credit_error

112

Invalid fromEmail used in API call. Hence authentication failed

Invalid fromEmail used in API call. Hence authentication failed

SendEmail_error

114

Empty recipient list, please make sure you mention at least one recipient

Empty recipient list, please make sure you mention at least one recipient

SendEmail_error

115

Your account has expired

Your account has expired

SendEmail_error

116

Subject not specified

Subject not specified

SendEmail_error

117

Content not specified

Content not specified

SendEmail_error

118

Invalid TemplateID

Invalid TemplateID

SendEmail_error

119

Invalid AttachmentID

Invalid AttachmentID

SendEmail_error

120

Personalization should be an Array object

Personalization should be an Array object

z

Suggest Edits

Send Email API

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.pepipost.com/v2/sendEmail
curl --request POST \
  --url https://api.pepipost.com/v2/sendEmail
var request = require("request");

var options = { method: 'POST', url: 'https://api.pepipost.com/v2/sendEmail' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.pepipost.com/v2/sendEmail")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.pepipost.com/v2/sendEmail");

xhr.send(data);
import requests

url = "https://api.pepipost.com/v2/sendEmail"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

from
object
 
from.fromEmail
string
required

sender identification

from.fromName
string

Headers

api_key
string
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

$.get('http://yoursite.com/test/' + id, function(data) {
    console.log(data);
});