Suggest Edits

/users/:id

Retrieve user information for settings page

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/users/id
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/users/5829e0ed7a14460015a76d88
A binary file was returned
{
  "user": {
    "token": "<API_TOKEN>",
    "email": "example@rebelmail.com",
    "lastLogin": "2016-11-14T18:55:08.808Z",
    "isAdmin": false,
    "id": "5829e0ed7a14460015a76d88"
  }
}

Path Params

id
string
required

User id

 
Suggest Edits

/users/:id

Update user email

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.rebelmail.com/v0/users/id
curl -X PUT -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' 
https://api.rebelmail.com/v0/users/5829e0ed7a14460015a76d88 -d '{ "user" : { "email" : "newEmail@rebelmail.com" }}'
A binary file was returned
{
  "user": {
    "token": "<API_TOKEN>",
    "email": "newEmail@rebelmail.com",
    "lastLogin": "2016-11-14T18:55:08.808Z",
    "isAdmin": false,
    "id": "5829e0ed7a14460015a76d88"
  }
}

Path Params

id
string
required

The user id

Body Params

user
object
 
user.email
string

User email

user.id
string

The User id

user.token
string

The User's API token

user.lastLogin
string

The date and time of the User's last login

 
Suggest Edits

/users/login

User login

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.rebelmail.com/v0/users/login
curl -X POST -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' 
https://api.rebelmail.com/api/v0/users/login 
-d '{"email": "test@rebelmail.com", "password": "password"}'
A binary file was returned
{
  	"id": "5820f3badbfb870014a0dc8c",
    "token": "<API_TOKEN>",
    "email": "test@rebelmail.com",
    "lastLogin": "2016-11-07T22:30:40.224Z",
    "isAdmin": false   
}
{
  "name": "UnauthorizedError",
  "errors": {
    "password": [
      "incorrect for email provided"
    ]
  }
}

Body Params

email
string
required

Login email

password
string
required

Login Password

 
Suggest Edits

/accounts

List accounts

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/accounts
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/accounts
A binary file was returned
{
  "accounts": [{
    "id": "57c898cb0f4e024e3470db48",
    "provider": "smtp",
    "providerOptions": {
      "smtp": {
        "host": "smtp.example.com",
        "port": 587,
        "auth": {
          "user": "user",
          "pass": "password"
        }
      }
    },
    "integrations": {
      "googleAnalytics": {
        "active": true,
        "source": "Rebelmail"
      },
      "shopify": {
        "active": true,
        "token": "token",
        "shop": "rebelmail-development"
      },
      "salesforce": {
        "active": true,
        "stack": "s1",
        "auth": {
          "clientId": "id",
          "clientSecret": "secret"
        }
      }
    },
    "brandSettings": {
      "url": "http://rebelmail.com",
      "basics": {
        "backgroundColor": "#808080",
        "contentColor": "#ffffff",
        "contentBorder": {
          "color": "",
          "width": ""
        }
      },
      "text": {
        "header": {
          "family": "Arial, Helvetica, sans-serif",
          "size": "23px",
          "color": "#3e3e3e",
          "webUrl": "",
          "webFamily": ""
        },
        "subheader": {
          "family": "Arial, Helvetica, sans-serif",
          "size": "18px",
          "color": ""
        },
        "body": {
          "family": "Arial, Helvetica, sans-serif",
          "size": "14px",
          "color": "#111111",
          "webUrl": "",
          "webFamily": ""
        }
      },
      "ctas": {
        "primary": {
          "backgroundColor": "#f69513",
          "font": {
            "family": "Arial, Helvetica, sans-serif",
            "size": "18px",
            "color": "#ffffff"
          },
          "border": {
            "width": "",
            "color": ""
          },
          "cornerRadius": ""
        },
        "secondary": {
          "backgroundColor": "",
          "font": {
            "family": "",
            "size": "",
            "color": ""
          },
          "border": {
            "width": "",
            "color": ""
          },
          "cornerRadius": ""
        }
      },
      "forms": {
        "shared": {
          "label": {
            "fontFamily": "",
            "fontSize": "",
            "fontColor": ""
          },
          "input": {
            "border": {
              "color": "",
              "size": "",
              "radius": ""
            },
            "backgroundColor": ""
          },
          "select": {
            "border": {
              "color": "#111111"
            }
          }
        },
        "specificInputs": {
          "ratingsComponent": {
            "starColor": "",
            "starSelectedColor": ""
          }
        }
      }
    },
    "ownerIds": [
      "1",
      "2",
      "3",
      "4",
      "5",
      "6",
      "7"
    ],
    "templates": [
      "1",
      "2",
      "3",
      "4",
      "5",
      "6",
      "7",
      "8",
      "9",
      "10"
    ],
    "campaigns": [
      "1",
      "2",
      "3",
      "4",
      "5"
    ],
    "name": "Rebelmail",
    "billingReports": [
      "1",
      "2"
    ]
  }],
  "meta": {
    "page": 1,
    "perPage": 10,
    "totalPages": 1
  }
}

Query Params

page
string
perPage
string
 
Suggest Edits

/accounts/:id

Fetch an account

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/accounts/id
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/accounts/57c898cb0f4e024e3470db48
A binary file was returned
{
  "account": {
		"id": "57c898cb0f4e024e3470db48",
    "name": "Account",
    "providerOptions": {
      "salesforce": {
        "auth": {},
        "soapEndpoint": "https://webservice.exacttarget.com/Service.asmx"
      },
      "sailthru": {
        "auth": {}
      },
      "mandrill": {
        "auth": {}
      },
      "smtp": {
        "auth": {}
      }
    },
    "brandSettings": {
      "forms": {
        "specificInputs": {
          "ratingsComponent": {}
        },
        "shared": {
          "select": {
            "border": {}
          },
          "input": {
            "border": {}
          },
          "label": {}
        }
      },
      "ctas": {
        "secondary": {
          "border": {},
          "font": {}
        },
        "primary": {
          "border": {},
          "font": {}
        }
      },
      "text": {
        "body": {},
        "subheader": {},
        "header": {}
      },
      "basics": {
        "contentBorder": {}
      }
    },
    "integrations": {
      "salesforce": {
        "auth": {},
        "active": false,
        "soapEndpoint": "https://webservice.exacttarget.com/Service.asmx"
      },
      "shopify": {
        "active": false
      },
      "segment": {
        "active": false
      },
      "googleAnalytics": {
        "medium": "email",
        "source": "Rebelmail",
        "active": false
      }
    },
    "lastModified": "2016-11-10T20:12:20.271Z",
    "planVolume": 0,
    "ownerIds": [
      "5824be1982ccb6002fd33de5"
    ],
    "templates": [
      "5824c4ddd254290e6a21ae57",
      "5824d2b7c13cb203d9b04889"
    ],
    "campaigns": [
      "5824d2dc93058f00145d570e"
    ],
    "reports": [
      "5824d2dc93058f00145d570e"
    ]
  }
}

Path Params

id
string
required

The account id

 
Suggest Edits

/accounts/:id

Update name on an individual account

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.rebelmail.com/v0/account/id
curl -X PUT -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' https://api.rebelmail.com/api/v0/accounts/57c898cb0f4e024e3470db48 -d '{"account" : {"name": "Test 3"}}'
A binary file was returned
{
  "id": "57c898cb0f4e024e3470db48",
  "name": "Test 3",
  "providerOptions": {
    "salesforce": {
      "auth": {},
      "soapEndpoint": "https://webservice.exacttarget.com/Service.asmx"
    },
    "sailthru": {
      "auth": {}
    },
    "mandrill": {
      "auth": {}
    },
    "smtp": {
      "auth": {}
    }
  },
  "brandSettings": {
    "forms": {
      "specificInputs": {
        "ratingsComponent": {}
      },
      "shared": {
        "select": {
          "border": {}
        },
        "input": {
          "border": {}
        },
        "label": {}
      },
      "ctas": {
        "secondary": {
          "border": {},
          "font": {}
        },
        "primary": {
          "border": {},
          "font": {}
        }
      },
      "text": {
        "body": {},
        "subheader": {},
        "header": {}
      },
      "basics": {
        "contentBorder": {}
      }
    },
    "integrations": {
      "salesforce": {
        "auth": {},
        "active": false,
        "soapEndpoint": "https://webservice.exacttarget.com/Service.asmx"
      },
      "shopify": {
        "active": false
      },
      "segment": {
        "active": false
      },
      "googleAnalytics": {
        "medium": "email",
        "source": "Rebelmail",
        "active": false
      }
    },
    "planVolume": 5,
    "ownerIds": [
      "581a472e28ad60647e33be4b"
    ]
  }
}

Path Params

id
string
required

Account id to update

Body Params

account
object
 
account.name
string

Updated account name

 
Suggest Edits

/accounts/:id

Delete an account

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.rebelmail.com/v0/accounts/id
curl -X DELETE -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/accounts/57c898cb0f4e024e3470db48
A binary file was returned
Try the API to see results

Path Params

id
string
required

Account id to delete

 
Suggest Edits

/templates

Gets an array of all available modules

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/templates
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/templates
A binary file was returned
{
  "templates": [
    {
      "id": "57c898cb0f4e024e3470db48",
      "name": "rebelmail-templates/generic/suggestive-quiz",
      "type": "marketing",
      "title": "Generic - Quiz",
      "context": {
        "context": {
          "brandSettings": {
            "poweredby": true,
            "url": "",
            "basics": {
              "backgroundColor": "#dddddd",
              "contentColor": "#eeeeee",
              "contentBorder": {
                "color": "",
                "width": ""
              }
            },
            "text": {
              "header": {
                "family": "Arial, Helvetica, sans-serif",
                "size": "32",
                "color": "#ffffff",
                "webUrl": "",
                "webFamily": ""
              },
              "subheader": {
                "family": "Arial, Helvetica, sans-serif",
                "size": "18",
                "color": ""
              },
              "body": {
                "family": "Arial, Helvetica, sans-serif",
                "size": "14",
                "color": "#333333",
                "webUrl": "",
                "webFamily": ""
              }
            },
            "ctas": {
              "primary": {
                "backgroundColor": "#ffffff",
                "font": {
                  "family": "",
                  "size": "",
                  "color": "#999999"
                },
                "border": {
                  "width": "2",
                  "color": "#000000"
                },
                "cornerRadius": "10"
              },
              "secondary": {
                "backgroundColor": "#999999",
                "font": {
                  "family": "",
                  "size": "",
                  "color": "#ffffff"
                },
                "border": {
                  "width": "2",
                  "color": "#000000"
                },
                "cornerRadius": "10"
              }
            },
            "forms": {
              "shared": {
                "label": {
                  "fontFamily": "",
                  "fontSize": "",
                  "fontColor": ""
                },
                "input": {
                  "border": {
                    "color": "",
                    "size": "",
                    "radius": ""
                  },
                  "backgroundColor": ""
                },
                "select": {
                  "border": {
                    "color": ""
                  }
                }
              },
              "specificInputs": {
                "ratingsComponent": {
                  "starColor": "",
                  "starSelectedColor": ""
                }
              }
            }
          },
          "rid": "%%NYC-QUIZ-TEST-ID%%",
          "customHeader": "<h1 style='background:#333;color:#fff;padding:1em;'>Header</h1>",
          "customFooter": "<h2 style='background:#333;color:#fff;padding:1em;'>Footer</h2>",
          "customCSS": "",
          "quiz": {
            "url": "http://www.this-is-where-the-answers-form-the-rediect/com",
            "name": "all time favorites",
            "type": "generic",
            "manual": true,
            "autoAdvanceDelay": "1",
            "showAnswer": false,
            "errorMessage": "please make a selection first!",
            "quizInstruction": "",
            "quizExitButtonCopy": "Optional Button",
            "quizExitButtonUrl": "http://www.rebelmail.com",
            "btn": {
              "next": "Next question",
              "last": "Finish",
              "borderRadius": ""
            },
            "nextButtonBgColor": "",
            "nextButtonFontColor": "",
            "nextButtonBorderColor": "",
            "genericButtonBgColor": "",
            "genericButtonFontColor": "",
            "genericButtonBorderColor": "",
            "exitButtonBgColor": "",
            "exitButtonFontColor": "",
            "exitButtonBorderColor": "",
            "text": {
              "font": "Arial, Helvetica, sans-serif",
              "size": "22",
              "color": "#494949"
            },
            "colors": {
              "background": "#ffffff",
              "selected": "#90d491",
              "correct": "#90d491",
              "incorrect": "#de6d6d",
              "error": "#de6d6d"
            },
            "border": {
              "width": "",
              "color": "#484848",
              "type": "solid"
            },
            "questionLast": {
              "href": "http://www.gerneric-quiz-link.com",
              "headline": "Great choices!",
              "subHeadline": "We have the perfect idea for you.",
              "cta": "Find out what is!",
              "img": {
                "src": "https://unsplash.it/640/450",
                "position": "center"
              }
            },
            "question": [
              {
                "title": "Main title question headline for first",
                "subTitle": "Optional subtitle for clarification for first slide",
                "canBeCorrect": true,
                "message": "is a great choice!",
                "genericCopy": "Generic Button",
                "genericLink": "http://www.rebelmail.com/",
                "img": {
                  "src": "http://img.dummy-image-generator.com/abstract/dummy-600x300-Map.jpg",
                  "position": "top"
                },
                "options": [
                  {
                    "choice": "Answer #1 (correct)",
                    "correct": true,
                    "value": "answer 1"
                  },
                  {
                    "choice": "Answer #2",
                    "correct": false,
                    "value": "answer 2"
                  },
                  {
                    "choice": "Answer #3",
                    "correct": false,
                    "value": "answer 3"
                  }
                ]
              },
              {
                "title": "Main title question headline for second",
                "subTitle": "Optional subtitle for clarification for second slide",
                "canBeCorrect": true,
                "message": "is a great choice!",
                "genericCopy": "Generic Button",
                "genericLink": "http://www.rebelmail.com/",
                "img": {
                  "src": "http://img.dummy-image-generator.com/abstract/dummy-600x300-Map.jpg",
                  "position": "top"
                },
                "options": [
                  {
                    "choice": "Answer #1",
                    "correct": false,
                    "value": "answer 1"
                  },
                  {
                    "choice": "Answer #2",
                    "correct": false,
                    "value": "answer 2"
                  },
                  {
                    "choice": "Answer #3 (correct)",
                    "correct": true,
                    "value": "answer 3"
                  }
                ]
              },
              {
                "title": "Main title question headline for third",
                "subTitle": "Optional subtitle for clarification for third slide",
                "canBeCorrect": true,
                "message": "is a great choice!",
                "genericCopy": "Generic Button",
                "genericLink": "http://www.rebelmail.com/",
                "img": {
                  "src": "http://img.dummy-image-generator.com/abstract/dummy-600x300-Map.jpg",
                  "position": "top"
                },
                "options": [
                  {
                    "choice": "Answer #1",
                    "correct": false,
                    "value": "answer 1"
                  },
                  {
                    "choice": "Answer #2 (correct)",
                    "correct": true,
                    "value": "answer 2"
                  },
                  {
                    "choice": "Answer #3",
                    "correct": false,
                    "value": "answer 3"
                  }
                ]
              }
            ],
            "fallback": {
              "type": "image",
              "src": "http://dummyimage.com/600x600/4682b4/fff.png&text=QUIZ",
              "width": "600",
              "height": "600",
              "href": "http://www.rebelmail.com",
              "alt": "Quiz Fallback"
            }
          }
        }
      },
      "pushSchema": {
        "required": [
          "context"
        ],
        "properties": {
          "context": {
            "required": [
              "rid",
              "customHeader",
              "customFooter",
              "quiz"
            ],
            "properties": {
              "quiz": {
                "required": [
                  "url",
                  "name",
                  "type",
                  "manual",
                  "autoAdvanceDelay",
                  "showAnswer",
                  "errorMessage",
                  "quizInstruction",
                  "quizExitButtonCopy",
                  "btn",
                  "nextButtonBgColor",
                  "nextButtonFontColor",
                  "nextButtonBorderColor",
                  "genericButtonBgColor",
                  "genericButtonFontColor",
                  "genericButtonBorderColor",
                  "exitButtonBgColor",
                  "exitButtonFontColor",
                  "exitButtonBorderColor",
                  "text",
                  "colors",
                  "border",
                  "questionLast",
                  "question",
                  "fallback"
                ],
                "properties": {
                  "fallback": {
                    "required": [
                      "type",
                      "src",
                      "width",
                      "height"
                    ],
                    "properties": {
                      "alt": {
                        "type": "string"
                      },
                      "height": {
                        "type": "string"
                      },
                      "width": {
                        "type": "string"
                      },
                      "src": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "question": {
                    "items": {
                      "required": [
                        "title",
                        "canBeCorrect",
                        "message",
                        "genericLink",
                        "img",
                        "options"
                      ],
                      "properties": {
                        "options": {
                          "items": {
                            "required": [
                              "choice",
                              "correct",
                              "value"
                            ],
                            "properties": {
                              "value": {
                                "type": "string"
                              },
                              "correct": {
                                "type": "boolean"
                              },
                              "choice": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "img": {
                          "required": [
                            "src",
                            "position"
                          ],
                          "properties": {
                            "position": {
                              "type": "string"
                            },
                            "src": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "genericLink": {
                          "type": "string"
                        },
                        "genericCopy": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "canBeCorrect": {
                          "type": "boolean"
                        },
                        "title": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "questionLast": {
                    "required": [
                      "href",
                      "headline",
                      "subHeadline",
                      "cta",
                      "img"
                    ],
                    "properties": {
                      "img": {
                        "required": [
                          "src",
                          "position"
                        ],
                        "properties": {
                          "position": {
                            "type": "string"
                          },
                          "src": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "cta": {
                        "type": "string"
                      },
                      "subHeadline": {
                        "type": "string"
                      },
                      "headline": {
                        "type": "string"
                      },
                      "href": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "border": {
                    "required": [
                      "width",
                      "color",
                      "type"
                    ],
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "color": {
                        "type": "string"
                      },
                      "width": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "colors": {
                    "required": [
                      "background",
                      "selected",
                      "correct",
                      "incorrect",
                      "error"
                    ],
                    "properties": {
                      "error": {
                        "type": "string"
                      },
                      "incorrect": {
                        "type": "string"
                      },
                      "correct": {
                        "type": "string"
                      },
                      "selected": {
                        "type": "string"
                      },
                      "background": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "text": {
                    "required": [
                      "font",
                      "size",
                      "color"
                    ],
                    "properties": {
                      "color": {
                        "type": "string"
                      },
                      "size": {
                        "type": "string"
                      },
                      "font": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "exitButtonBorderColor": {
                    "type": "string"
                  },
                  "exitButtonFontColor": {
                    "type": "string"
                  },
                  "exitButtonBgColor": {
                    "type": "string"
                  },
                  "genericButtonBorderColor": {
                    "type": "string"
                  },
                  "genericButtonFontColor": {
                    "type": "string"
                  },
                  "genericButtonBgColor": {
                    "type": "string"
                  },
                  "nextButtonBorderColor": {
                    "type": "string"
                  },
                  "nextButtonFontColor": {
                    "type": "string"
                  },
                  "nextButtonBgColor": {
                    "type": "string"
                  },
                  "btn": {
                    "required": [
                      "next",
                      "last"
                    ],
                    "properties": {
                      "last": {
                        "type": "string"
                      },
                      "next": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "quizExitButtonCopy": {
                    "type": "string"
                  },
                  "quizInstruction": {
                    "type": "string"
                  },
                  "errorMessage": {
                    "type": "string"
                  },
                  "showAnswer": {
                    "type": "boolean"
                  },
                  "autoAdvanceDelay": {
                    "type": "string"
                  },
                  "manual": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "customFooter": {
                "type": "string"
              },
              "customHeader": {
                "type": "string"
              },
              "rid": {
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#"
      },
      "createdAt": "2016-11-09T19:33:29.899Z",
      "lastModified": "2016-11-09T19:33:30.730Z",
      "interactions": [
        "suggestive-quiz",
        "dropdown",
        "accordion"
      ],
      "ownerIds": [],
      "public": true
    },
  .... (See Module Documentation for each generic module context) ] 

Query Params

name
string

Name of the chosen template, e.g. rebelmail-templates/generic/hotspots

type
string

Either marketing or transactional

 
Suggest Edits

/templates/:id

Get individual template

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/templates/id
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' 
https://api.rebelmail.com/api/v0/templates/5829e3a656e06418d917395d
A binary file was returned
{
  "template": {
    "id": "5829e3a656e06418d917395d",
    "name": "rebelmail-templates/generic/tabs",
    "type": "marketing",
    "title": "Generic - Tabs",
    "context": {
      "context": {
        "brandSettings": {
          "poweredby": true,
          "url": "http://rebelmail.com",
          "basics": {
            "backgroundColor": "#dddddd",
            "contentColor": "#eeeeee",
            "contentBorder": {
              "color": "",
              "width": ""
            }
          },
          "text": {
            "header": {
              "family": "Arial, Helvetica, sans-serif",
              "size": "32",
              "color": "#ffffff",
              "webUrl": "",
              "webFamily": ""
            },
            "subheader": {
              "family": "Arial, Helvetica, sans-serif",
              "size": "18",
              "color": ""
            },
            "body": {
              "family": "Arial, Helvetica, sans-serif",
              "size": "14",
              "color": "#333333",
              "webUrl": "",
              "webFamily": ""
            }
          },
          "ctas": {
            "primary": {
              "backgroundColor": "#f69513",
              "font": {
                "family": "Arial, Helvetica, sans-serif",
                "size": "18",
                "color": "#ffffff"
              },
              "border": {
                "width": "1",
                "color": "#ffffff"
              },
              "cornerRadius": "5"
            },
            "secondary": {
              "backgroundColor": "#ff6666",
              "font": {
                "family": "Arial",
                "size": "14",
                "color": "#fff"
              },
              "border": {
                "width": "2",
                "color": "#ff0000"
              },
              "cornerRadius": "8"
            }
          },
          "forms": {
            "shared": {
              "label": {
                "fontFamily": "",
                "fontSize": "",
                "fontColor": ""
              },
              "input": {
                "border": {
                  "color": "blue",
                  "size": "1",
                  "radius": "5"
                },
                "backgroundColor": "#ffffff"
              },
              "select": {
                "border": {
                  "color": "#546476"
                }
              }
            },
            "specificInputs": {
              "ratingsComponent": {
                "starColor": "",
                "starSelectedColor": ""
              }
            }
          }
        },
        "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>",
        "tabs": {
          "id": "tabsID",
          "width": "400",
          "tabAttached": true,
          "tabAlignmnet": "left",
          "tabPadding": "5",
          "tabColor": "#666",
          "tabBackground": "#eee",
          "tabBorder": "#666",
          "tabBorderRadius": "8",
          "tabColorSelected": "#000",
          "tabBackgroundSelected": "#fff",
          "tabBorderSelected": "#000",
          "contentPadding": "1em",
          "contentBackground": "#fff",
          "contentBorder": "#000",
          "contentBorderRadius": "2",
          "options": [
            {
              "tab": "Tab 1",
              "content": "Tab 1 content"
            },
            {
              "tab": "Tab 2",
              "content": "Tab 2 content<br>more content<br> then some more"
            },
            {
              "tab": "Tab 3",
              "content": "Tab 3 content"
            },
            {
              "tab": "Tab 4",
              "content": "Tab 4 content <img src='https://placekitten.com/800/600' style='max-width:400px;width:100%;height:auto;' atl='placekitten'>"
            }
          ],
          "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!"
          }
        }
      }
    },
    "pushSchema": {
      "required": [
        "context"
      ],
      "properties": {
        "context": {
          "required": [
            "rid",
            "basics",
            "customHeader",
            "customFooter",
            "tabs"
          ],
          "properties": {
            "tabs": {
              "required": [
                "id",
                "width",
                "tabAttached",
                "tabAlignmnet",
                "tabPadding",
                "tabColor",
                "tabBackground",
                "tabBorder",
                "tabBorderRadius",
                "tabColorSelected",
                "tabBackgroundSelected",
                "tabBorderSelected",
                "contentPadding",
                "contentBackground",
                "contentBorder",
                "contentBorderRadius",
                "options",
                "fallback"
              ],
              "properties": {
                "fallback": {
                  "required": [
                    "type",
                    "src",
                    "width",
                    "height",
                    "href",
                    "alt"
                  ],
                  "properties": {
                    "alt": {
                      "type": "string"
                    },
                    "href": {
                      "type": "string"
                    },
                    "height": {
                      "type": "string"
                    },
                    "width": {
                      "type": "string"
                    },
                    "src": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "options": {
                  "items": [
                    {
                      "required": [
                        "tab",
                        "content"
                      ],
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "tab": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ],
                  "type": "array"
                },
                "contentBorderRadius": {
                  "type": "string"
                },
                "contentBackground": {
                  "type": "string"
                },
                "contentBorder": {
                  "type": "string"
                },
                "contentPadding": {
                  "type": "string"
                },
                "tabBorderSelected": {
                  "type": "string"
                },
                "tabBackgroundSelected": {
                  "type": "string"
                },
                "tabColorSelected": {
                  "type": "string"
                },
                "tabBorderRadius": {
                  "type": "string"
                },
                "tabBorder": {
                  "type": "string"
                },
                "tabBackground": {
                  "type": "string"
                },
                "tabColor": {
                  "type": "string"
                },
                "tabPadding": {
                  "type": "string"
                },
                "tabAlignmnet": {
                  "type": "string"
                },
                "tabAttached": {
                  "type": "boolean"
                },
                "width": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "customFooter": {
              "type": "string"
            },
            "customHeader": {
              "type": "string"
            },
            "basics": {
              "required": [
                "preheader"
              ],
              "properties": {
                "preheader": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "rid": {
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#"
    },
    "createdAt": "2016-11-14T16:17:42.194Z",
    "lastModified": "2016-11-14T16:17:42.606Z",
    "interactions": [
      "tabs",
      "dropdown",
      "accordion"
    ],
    "ownerIds": [],
    "public": true
  }
}

Path Params

id
string
required

Template id

 
Suggest Edits

/templates/:id/preview

Preview a template

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/templates/id/preview
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' 
https://api.rebelmail.com/api/v0/templates/5829e3a656e06418d917395d/preview
A binary file was returned
<!DOCTYPE html>
<html>
<!--[if source]>- 
 , _
/|/_)      o |\_|_    |)
 |  \|  |  | |/ |     |/\_|  |
 |(_/ \/|_/|/|_/|_/    \/  \/|/...
                            (|

              RebelmailReb
          RebelmailRebelmailR
        RebelmailRebelmailRebel
      Rebelma             Rebelma
     Rebelm                 Rebelm
    Rebel    RebelmailRebe    Rebel
   Rebel     RebelmailRebelm   Rebel
   Rebe      RebelmailRebelma   Rebe
  Rebel     Rebel        Rebe    Rebe
  Rebe      Rebe         Rebe    Rebe
  Rebe      RebelmailRebelmai    Rebel
  Rebe      RebelmailRebelma     Rebel
  Rebe     Rebe       Rebe       Rebel
  Rebe     Rebe       Rebe       Rebe
  Rebel    Rebe       Rebel     Rebel
   Rebel  Rebel        Rebel  Rebelm
    Rebel               RebelmailRe
     Rebel               Rebelmail
      Rebelm
       Rebelmail       Rebelmail
         RebelmailRebelmailRebe
            RebelmailRebelma

              __         __                _ __
   ________  / /_  ___  / /___ ___  ____ _(_) /
  / ___/ _ \/ __ \/ _ \/ / __ `__ \/ __ `/ / /
 / /  /  __/ /_/ /  __/ / / / / / / /_/ / / /
/_/   \___/_.___/\___/_/_/ /_/ /_/\__,_/_/_/

-<![endif]-->
</html>

Path Params

id
string
required

Template id

 
Suggest Edits

/templates/:id/preview

Update a template preview

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.rebelmail.com/v0/templates/id/preview
curl -X POST -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' 
https://api.rebelmail.com/api/v0/templates/57c898d30f4e024e3470db49/preview
-d '{"context": { } }'
A binary file was returned
<!DOCTYPE html>
<html>
<!--[if source]>- 
 , _
/|/_)      o |\_|_    |)
 |  \|  |  | |/ |     |/\_|  |
 |(_/ \/|_/|/|_/|_/    \/  \/|/...
                            (|

              RebelmailReb
          RebelmailRebelmailR
        RebelmailRebelmailRebel
      Rebelma             Rebelma
     Rebelm                 Rebelm
    Rebel    RebelmailRebe    Rebel
   Rebel     RebelmailRebelm   Rebel
   Rebe      RebelmailRebelma   Rebe
  Rebel     Rebel        Rebe    Rebe
  Rebe      Rebe         Rebe    Rebe
  Rebe      RebelmailRebelmai    Rebel
  Rebe      RebelmailRebelma     Rebel
  Rebe     Rebe       Rebe       Rebel
  Rebe     Rebe       Rebe       Rebe
  Rebel    Rebe       Rebel     Rebel
   Rebel  Rebel        Rebel  Rebelm
    Rebel               RebelmailRe
     Rebel               Rebelmail
      Rebelm
       Rebelmail       Rebelmail
         RebelmailRebelmailRebe
            RebelmailRebelma

              __         __                _ __
   ________  / /_  ___  / /___ ___  ____ _(_) /
  / ___/ _ \/ __ \/ _ \/ / __ `__ \/ __ `/ / /
 / /  /  __/ /_/ /  __/ / / / / / / /_/ / / /
/_/   \___/_.___/\___/_/_/ /_/ /_/\__,_/_/_/

-<![endif]-->
</html>

Path Params

id
string
required

Template id

Query Params

context
object
required

Context overrides to render a preview with custom changes

 
 
Suggest Edits

/campaigns

List campaigns

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/campaigns
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/campaigns
A binary file was returned
{
  "campaigns": [
    {
      "id": "57c898d30f4e024e3470db49",
      "ownerId": "57c898cb0f4e024e3470db48",
      "type": "transactional",
      "name": "Test",
      "activeTemplateId": "rebelmail-templates/multiproduct/v1",
      "createdAt": "2016-09-01T21:01:10.274Z",
      "lastModified": "2016-09-01T21:01:10.276Z",
      "integrations": {
        "linkTracking": {
          "active": true
        },
        "salesforceLinkTracking": {
          "active": false
        },
        "googleAnalytics": {
          "medium": "email",
          "source": "Rebelmail",
          "active": false
        }
      },
      "stats": {
        "sent": 0,
        "engagement": 0,
        "duration": 0,
        "open": {
          "total": 0,
          "unique": 0
        },
        "click": {
          "total": 0,
          "unique": 0
        },
        "interaction": {
          "total": 0,
          "unique": 0
        },
        "variant": {
          "total": 0,
          "unique": 0
        },
        "submit": {
          "total": 0,
          "unique": 0
        }
      }
    }
  ],
  "meta": {
    "page": 1,
    "perPage": 10,
    "totalPages": 1
  }
}

Query Params

accountId
string

The Account id that owns the campaigns.

type
string

Available options: marketing, transactional

page
int32
perPage
int32
 
Suggest Edits

/campaigns

Creates a campaign

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.rebelmail.com/v0/campaigns
curl -X POST -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' https://api.rebelmail.com/api/v0/campaigns -d '{"campaign": {"name": "Test", "ownerId": "57c898cb0f4e024e3470db48"}}'
A binary file was returned
{
  "campaign": {
    "id": "57c898d30f4e024e3470db49",
    "ownerId": "57c898cb0f4e024e3470db48",
    "type": "transactional",
    "name": "Test",
    "activeTemplateId": "rebelmail-templates/template",
    "createdAt": "2016-09-01T21:01:10.274Z",
    "lastModified": "2016-09-01T21:01:10.276Z",
    "integrations": {
      "linkTracking": {
        "active": true
      },
      "salesforceLinkTracking": {
        "active": false
      },
      "googleAnalytics": {
        "medium": "email",
        "source": "Rebelmail",
        "active": false
      }
    },
    "stats": {
      "engagement": 0,
      "variant": {
        "total": 0,
        "unique": 0
      },
      "submit": {
        "total": 0,
        "unique": 0
      },
      "interaction": {
        "total": 0,
        "unique": 0
      },
      "click": {
        "total": 0,
        "unique": 0
      },
      "open": {
        "total": 0,
        "unique": 0
      },
      "sent": 0,
      "duration": 0
    }
  }
}

Body Params

campaign
object
 
campaign.ownerId
string
required

The Account id that owns this campaign.

campaign.type
string
required

Available options: marketing, transactional.

campaign.name
string
required

The internal name for the campaign.

campaign.rid
string

A merge tag from your ESP that corresponds to a recipient. It must be unique per recipient for accurate stats reporting. Required for marketing campaigns.

campaign.preheader
string

The short summary text that follows the subject line when an email is viewed in the inbox in client that support it, such as Gmail. Used for marketing campaigns.

campaign.activeTemplateId
string

The template the campaign will use. Defaults to rebelmail-templates/multiproduct/v0.

campaign.templateSettings
mixed type

The mixed data used to populate the template.

campaign.integrations
object
 
campaign.integrations.googleAnalytics
object
 
campaign.integrations.googleAnalytics.active
boolean

Whether to enable Google Analytics tracking on outbound links. Defaults to false.

campaign.integrations.googleAnalytics.source
string

The Google Analytics source identifier. Defaults to Rebelmail.

campaign.integrations.googleAnalytics.campaign
string

The Google Analytics campaign identifier. Defaults to the campaign.name.

campaign.integrations.googleAnalytics.medium
string

The Google Analytics medium identifier. Defaults to email.

campaign.integrations.linkTracking
object
 
campaign.integrations.linkTracking.active
boolean

Whether to enable Rebelmail link tracking. Defaults to true.

campaign.integrations.salesforceLinkTracking
object
 
campaign.integrations.salesforceLinkTracking.active
boolean

Whether to enable Salesforce's httpgetwrap| link tracking. Defaults to false.

 

Campaign Types

There are two type of campaigns:

  • Marketing Campaigns - Meant for one time large blasts, e.g. a newsletter.
  • Transactional Campaigns - Meant for ongoing, single email sends, e.g. a password reset.
Suggest Edits

/campaigns/:id

Fetch a campaign

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/campaigns/id
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/campaigns/57c898d30f4e024e3470db49
A binary file was returned

{
  "campaign": {
    "id": "57c898d30f4e024e3470db49",
    "ownerId": "57c898cb0f4e024e3470db48",
    "type": "transactional",
    "name": "Test",
    "activeTemplateId": "rebelmail-templates/multiproduct/v1",
    "createdAt": "2016-09-01T21:01:10.274Z",
    "lastModified": "2016-09-01T21:01:10.276Z",
    "integrations": {
      "linkTracking": {
        "active": true
      },
      "salesforceLinkTracking": {
        "active": false
      },
      "googleAnalytics": {
        "medium": "email",
        "source": "Rebelmail",
        "active": false
      }
    },
    "stats": {
      "sent": 0,
      "engagement": 0,
      "duration": 0,
      "open": {
        "total": 0,
        "unique": 0
      },
      "click": {
        "total": 0,
        "unique": 0
      },
      "interaction": {
        "total": 0,
        "unique": 0
      },
      "variant": {
        "total": 0,
        "unique": 0
      },
      "submit": {
        "total": 0,
        "unique": 0
      }
    }
  }
}

Path Params

id
string
required

The Campaign id.

 
Suggest Edits

/campaigns/:id

Edit a campaign

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.rebelmail.com/v0/campaigns/id
curl -X PUT -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' https://api.rebelmail.com/api/v0/campaigns/57c898d30f4e024e3470db49 -d '{"campaign": {"name": "Test 2"}}'
A binary file was returned
{
  "campaigns": [
    {
      "id": "57c898d30f4e024e3470db49",
      "ownerId": "57c898cb0f4e024e3470db48",
      "type": "transactional",
      "name": "Test 2",
      "activeTemplateId": "rebelmail-templates/multiproduct/v1",
      "createdAt": "2016-09-01T21:01:10.274Z",
      "lastModified": "2016-09-02T18:43:25.209Z",
      "integrations": {
        "linkTracking": {
          "active": true
        },
        "salesforceLinkTracking": {
          "active": false
        },
        "googleAnalytics": {
          "medium": "email",
          "source": "Rebelmail",
          "active": false
        }
      },
      "stats": {
        "sent": 0,
        "engagement": 0,
        "duration": 0,
        "open": {
          "total": 0,
          "unique": 0
        },
        "click": {
          "total": 0,
          "unique": 0
        },
        "interaction": {
          "total": 0,
          "unique": 0
        },
        "variant": {
          "total": 0,
          "unique": 0
        },
        "submit": {
          "total": 0,
          "unique": 0
        }
      }
    }
  ],
  "meta": {
    "page": 1,
    "perPage": 10,
    "totalPages": 1
  }
}

Path Params

id
string
required

The campaign id.

Body Params

campaign
object
 
campaign.name
string

The internal name for the campaign.

campaign.rid
string

A merge tag from your ESP that corresponds to a recipient. It must be unique per recipient for accurate stats reporting. Required for marketing campaigns.

campaign.preheader
string

The short summary text that follows the subject line when an email is viewed in the inbox in client that support it, such as Gmail. Used for marketing campaigns.

campaign.activeTemplateId
string

The template the campaign will use.

campaign.templateSettings
object

The mixed data used to populate the template.

 
 
Suggest Edits

/campaigns/:id

Delete a campaign

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.rebelmail.com/v0/campaigns/id
curl -X DELETE -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/campaigns/56200251d89a0f143738a71b
A binary file was returned
Try the API to see results

Path Params

id
string
required

The campaign id.

 
Suggest Edits

/campaigns/:id/html

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/campaigns/id/html
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/campaigns/57c898d30f4e024e3470db49/html
A binary file was returned
<!DOCTYPE html>
<html>
<!--[if source]>- 
 , _
/|/_)      o |\_|_    |)
 |  \|  |  | |/ |     |/\_|  |
 |(_/ \/|_/|/|_/|_/    \/  \/|/...
                            (|

              RebelmailReb
          RebelmailRebelmailR
        RebelmailRebelmailRebel
      Rebelma             Rebelma
     Rebelm                 Rebelm
    Rebel    RebelmailRebe    Rebel
   Rebel     RebelmailRebelm   Rebel
   Rebe      RebelmailRebelma   Rebe
  Rebel     Rebel        Rebe    Rebe
  Rebe      Rebe         Rebe    Rebe
  Rebe      RebelmailRebelmai    Rebel
  Rebe      RebelmailRebelma     Rebel
  Rebe     Rebe       Rebe       Rebel
  Rebe     Rebe       Rebe       Rebe
  Rebel    Rebe       Rebel     Rebel
   Rebel  Rebel        Rebel  Rebelm
    Rebel               RebelmailRe
     Rebel               Rebelmail
      Rebelm
       Rebelmail       Rebelmail
         RebelmailRebelmailRebe
            RebelmailRebelma

              __         __                _ __
   ________  / /_  ___  / /___ ___  ____ _(_) /
  / ___/ _ \/ __ \/ _ \/ / __ `__ \/ __ `/ / /
 / /  /  __/ /_/ /  __/ / / / / / / /_/ / / /
/_/   \___/_.___/\___/_/_/ /_/ /_/\__,_/_/_/

-<![endif]-->
</html>

Path Params

id
string
required

The Campaign id.

 
Suggest Edits

/campaigns/:id/html

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.rebelmail.com/v0/campaigns/id/html
curl -X POST -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' https://api.rebelmail.com/api/v0/campaigns/57c898d30f4e024e3470db49 -d '{"context": {"rid": "%UNIQUE_RID%"}}'
A binary file was returned
<!DOCTYPE html>
<html>
<!--[if source]>- 
 , _
/|/_)      o |\_|_    |)
 |  \|  |  | |/ |     |/\_|  |
 |(_/ \/|_/|/|_/|_/    \/  \/|/...
                            (|

              RebelmailReb
          RebelmailRebelmailR
        RebelmailRebelmailRebel
      Rebelma             Rebelma
     Rebelm                 Rebelm
    Rebel    RebelmailRebe    Rebel
   Rebel     RebelmailRebelm   Rebel
   Rebe      RebelmailRebelma   Rebe
  Rebel     Rebel        Rebe    Rebe
  Rebe      Rebe         Rebe    Rebe
  Rebe      RebelmailRebelmai    Rebel
  Rebe      RebelmailRebelma     Rebel
  Rebe     Rebe       Rebe       Rebel
  Rebe     Rebe       Rebe       Rebe
  Rebel    Rebe       Rebel     Rebel
   Rebel  Rebel        Rebel  Rebelm
    Rebel               RebelmailRe
     Rebel               Rebelmail
      Rebelm
       Rebelmail       Rebelmail
         RebelmailRebelmailRebe
            RebelmailRebelma

              __         __                _ __
   ________  / /_  ___  / /___ ___  ____ _(_) /
  / ___/ _ \/ __ \/ _ \/ / __ `__ \/ __ `/ / /
 / /  /  __/ /_/ /  __/ / / / / / / /_/ / / /
/_/   \___/_.___/\___/_/_/ /_/ /_/\__,_/_/_/

-<![endif]-->
</html>

Path Params

id
string
required

The Campaign id.

Body Params

context
object

The mixed data used to populate the template.

 
 
Suggest Edits

/campaigns/:id/update-stats

Update campaign statistics.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/campaigns/id/update-stats
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/campaigns/56200251d89a0f143738a71b/update-stats
A binary file was returned
Try the API to see results

Path Params

id
string
required

The Campaign id.

 
Suggest Edits

/reports

Fetch reports

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/reports
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/reports
A binary file was returned
{
  "reports": [
    {
      "id": "5824e26bc17b3a0021e111e3",
      "name": "New Campaign",
      "type": "transactional",
      "stats": {
        "engagement": 0,
        "variant": {
          "total": 0,
          "unique": 0
        },
        "submit": {
          "total": 0,
          "unique": 0
        },
        "interaction": {
          "total": 0,
          "unique": 0
        },
        "click": {
          "total": 0,
          "unique": 0
        },
        "open": {
          "total": 0,
          "unique": 0
        },
        "sent": 0,
        "duration": 0
      },
      "integrations": {
        "salesforceLinkTracking": {},
        "linkTracking": {},
        "googleAnalytics": {}
      },
      "activeTemplateId": "rebelmail-templates/generic/tabs"
    }
  ],
  "meta": {
    "page": 1,
    "perPage": 10,
    "totalPages": 1
  }
}

Query Params

accountId
string
required

Account id to generate reports for

page
int32
perPage
int32
 
Suggest Edits

/reports/stats

Fetch queried reports based on statistics

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/reports/stats
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/reports/stats
A binary file was returned
{
  "report": []
}

Query Params

match.campaignId
string

The Campaign id to match.

match.type
string

The type of event to match. Available options: open, click, interaction, variant, submit

match.click
string

Substring match all clicks that contain this string.

match.interaction
string

Match all interactions of this type. The type corresponds to the interaction type a template exposes in the Template's interactions field.

filter.type.operator
string

One of: eq, lt, lte, gt, gte

start
int32
end
int32
limit
string

Maximum allowed through this interface is 50. Use an export job to export all results.

 
Suggest Edits

/reports/recipients

Fetch queried reports based on recipient type

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/reports/recipients
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/reports/recipients
A binary file was returned
{
  "report": []
}

Path Params

match.type
string
required

Match all interactions of this type. The type corresponds to the interaction type a template exposes in the Template's interactions field.

match.interaction
string
required
limit
int32
required
 
Suggest Edits

/reports/export

Export a report to email

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/reports/export
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/reports/export
A binary file was returned
{
  "email": "example@rebelmail.com"
}

Query Params

email
string
required

Email address to send report to

match.type
string
match.campaignId
string

Campaign ID to generate and send report for

filter.interaction
string
 
Suggest Edits

/reports/:campaignId

Retrieve tracking reports on a specific campaign

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/reports/campaignId
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/reports/582382ba77290f00140bc87a
A binary file was returned
{
  "report": {
    "id": "58222d12cbaead0035ca6295",
    "name": "New Campaign",
    "ownerId": "5820f435a77d34a49d6f0bf3",
    "type": "marketing",
    "rid": "%pre%",
    "preheader": "preheader",
    "templateSettings": {
      "context": {
        "tabs": {
          "id": "tabsID",
          "width": "400",
          "tabAttached": true,
          "tabAlignmnet": "left",
          "tabPadding": "5",
          "tabColor": "#666",
          "tabBackground": "#eee",
          "tabBorder": "#666",
          "tabBorderRadius": "8",
          "tabColorSelected": "#000",
          "tabBackgroundSelected": "#fff",
          "tabBorderSelected": "#000",
          "contentPadding": "1em",
          "contentBackground": "#fff",
          "contentBorder": "#000",
          "contentBorderRadius": "2",
          "options": [
            {
              "tab": "Tab 1",
              "content": "Tab 1 content"
            },
            {
              "tab": "Tab 2",
              "content": "Tab 2 content<br>more content<br> then some more"
            },
            {
              "tab": "Tab 3",
              "content": "Tab 3 content"
            },
            {
              "tab": "Tab 4",
              "content": "Tab 4 content <img src='https://placekitten.com/800/600' style='max-width:400px;width:100%;height:auto;' atl='placekitten'>"
            }
          ],
          "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!"
          }
        },
        "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>",
        "logo": {},
        "unsubscribe": {}
      }
    },
    "stats": {
      "engagement": 0,
      "variant": {
        "total": 0,
        "unique": 0
      },
      "submit": {
        "total": 0,
        "unique": 0
      },
      "interaction": {
        "total": 0,
        "unique": 0
      },
      "click": {
        "total": 0,
        "unique": 0
      },
      "open": {
        "total": 0,
        "unique": 0
      },
      "sent": 0,
      "duration": 0
    },
    "integrations": {
      "salesforceLinkTracking": {
        "active": false
      },
      "linkTracking": {
        "active": true
      },
      "googleAnalytics": {
        "campaign": null,
        "medium": null,
        "source": null,
        "active": false
      }
    },
    "activeTemplateId": "rebelmail-templates/generic/tabs",
    "lastModified": "2016-11-08T19:52:58.331Z",
    "createdAt": "2016-11-08T19:52:50.334Z"
  }
}

Path Params

campaignId
string
required

Campaign id to run report on

 
Suggest Edits

/emails

Create an email

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.rebelmail.com/v0/emails
curl -X POST -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' https://api.rebelmail.com/api/v0/emails -d '{"email": { "to": "friends@rebelmail.com", "from": "friends@rebelmail.com", "subject": "Test", "context": {}}}'
A binary file was returned
{
  "email": {
    "id": "57c9cac59ce76b72dc63fee0",
    "ownerId": "57c898cb0f4e024e3470db48",
    "campaignId": "57c898d30f4e024e3470db49",
    "preview": false,
    "to": "example@rebelmail.com",
    "from": "example@rebelmail.com",
    "subject": "Test",
    "context": {}
  }
}

Body Params

email
object
 
email.to
string
required

The recipient of the email. Must be a valid email address.

email.from
string
required

The sender of the email. Must be a a valid email address.

email.subject
string
required

The subject of the email.

email.headers
object

An object of additional header fields passed along to your ESP during send. E.g. {"X-Key-Name": "value"}

 
email.context
object
required

The mixed data used to populate the email template.

 
 
Suggest Edits

/emails/:id

Get email

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.rebelmail.com/v0/emails/id
curl -X GET -H 'Authorization: Bearer <API_KEY>' -H 'Accept: application/json' https://api.rebelmail.com/api/v0/emails/57c9cac59ce76b72dc63fee0
A binary file was returned
{
  "email": {
    "id": "57c9cac59ce76b72dc63fee0",
    "ownerId": "57c898cb0f4e024e3470db48",
    "campaignId": "57c898d30f4e024e3470db49",
    "messageId":"c82242b3-d377-2acf-cd83-9011dd738d22@rebelmail.com",
    "preview": false,
    "to": "example@rebelmail.com",
    "from": "example@rebelmail.com",
    "subject": "Test",
    "sentAt":"2016-09-02T18:51:19.911Z",
    "context": {}
  }
}

Path Params

id
string
required

The Email id.

 
Suggest Edits

/batch

Make multiple (batch) requests using one request

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.rebelmail.com/v0/batch
curl -X POST -H 'Authorization: Bearer <API_KEY>' -H 'Content-Type: application/json' https://api.rebelmail.com/api/v0/batch -d 
'{"requests": [ { "method": "PUT", "path": "/v0/campaigns/57c898d30f4e024e3470db49", "body": { "campaign" : { "name" : "test", "templateSettings" : { "context" : { "name": "test" }}, "activeTemplateId": "generic/hotspots" } } } ] } '
A binary file was returned
[{
  campaign: {
    id: '582cd88748659b05d450764a',
    ownerId: '582cd88748659b05d4507648',
    name: 'test',
    type: 'transactional',
     templateSettings: {
      context: {
        name: 'new test campaign'
      }
    },
    stats: {
      engagement: 0,
      variant: {
        total: 0,
        unique: 0
      },
      submit: {
        total: 0,
        unique: 0
      },
      interaction: {
        total: 0,
        unique: 0
      },
      click: {
        total: 0,
        unique: 0
      },
      open: {
        total: 0,
        unique: 0
      },
      sent: 0,
      duration: 0
    },
    integrations: {
      salesforceLinkTracking: {
        active: false
      },
      linkTracking: {
        active: true
      },
      googleAnalytics: {
        medium: 'email',
        source: 'Rebelmail',
        active: false
      }
    },
    activeTemplateId: 'rebelmail-templates/generic/oneproduct',
    lastModified: '2016-11-16T22:07:03.908Z',
    createdAt: '2016-11-16T22:07:03.767Z'
  }
}, {
  campaign: {
    id: '582cd88748659b05d450764b',
    name: 'new test campaign',
    ownerId: '582cd88748659b05d4507648',
    type: 'marketing',
    templateSettings: {
      context: {
        name: 'new test campaign'
      }
    },
    rid: 'test',
    stats: {
      engagement: 0,
      variant: {
        total: 0,
        unique: 0
      },
      submit: {
        total: 0,
        unique: 0
      },
      interaction: {
        total: 0,
        unique: 0
      },
      click: {
        total: 0,
        unique: 0
      },
      open: {
        total: 0,
        unique: 0
      },
      sent: 0,
      duration: 0
    },
    integrations: {
      salesforceLinkTracking: {
        active: false
      },
      linkTracking: {
        active: true
      },
      googleAnalytics: {
        medium: 'email',
        source: 'Rebelmail',
        active: false
      }
    },
    activeTemplateId: 'rebelmail-templates/generic/oneproduct',
    lastModified: '2016-11-16T22:07:03.904Z',
    createdAt: '2016-11-16T22:07:03.903Z'
  }
}]

Body Params

requests
object
 
requests.x
object
 
requests.x.method
string
required

get, post, delete or put

requests.x.path
string
required

Path to make the request to ex: '/v0/campaigns/' + campaign._id

requests.x.body
object
 
requests.x.body.campaign
object
 
requests.x.body.campaign.name
string

Name of campaign

requests.x.body.campaign.templateSettings
object
 
requests.x.body.campaign.templateSettings.context
object
 
requests.x.body.campaign.templateSettings.context.name
string
requests.x.body.campaign.activeTemplateId
string