# How to Send AMP Emails From Rest API Using Mailmodo

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "headline": "How to Send AMP Emails From Rest API Using Mailmodo",
  "description": "Learn how to connect different APIs with Mailmodo and create a seamless workflow between both the platforms to generate higher ROI and conversions",
  "image": "https://res.cloudinary.com/mailmodo/image/upload/v1653396854/strapi/Feature_image_Mailmodo_integration_with_rest_of_the_AP_Is_619a222c9e.png",
  "datePublished": "2022-03-21T04:34:15.684Z",
  "dateModified": "2025-01-08T06:28:15.250Z",
  "publisher": {
    "@type": "Organization",
    "name": "Mailmodo",
    "url": "https://www.mailmodo.com/",
    "sameAs": [
      "https://www.linkedin.com/company/mailmodo/",
      "https://www.facebook.com/mailmodo/",
      "https://www.instagram.com/mailmodohq/",
      "https://www.youtube.com/@mailmodo"
    ],
    "logo": "https://www.mailmodo.com/static/images/logo/logo-full.svg",
    "description": "Mailmodo is a complete email marketing platform that helps email marketers to create and send interactive emails to drive growth and engagement.",
    "address": {
      "@type": "PostalAddress",
      "addressLocality": "Lewes",
      "addressRegion": "DE",
      "postalCode": "19958",
      "streetAddress": "Mailmodo Technologies Inc. 16192, Coastal Highway",
      "addressCountry": {
        "@type": "Country",
        "name": "US"
      }
    },
    "contactPoint": {
      "@type": "ContactPoint",
      "email": "enquiries@mailmodo.com",
      "contactType": "customer service"
    }
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Send AMP Emails From Rest API Using Mailmodo",
  "description": "Learn how to connect different APIs with Mailmodo and create a seamless workflow between both the platforms to generate higher ROI and conversions",
  "image": "https://res.cloudinary.com/mailmodo/image/upload/v1653396854/strapi/Feature_image_Mailmodo_integration_with_rest_of_the_AP_Is_619a222c9e.png",
  "datePublished": "2022-03-21T04:34:15.684Z",
  "dateModified": "2025-01-08T06:28:15.250Z",
  "author": {
    "@type": "Person",
    "name": "Suryanarayan Pal",
    "url": "https://www.mailmodo.com/guides/author/suryanarayan-pal/"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Mailmodo",
    "logo": {
      "@type": "ImageObject",
      "url": "https://www.mailmodo.com/static/images/logo/logo-full.svg"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.mailmodo.com/guides/rest-api-amp-emails/"
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "#creator",
  "description": "Email marketing software to create and send interactive emails to maximize conversions and reinvent your user journey",
  "email": "support@mailmodo.com",
  "image": "https://www.mailmodo.com/static/images/og-image.png",
  "knowsAbout": "Email marketing",
  "legalName": "Mailmodo Technologies Inc.",
  "location": "United States",
  "logo": "https://www.mailmodo.com/static/images/logo/logo-full.svg",
  "name": "Mailmodo",
  "sameAs": [
    "https://twitter.com/mailmodo",
    "https://www.facebook.com/company/mailmodo/",
    "https://www.linkedin.com/company/mailmodo/"
  ],
  "url": "https://www.mailmodo.com/"
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://www.mailmodo.com/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Guides",
      "item": "https://www.mailmodo.com/guides/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "rest api amp emails",
      "item": "https://www.mailmodo.com/guides/rest-api-amp-emails/"
    }
  ]
}
</script>

## Table of contents

- Benefits of using APIs with Mailmodo
- What are API Endpoints?
- How to send AMP emails from Rest API using Mailmodo
- Wrap up

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](https://www.mailmodo.com/guides/amp-email-benefits/) campaign may be one of your favorite options because of the [high conversion rates](https://www.mailmodo.com/case-studies/) it provides.

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



-   Benefits of using APIs with Mailmodo
    
-   What are API Endpoints?
    
-   How to send AMP emails from Rest API using Mailmodo
    
-   Wrap up

## 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](https://www.mailmodo.com/guides/email-automation/) 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





### Creating a POST request

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

### Endpoint

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

  

https://api.mailmodo.com/api/v1/triggerCampaign/<campaign id>

  

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](https://en.wikipedia.org/wiki/Application_programming_interface).

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: <api key value>

### Request

POST requests can be generated in multiple ways.

  

Here are sample CURL and axios request.

  

Sample CURL

  

    curl --location --request POST 'https://api.mailmodo.com/api/v1/triggerCampaign/<campaign id>' \
    
    --header 'mmApiKey: <api key>' \
    
    --header 'Content-Type: application/json' \
    
    --data-raw '{
    
    "subject":"Hi, this email is from api trigger",
    
    "email": "apurv.gpt@gmail.com",
    
    "data":{
    
    "firstName" : "John",
    
    }
    
    }

  

Sample axios

  

    var axios = require('axios');
    
    var data = JSON.stringify(
    
    {"subject":"Hi, this email is from api trigger",
    
    "email":"apurv.gpt@gmail.com",
    
    "data":{"firstName":"John"}});
    
    var config = {
    
    method: 'post',
    
    url: 'https://api.mailmodo.com/api/v1/triggerCampaign/<campaign id>',
    
    headers: {
    
    'mmApiKey': '<api key>',
    
    'Content-Type': 'application/json'
    
    },
    
    data : data
    
    };
    
    axios(config)
    
    .then(function (response) {
    
    console.log(JSON.stringify(response.data));
    
    })
    
    .catch(function (error) {
    
    console.log(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.

  



## 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](https://www.mailmodo.com/case-studies/). 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](https://www.mailmodo.com/guides/amp-for-email/) 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](https://manage.mailmodo.com/auth/signup?utm_content=inline-s&utm_term=/guides/rest-api-amp-emails/) today to take full advantage of AMP emails!


<div class="highlight"> 

**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](https://www.mailmodo.com/demo/?utm_content=inline-d&utm_term=/guides/rest-api-amp-emails/). 

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](https://manage.mailmodo.com/auth/signup?utm_content=inline-s&utm_term=/guides/rest-api-amp-emails/). 

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](https://www.mailmodo.com/guides/). 

</div>

---

**Author: Suryanarayan Pal**

Suryanarayan has 7 years of experience in email marketing for B2B, SaaS, and e-commerce, specializing in email deliverability and project management.

