The Rebelmail API

At Rebelmail we have been busy building the best tools available for building, sending, and reporting on interactive email. Today we get to share with the world a portion of our efforts.

We are excited to announce the public launch of our API for building and reporting on interactive email.

Since our founding we have been at the forefront of a revolution in email, allowing brands to send and extract value from interactive email. Now integrating with Rebelmail will allow you to send interactive emails from directly within your applications. All without having to know every finicky hack and obscure rendering change. Make a simple request to the Rebelmail platform and let us handle the magic on your behalf.

What does it mean for your recipients?

For time immemorial email has been a one way channel. You'd send recipients a message, hope that they open it and that the content was enticing enough to warrant a clickthrough. Those actions were the only thing anyone could track, open rates and clickthrough, while attribution still remains a difficult task.

Rebelmail's impetus from the beginning has been to invert these traditional metrics and mindsets. We build interactive emails that allow recipients to take action immediately. Instead of clicking to see a product page with more images, browse a slideshow or answer a quiz directly inside your inbox.

Gallery Quiz

Instead of having your recipients click to a landing page to capture a full review, input a weekly update or even change their password. Allow them to provide the information immediately, inside of the email and watch as your user engagement grows.

Reviews Password Reset

See all of our interactive modules now.

In addition to these groundbreaking experiences for recipients, we provide in depth analytics on every action a recipient takes, allowing you an unprecedented insight into what your customers are actually doing inside of your emails. You can leverage all this new data to take action on the intent a user expresses in your email, even if they don't clickthrough.

How does it work?

We are an API first company, and our API is the basis for all the work we do here at Rebelmail. While our API provides access to most features within our platform, the sending endpoints are what we'll focus on here. With our simple request structure and robust error reporting it's easy to get started.

We offer two powerful endpoints to get you sending interactivity quickly. You can use us transactionally, making one call to both build and send the email (We have a growing list of ESP integrations, including our launch partner Mailjet). Check out the example Curl request below and for more information check out the documentation.

Supported ESPs, Mailjet, Sailthru, Mandrill, SendGrid, ExactTarget

cat <<'EOF' | curl -X POST \  
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
https://api.rebelmail.com/v0/emails -d @-  
{
  "email": {
    "campaignId": "58236acafe0189001c1f8164",
    "to": "friends@rebelmail.com",
    "from": "friends@rebelmail.com",
    "subject": "Example Subject",
    "context": {
      "rid": "%%emailaddr%%",
      "basics": {
        "preheader": ""
      },
      "customHeader": "<h1 style='background:#333;color:#fff;padding:1em;margin:0;'>Header</h1>",
      "customFooter": "<h2 style='background:#333;color:#fff;padding:1em;margin:0;'>Footer</h2>",
      "gallery": {
        "height": "400",
        "width": "600",
        "thumbHeight": "64",
        "thumbWidth": "64",
        "thumbBorder": "#333",
        "thumbBorderSelected": "#0096d6",
        "hasArrows": true,
        "tooltip": {
          "position": "",
          "background": "#0096d6",
          "color": "#000",
          "border": "#ffffff",
          "text": "Click thumbs for more images"
        },
        "images": [
          {
            "src": "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery1.jpg",
            "href": "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            "value": "",
            "thumbColor": "",
            "thumbImg": ""
          },
          {
            "src": "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery4.jpg",
            "href": "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            "value": "",
            "thumbColor": "",
            "thumbImg": ""
          },
          {
            "src": "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery2.jpg",
            "href": "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            "value": "",
            "thumbColor": "",
            "thumbImg": ""
          },
          {
            "src": "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery3.jpg",
            "href": "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            "value": "",
            "thumbColor": "",
            "thumbImg": ""
          }
        ],
        "fallback": {
          "type": "image",
          "href": "",
          "src": "http://dummyimage.com/600x600/ff6666/ffcccc&text=Fallback",
          "width": "600",
          "height": "600",
          "alt": "An Exclusive Gift, from us to you!"
        }
      }
    }
  }
}
EOF  

If you prefer to handle sending on your own, we have a solution for your needs too. Using the same request structure you can make a request to another endpoint on our platform and get a response containing a full interactive email as HTML. Once you have the HTML in your system you can send using your normal processes. Here is a quick code snippet and for more details check out the documentation.

const fetch = require('node-fetch');

const API_KEY = '<API_KEY>';

const body = {  
  campaign: {
    campaignId: "58236acafe0189001c1f8164",
    to: "friends@rebelmail.com",
    from: "friends@rebelmail.com",
    subject: "Example Subject",
    context: {
      rid: "%%emailaddr%%",
      basics: {
        preheader: ""
      },
      customHeader: "<h1 style='background:#333;color:#fff;padding:1em;margin:0;'>Header</h1>",
      customFooter: "<h2 style='background:#333;color:#fff;padding:1em;margin:0;'>Footer</h2>",
      gallery: {
        height: "400",
        width: "600",
        thumbHeight: "64",
        thumbWidth: "64",
        thumbBorder: "#333",
        thumbBorderSelected: "#0096d6",
        hasArrows: true,
        tooltip: {
          position: "",
          background: "#0096d6",
          color: "#000",
          border: "#ffffff",
          text: "Click thumbs for more images"
        },
        images: [
          {
            src: "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery1.jpg",
            href: "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            value: "",
            thumbColor: "",
            thumbImg: ""
          },
          {
            src: "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery4.jpg",
            href: "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            value: "",
            thumbColor: "",
            thumbImg: ""
          },
          {
            src: "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery2.jpg",
            href: "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            value: "",
            thumbColor: "",
            thumbImg: ""
          },
          {
            src: "https://s3.amazonaws.com/rebelmail-templates/hp/envy-curved/images/version5/gallery3.jpg",
            href: "http://store.hp.com/us/en/ContentView?storeId=10151&langId=-1&catalogId=10051&eSpotName=Envyaio_34c",
            value: "",
            thumbColor: "",
            thumbImg: ""
          }
        ],
        fallback: {
          type: "image",
          href: "",
          src: "http://dummyimage.com/600x600/ff6666/ffcccc&text=Fallback",
          width: "600",
          height: "600",
          alt: "An Exclusive Gift, from us to you!"
        }
      }
    }
  }
};

fetch('https://api.rebelmail.com/v0/campaigns/58236acafe0189001c1f8164/html', {  
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(body),
}).then((res) => {
  if (!res.ok) {
    return Promise.reject(res.statusText);
  }

  return res.text();
}).then((html) => {
  console.log(html);
}).catch((err) => {
  console.error(err);
});

What does it all mean?

Email is a key part of how any platform communicates with its users. We believe that there is a future where every email is immediately actionable for an end user from inside their client of choice. We want to make it as simple as possible for our customers to take full advantage of the latest changes in one of the world's oldest communication platforms.

Our early customers have been integrating with our API to give better experiences to their recipients. They are already taking advantage of these leaps in technology to increase engagement, activity and revenue.

Get in touch with us if you would like to add interactivity to your email program.