How to Send AMP Emails From Rest API Using Mailmodo

BySuryanarayan Pal


Linkedin logo
Twitter logo
copy link
Facebook logo
Whatsapp logo
Pinterest logo
mail logo

APIs are an important part of our connected workflows. They let you connect multiple apps and help them ‘talk’ to each other. Similarly, connecting your API to Mailmodo helps you build complex workflows by connecting various apps. Sending an AMP email campaign may be one of your favorite options because of the high conversion rates it provides.

This guide will detail the exact steps you need to follow to trigger AMP emails through your API in Mailmodo.

Table of contents

Benefits of using APIs with Mailmodo

Honestly, there are an impressive number of benefits of connecting your API to Mailmodo. But to keep things short, here are some important ones:

  • Integrate third-party apps and tools.

  • Trigger automated email campaigns from third-party apps.

  • Set trigger endpoints for journey emails.

  • Perform all these tasks with minimal steps.

Even if you are new to APIs and want to use them, there's no need to worry. This guide has a step-by-step guide to help you trigger AMP emails in Mailmodo using APIs. But before that, we’ve to talk about API endpoints.

What are API Endpoints?

Endpoints are used for interacting with server-side web APIs, as they specify where resources lie that can be accessed by third-party software. Usually, the access is via a URL to which HTTP requests are posted and from which the response is expected.

Simply put, API Endpoints help you get your apps to communicate with each other.

How to send AMP emails from Rest API using Mailmodo

Write winning subject lines with our free ebook

Proven subject line framework to get higher opens

Creating a POST request

Following are the parameters that you will need to create a POST request.


You can get the trigger endpoint URL from the corresponding Transactional Campaign in the following format:

You will get this URL on enabling a transactional campaign. You can also obtain this URL for any campaign by following this path: Mailmodo Dashboard > Go to 'Transactional' tab > Select the required campaign > Trigger Info.

API key

An application programming interface key (API key) is a unique identifier used to authenticate a user, developer, or calling program to an API.

You can get API keys from Mailmodo using the following path: Mailmodo Dashboard > Go to 'Settings' tab > API Keys.

You need to provide the API key with the header 'mmApiKey' in the following format: mmApiKey:


POST requests can be generated in multiple ways.

Here are sample CURL and axios request.

Sample CURL

curl --location --request POST '<campaign id>' \

--header 'mmApiKey: <api key>' \

--header 'Content-Type: application/json' \

--data-raw '{

"subject":"Hi, this email is from api trigger",

"email": "",


"firstName" : "John",



Sample axios

var axios = require('axios');

var data = JSON.stringify(

{"subject":"Hi, this email is from api trigger",



var config = {

method: 'post',

url: '<campaign id>',

headers: {

'mmApiKey': '<api key>',

'Content-Type': 'application/json'


data : data



.then(function (response) {



.catch(function (error) {



Personalization parameters:

You need to make the required personalizations in the parameters before using these. These have to be passed in the 'data' in the form of a 'key-value' pair and are meant to assign values to personalization used in the subject line/ body of the mail.

For eg. {"firstName" : "John"}

💡 Important notes

'Subject' is optional and if not provided, the original subject set in the campaign will be used.

Campaign Id can be provided in the URL path or the payload with the ‘campaignId’ key.

Get a sample AMP email in your inbox

Experience the power of interactivity right now

Wrap up

Mailmodo is an A - Z email marketing solution that you can rely on and increase your conversion rates significantly just like our users. Mailmodo is also a pioneer in AMP emails and we are continuously pushing the boundary by creating interesting features like spin the wheel.

Check out our definitive guide on AMP emails if you want to have an in-depth understanding of all things AMP. One of the best ways to know if something work is by trying it out. So sign up for Mailmodo today to take full advantage of AMP emails!

What you should do next

Hey there, thanks for reading till the end. Here are 3 ways we can help you grow your business:

  1. Talk to an email expert. Need someone to take your email marketing to the next level? Mailmodo’s experts are here for you. Schedule a 30-minute email consultation. Don’t worry, it’s on the house. Book a meet here.

  2. Send emails that bring higher conversions. Mailmodo is an ESP that helps you to create and send app-like interactive emails with forms, carts, calendars, games, and other widgets for higher conversions. Get started for free.

  3. Get smarter with our email resources. Explore all our knowledge base here and learn about email marketing, marketing strategies, best practices, growth hacks, case studies, templates, and more. Access guides here.

What should you do next?

Thanks for reading till the end. Here are 3 ways we can help you grow your business:


Get smarter with our email resources

Explore our email marketing guides, ebooks and other resources to master email marketing.


Do better email marketing with Mailmodo

Send app-like interactive emails with forms, carts, calendars, games, etc. to boost email ROI.


Talk to an email expert

Get a 30-min. free email consultation with a Mailmodo expert to optimize your email marketing.

Was this post useful?

Get 3X conversions
with interactive emails


Create & send interactive emails without coding


Put revenue on auto-pilot with pre-built journeys


Save time with AI-powered email content creation

1000+ businesses grew with Mailmodo, including