Sign Up

Log In

MailGun

FREE
By zakutynsky
Updated 5 months ago
Email
-/10
Popularity Score
-
Latency
-
Success Rate

MailGun API Documentation

Send, validate, receive and track emails.
View API Details

Supercharge your App

Discover and connect to thousands of APIs in the world's largest API Hub

POSTaddAddressToUnsubscribeTable
POSTaddBounce
POSTaddMemberToMailingList
POSTaddMultipleBounces
POSTaddSingleComplaint
POSTcreateMailingList
POSTcreateRoute
POSTcreateWebhook
POSTdeleteBounce
POSTdeleteBounceList
POSTdeleteComplaint
POSTdeleteMailingList
POSTdeleteMember
POSTdeleteRoute
POSTdeleteTag
POSTdeleteUnsubscribeRecords
POSTdeleteWebhook
POSTgetAcceptedMessages
POSTgetAllBounces
POSTgetAllComplaints
POSTgetAllMailingLists
POSTgetAllRoutes
POSTgetAllStats
POSTgetAllTags
POSTgetAllUnsubscribes
POSTgetAllWebhooks
POSTgetClickedMessages
POSTgetComplainedMessages
POSTgetDeliveredMessages
POSTgetEventStats
POSTgetFailedMessages
POSTgetMailingListMembers
POSTgetOpenedMessages
POSTgetRejectedMessages
POSTgetSingleBounce
POSTgetSingleComplaint
POSTgetSingleMailingList
POSTgetSingleMailingListMember
POSTgetSingleRoute
POSTgetSingleTag
POSTgetSingleUnsubscribeRecord
POSTgetSingleWebhook
POSTgetStoredMessages
POSTgetTagStats
POSTgetUnsubscribedMessages
POSTsendEmail
POSTsendEmailMIME
POSTupdateMailingList
POSTupdateMember
POSTupdateRoute
POSTupdateTag
POSTupdateWebhook
POSTvalidateAddress
POSTwebhookEvent
POSTsendEmail

Sends an email.

Sign up to test this endpoint
Log in
Header Parameters
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
mToLIST
REQUIREDEmail address of the recipient(s). ('Bob [email protected]'). You can use commas to separate multiple recipients.
apiKeyCREDENTIALS
REQUIREDThe api key obtained from MailGun.
mFromSTRING
REQUIREDEmail address for From header.
domainSTRING
REQUIREDMailgun account contain email domain.
Optional Parameters
ccLIST
OPTIONALSame as 'To' but for Cc.
bccLIST
OPTIONALSame as 'To' but for Bcc.
o:tagLIST
OPTIONALTag string.
inlineSTRING
OPTIONALAttachment with inline disposition.
textSTRING
OPTIONALBody of the message. (text version).
htmlSTRING
OPTIONALBody of the message. (HTML version).
subjectSTRING
OPTIONALMessage subject.
o:campaignSTRING
OPTIONALId of the campaign the message belongs to. See um-campaign-analytics for details.
o:trackingSELECT
OPTIONALToggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no.
o:skip-verificationSELECT
OPTIONALIf set to True, the certificate and hostname will not be verified when trying to establish a TLS connection and Mailgun will accept any certificate during delivery.
o:deliverytimeDATEPICKER
OPTIONALDesired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future.
o:tracking-opensSELECT
OPTIONALToggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no.
v:my-varJSON
OPTIONALv: prefix followed by an arbitrary name allows to attach a custom JSON data to the message. See Attaching Data to Messages for more information.
h:X-My-HeaderSTRING
OPTIONALh: prefix followed by an arbitrary value allows to append a custom MIME header to the message (X-My-Header in this case).
o:dkimSELECT
OPTIONALEnables/disables DKIM signatures on per-message basis. Pass yes or no.
o:require-tlsSELECT
OPTIONALThis requires the message only be sent over a TLS connection. (True or False)
o:tracking-clicksSELECT
OPTIONALToggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly.
o:testmodeSELECT
OPTIONALEnables sending in test mode. Pass yes if needed. See Sending in Test Mode.
Request Snippet
unirest.post("https://MailGunzakutynskyV1.p.rapidapi.com/sendEmail")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("cc=undefined")
.send("bcc=undefined")
.send("o:tag=undefined")
.send("inline=undefined")
.send("text=undefined")
.send("html=undefined")
.send("subject=undefined")
.send("o:campaign=undefined")
.send("o:tracking=undefined")
.send("o:skip-verification=undefined")
.send("o:deliverytime=undefined")
.send("o:tracking-opens=undefined")
.send("v:my-var=undefined")
.send("h:X-My-Header=undefined")
.send("o:dkim=undefined")
.send("o:require-tls=undefined")
.send("o:tracking-clicks=undefined")
.send("o:testmode=undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response

loading...

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://MailGunzakutynskyV1.p.rapidapi.com/sendEmail")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("cc=undefined")
.send("bcc=undefined")
.send("o:tag=undefined")
.send("inline=undefined")
.send("text=undefined")
.send("html=undefined")
.send("subject=undefined")
.send("o:campaign=undefined")
.send("o:tracking=undefined")
.send("o:skip-verification=undefined")
.send("o:deliverytime=undefined")
.send("o:tracking-opens=undefined")
.send("v:my-var=undefined")
.send("h:X-My-Header=undefined")
.send("o:dkim=undefined")
.send("o:require-tls=undefined")
.send("o:tracking-clicks=undefined")
.send("o:testmode=undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard