Table of Contents:
Table of Contents minLevel 2
Intro
Info |
---|
The Transactional API gives you access to all your transactional mailing campaigns in your account. |
Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used.
Methods Summary
GET /api/transactional
Description
This method fetches a collection of transactional campaigns.
...
Optional int
limit
Optional int
POST /api/transactional
Description
This method creates a new transactional campaign.
...
The response will include a newly created transactional campaign array of fields.
PUT /api/transactional/<Transactional Campaign ID>
Description
This method updates an existing transactional campaign.
...
Code Block |
---|
// Request example { "name": "My Transactional", "description": "My first transactional campaign" } |
POST /api/transactional/send
Description
This method is used to send transactional message.
...
Code Block |
---|
{ "message_id": 168, "campaign_id": 213, "recipients": [ "email@email.com", "..." ], "check_status": true, "check_suppression": true } |
POST /api/transactional/send_embed_content
Description
This method is used to send a transactional message with embedded content (without message ID).
...
Code Block |
---|
{ "message": { "subject": "Hello!", "content_html" :"<html><body><p>This is my content</p></body></html>", "addresses": { "from_name": "John Doe", "from_address": "john@doe.com", "reply_address": "john@doe.com" } }, "campaign_id": 213, "recipients": [ "email@email.com", "..." ], "sending_connection_id": 1234 } |
POST /api/notify_transactions
Warning |
---|
This method is being deprecated, but we're continuing to support it for the long run. |
...
- 403 - Permission error
- 404 - Email/Campaign not found
DELETE /API/transactional/<Transactional Campaign ID>
Description
This method deletes a transactional campaign.
Additional Examples
Request Example - Transactional Send - Using specific transactional campaign and specific connection
...
Code Block |
---|
{ "mailing_id": 213, "recipients": [ "email@email.com", "..." ], / / You can use Molbile number with Country code (+1XXXXXXXXXX) as well in place of email address. "email_message": { "content_text": "SMS content", "addresses": [ { "from_name": "My name", "esp_connection_id": 1 } ] }, "distribution": [ { "esp_connection_id": 1, "domain": "default", "percent": 100 } ], "message_dynamic_fields": { "test": 234, "uid": 32431 }, "disable_unsubscribe": true } |
In the case of SMS Transactional campaigns; you can also use a mobile number with a country code if you want to send transactional SMS campaigns without adding contacts to the List.
Appendix
SMTPs that support Cc and Bcc
MailGun
Amazon SES
MailJet
mySMTP
Oracle Dyn (On Request)
SocketLabs
SparkPost
Sendgrid