API requests can be used to:

  • trigger dynamic mails through your software stack in Mailmodo

  • pass dynamic (custom) forms inside the AMP mail

  • trigger Journeys in Mailmodo from your application

  • import contacts in Mailmodo from your software stack

This article documents the structure of API requests to be used to trigger mails in Mailmodo. To learn about the general structure of API requests in Mailmodo, follow this guide.

Mailmodo APIs are completely RESTful and all our responses are returned in JSON.

API Gateway URL:

The Mailmodo API Gateway URL is https://api.mailmodo.com/ You need to include this before each API endpoint to make API calls.

API endpoint:

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

This URL can be obtained from the 'Transactional' tab.

Go to Transactional -> Select the campaign from the list -> Trigger Info

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

API Authorization:

Mailmodo APIs are completely RESTful. All Mailmodo APIs are authorized via an API key.

Generate API Key:

  1. Login to your Mailmodo account with appropriate credentials.

  2. Navigate to SettingsAPI KeysShow API Key to view the default API key. (You may also create a new API Key by clicking on the 'Add new API Key' button)


- Header:

'mmApiKey': '<api key value>'

'Content-Type': 'application/json'

- Body:



  • Optional. If not provided, the original subject set in the campaign will be used


  • Required field

  • email address of the recipient


  • Optional personalization fields in key-value pairs. ex-
    "First Name": "Daniel"






"Email scheduled successfully"/

"No campaign Found for the campaignId in Trigger URL, Please check apiKey or campaignId"


<reference id>

Sample Requests:

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": "john@example.com",
"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: 'https://api.mailmodo.com/api/v1/triggerCampaign/<campaign id>',
headers: {
'mmApiKey': '<api key>',
'Content-Type': 'application/json'
data : data

.then(function (response) {
.catch(function (error) {
Did this answer your question?