Integrate and deliver Emails with Pepipost’s Email API in less than 3 minutes. 

Pepipost's flexible SMTP Relay setup and customizable integration with Email API is perfect for your transactional emails.

Integrate with support from multiple development frameworks and client libraries, including Node.js, PerlRuby, PythonPHP, Java, and C#.

Just check out the library from GIT and with a few configuration changes and you’re all set to send emails. 

C#

var client = new RestClient("https://api.pepipost.com/v2/sendEmail");
var request = new RestRequest(Method.POST);
request.AddHeader("api_key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"personalizations\":[{\"recipient\":\"user@example.com\"}],\"from\":{\"fromEmail\":\"sales@yourdomain.com\",\"fromName\":\"MyCompany\"},\"subject\":\"Test email from Pepipost\",\"content\":\"Hi, This is my first test mail\",}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Ruby

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
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["api_key"] = ''
request.body = "{\"personalizations\":[{\"recipient\":\"user@example.com\"}],\"from\":{\"fromEmail\":\"sales@yourdomain.com\",\"fromName\":\"MyCompany\"},\"subject\":\"Test email from Pepipost\",\"content\":\"Hi, This is my first test mail\",}"
response = http.request(request)
puts response.read_body
Node.js

var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.pepipost.com",
  "port": null,
  "path": "/v2/sendEmail",
  "headers": {
    "content-type": "application/json",
    "api_key": ""
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ personalizations: 
   [ { recipient: 'hi@welcom.com'} ],
  from: { fromEmail: 'xyz@yourdomain.com', fromName: 'YourCompanyName' },
  subject: 'Test email from Pepipost',
  content: 'Hi, This is my first test email',
  ));
req.end();
Python

import http.client
conn = http.client.HTTPSConnection("api.pepipost.com")
payload = "{\"personalizations\":[{\"recipient\":\"user@example.com\"}],\"from\":{\"fromEmail\":\"sales@yourdomain.com\",\"fromName\":\"MyCompany\"},\"subject\":\"Test email from Pepipost\",\"content\":\"Hi, This is my first test mail\",}"



headers = {
    'content-type': "application/json",
   'api_key': ""
   }

conn.request("POST", "/v2/sendEmail", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Java

HttpResponse response = Unirest.post("https://api.pepipost.com/v2/sendEmail")

  .header("content-type", "application/json")
  .header("api_key", "")
  .body("{\"personalizations\":[{\"recipient\":\"user@example.com\"}],\"from\":{\"fromEmail\":\"sales@yourdomain.com\",\"fromName\":\"MyCompany\"},\"subject\":\"Test email from Pepipost\",\"content\":\"Hi, This is my first test mail\",}")
  .asString();
PHP

 "https://api.pepipost.com/v2/sendEmail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"personalizations\":[{\"recipient\":\"user@example.com\"}],\"from\":{\"fromEmail\":\"sales@yourdomain.com\",\"fromName\":\"MyCompany\"},\"subject\":\"Test email from Pepipost\",\"content\":\"Hi, This is my first test mail\",}",
  CURLOPT_HTTPHEADER => array(
   "api_key: ",
   "content-type: application/json"
 ),
));

$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo "cURL Error #:" . $err;
 } else {
  echo $response;
}
CURL

curl --request POST \
  --url https://api.pepipost.com/v2/sendEmail \
  --header 'api_key: ' \
  --header 'content-type: application/json' \
  --data '{"personalizations":[{"recipient":"sampleuser@example.com"}],"from":{"fromEmail":"admin@yourdomain.com","fromName":"MyCompany"},"subject":"This is a test email","content":"Hi, this is my first test mail"}'
 
PHP
C#
Perl
Python
Ruby
Node
Java
 

What is an Email API?

Through an email API (Application Programming Interface) a user can access the various functionalities an email sending platform is offering. For example dashboard metrics, generating emails, accessing templates, etc.

Most applications use SMTP to send emails, a developer may use an Email API to gain access to programmatic features of an email platform and leverage extra capabilities that are not offered to the legacy protocols.

WATCH this video on Sending Emails via Pepipost’s Email API.
Check out the library from GIT and do few configuration changes and you’re good to go live.

Template APIs

Reduce the payload size and avoid sending the repeated set of data packets like the email template over API. We have the template APIs ready so that you can pass the template once and reuse it for life by just referring to the template ID.

Email-API-Pepipost

Tracking your emails

Rest assured, everything is tracked and kept for 90 days.
Whether you want real-time or offline access to your email activities- we have solutions for both.

email-api-tracking

Webhooks- For real-time tracking

Define the callback URL for each email event like delivered, bounced, opens, etc. Your system will get real-time feeds of your email activities. Email doesn’t have to be one-way communication.

Track responses in real-time and take action. Tracking bounces through Webhooks is a perfect use case to be implemented in your signup forms.

When someone uses the signup form and hits the submit button, you can send a confirmation email. If the bounce webhook is triggered, simply display a warning on the sign-up page to change the email address.

Stats API- For Offline tracking

If you’re looking for an API that you can call remotely and download all of your email activity logs, then Stats API is the answer.

We have an extensive repository of Stats API to meet most of your requirements.

Custom metadata

We support custom metadata which can be associated with each of your emails and can be accessed anytime during the entire lifecycle of the email.

This is a simple key-value pair where the name of the key is X-APIHEADER and value is what you pass. You can pass data like InvoiceID, TransactionID, MessageID, etc. You can easily keep track of each of the email messages and can link back the responses into your system easily.

Globally distributed Email API service

When it comes to on-time delivery, we need to ensure each of our hops are perfectly optimized to process data.  Accepting email from your application is the biggest hop in this entire process. Just because of one reason- network latency.

We have deployed our email API servers globally at multiple locations. We ensure your email sending requests are served from your nearest location to reduce network latency.

Currently, our servers are located in Delaware, NY, Frankfurt, Bengaluru, Singapore, Mumbai and there are more coming.

Pepipost Worldwide

Developer friendly API documentation

You don’t have to integrate first to test our rest API.

Our docs are simplified in a way for you to test while reading the doc. Use our built-in API Explorer to take the complete test drive of our APIs before approval.

Migration guides to switch between APIs

In case you’re looking to switch from some of the other email vendors like SendGrid, Mailgun, and Amazon SES, don’t worry we have the migration guides and API ready.

Now that you know how Pepipost helps with better email delivery, it’s time to see what actually happens behind the scenes.

Pepipost uses advanced AI algorithms to optimize email delivery. Eager to know how that helps? See how our AI-powered email delivery system works.

Ready to get started?

30,000 emails free for first 30 days.
Then 100/day forever.

Pepi thinking

Start typing and press Enter to search

Pin It on Pinterest