Send emails via API
Overview
The transactional email send endpoint is used to submit requests for sending transactional email messages in Ortto's customer data platform (CDP).
This page provides descriptions of this endpoint:
HTTP method and request resources
Requests to send transactional email messages in Ortto are submitted as a single POST method to the following URL:
POST https://api.ap3api.com/v1/transactional/send
NOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
Path and query parameters
This endpoint takes no additional path and/or query parameters.
Headers
This endpoint requires a custom API key and content type (
application/json
for the request body) in the header of the request:
X-Api-Key: CUSTOM-PRIVATE-API-KEY
Content-Type: application/json
Request body
The request body consists of a JSON object with the valid elements listed in the table below. The following JSON objects are examples of requests to send transactional emails in your Ortto account’s CDP.
Single send transactional email to a single person
json
{ "asset": { "from_email": "jenny@ortto.com", "from_name": "Jenny Spencer", "reply_to": "sandra@ortto.com", "cc": [ "help@ortto.com" ], "subject": "Booking confirmation for {{ people.first-name }}", "email_name": "confirm-booking", "no_click_tracks": false, "no_opens_tracks": false, "html_body": "<html></html>", "liquid_syntax_enabled": true }, "emails": [{ "fields": { "bol::sp": true, "str::email": "chris@ortto.com", "str::first": "Chris", "str::last": "Sharkey", "str::soi-ctx": "API (Booking confirmation)" }, "location": null } ], "merge_by": [ "str::email" ], "merge_strategy": 2, "find_strategy": 0, "skip_non_existing": false }
Single transactional email to multiple people
json
{ "asset": { "from_email": "jenny@ortto.com", "from_name": "Jenny Spencer", "cc": [ "help@ortto.com" ], "subject": "Confirm that you still want to hear from us, {{ people.first-name }}", "email_name": "confirm-subscription", "no_click_tracks": false, "no_opens_tracks": false, "html_body": "<html></html>", "liquid_syntax_enabled": true }, "emails": [{ "fields": { "str::email": "chris+test1@ortto.com", "str::first": "Chris1", "str::last": "Test1", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } }, { "fields": { "str::email": "chris+test2@ortto.com", "str::first": "Chris2", "str::last": "Test2", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } }, { "fields": { "str::email": "chris+test3@ortto.com", "str::first": "Chris3", "str::last": "Test3", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } }, { "fields": { "str::email": "chris+test4@ortto.com", "str::first": "Chris4", "str::last": "Test4", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } } ], "merge_by": [ "str::email" ], "merge_strategy": 2, "find_strategy": 0, "skip_non_existing": false }
Different transactional emails to multiple people
json
{ "asset": { "from_email": "jenny@ortto.com", "from_name": "Jenny Spencer", "cc": [ "help@ortto.com" ], "subject": "Confirm that you still want to hear from us, {{ people.first-name }}", "email_name": "confirm-subscription", "no_click_tracks": false, "no_opens_tracks": false, "html_body": "<html></html>", "liquid_syntax_enabled": true }, "emails": [{ "fields": { "str::email": "chris+test1@ortto.com", "str::first": "Chris1", "str::last": "Test1", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } }, { "fields": { "str::email": "chris+test2@ortto.com", "str::first": "Chris2", "str::last": "Test2", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } }, { "fields": { "str::email": "chris+test3@ortto.com", "str::first": "Chris3", "str::last": "Test3", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" } }, { "fields": { "str::email": "chris+override@ortto.com", "str::first": "Chris4", "str::last": "Override", "bol::sp": true, "str::soi-ctx": "API (Subscription confirmation)" }, "asset": { "from_email": "override@ortto.com", "from_name": "Override Department", "subject": "An overridden subject for you, {{ people.first-name }}", "email_name": "confirm-subscription-override", "no_click_tracks": false, "no_opens_tracks": false, "html_body": "<html></html>", "liquid_syntax_enabled": true } } ], "merge_by": [ "str::email" ], "merge_strategy": 2, "find_strategy": 0, "skip_non_existing": false }
Including an attachment
Ortto’s transactional email API supports up to five attachments per email. Each attachment must be base64 encoded and include the correct MIME type. Below is a simple example of sending an image as an attachment:
javascript
{ "asset": { "from_email": "steve.spencer@ortto.com", "from_name": "Steve Spencer", "subject": "IMPORTANT: a picture ", "email_name": "confirm-booking", "no_click_tracks": false, "no_opens_tracks": false, "html_body": "<html></html>", "liquid_syntax_enabled": true, "attachments": [ { "filename": "ortto.png", "content_type": "image/png", "content": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACAKADAAQAAAABAAACAAAAAAAL+LWFAAAoqElEQVR4Ae3de6xsV1kA8EMBQbEoaS0iBhCwRR7xEcRE0WIBRUMQxX8EISjiW9TEV6ImKqjgg0T/QCMixESMKIiiJqK2ty1iNBiVh4IKlIcIFeRRiQgIfl9vt/fc6bln9sxea+299vxW8t2ZOTN7PX5r7e+sO69zdKQQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBOoLfDyaqB0PqD+MIi38SAOLlxXpqUoIdChwUYd91mUCBAgQIEBgooANwERAhxMgQIAAgR4FbAB6nDV9JkCAAAECEwVsACYCOpwAAQIECPQoYAPQ46zpMwECBAgQmChgAzAR0OEECBAgQKBHARuAHmdNnwkQIECAwEQBG4CJgA4nQIAAAQI9CtgA9Dhr+kyAAAECBCYK2ABMBHQ4AQIECBDoUcAGoMdZ02cCBAgQIDBRwAZgIqDDCRAgQIBAjwI2AD3Omj4TIECAAIGJAjYAEwEdToAAAQIEehSwAehx1vSZAAECBAhMFLABmAjocAIECBAg0KOADUCPs6bPBAgQIEBgooANwERAhxMgQIAAgR4FbAB6nDV9JkCAAAECEwVsACYCOpwAAQIECPQoYAPQ46zpMwECBAgQmChgAzAR0OEECBAgQKBHARuAHmdNnwkQIECAwESB20083uG7CVwWD79iIy6J2xdvRNw8umkj3hO337ARN8ZthQABAnMKyGtz6k9o+zYTjnXodoH8ZX9VxMMjroy4NKJkeXdUdibi6lsiNwhK3wIfb9D9l0Ub72/QztQmHhAVfP7USrYc/29x/zVbHtPy7ie2bGzPtuS1PeGWdpgNQNkZyZdU8hf+EyK+IuIzIlqWd0RjL4/4rYjcFHwsQjlZIP/X8uCI+0Tc+5a4R1zmszF3OhY5pyXLtnOuxQag5HjUVVZg2/oo29q42uS1cU4edaAC949xPzPibRGZwJcQ2ZfsU/ZNOTq6ayA8JeIF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gQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgVsJ/B+u7ewtj7bD5wAAAABJRU5ErkJggg==" } ] }, "emails": [{ "fields": { "bol::sp": true, "str::email": "chris@ortto.com", "str::first": "Chris", "str::last": "Sharkey", "str::soi-ctx": "API (Booking confirmation)" }, "location": null } ], "merge_by": [ "str::email" ], "merge_strategy": 2, "find_strategy": 0, "skip_non_existing": false }
Passing JSON object data
When sending a transactional email through Ortto's API, you can include a JSON object in the request body and use its values in the email content. This data can be applied at either the contact level or the campaign level.
Learn more about passing JSON object data in transactional emails.
Valid request body elements:
Element
Description
from_email
The from email can be anything, but ideally should be from a custom domain which you have configured in Ortto to send email from. If you send from a domain you have registered the deliverability rate will be higher. If you use a different domain, it will be sent via "autopilotmail2.io".
from_name
This can be any name you like.
reply_to
The reply to email can be any email address you like.
cc
Carbon copy is optional, and is an array of email addresses you’d like a copy of each email to be sent to. This can be used if you need to keep an official record of all correspondence sent to a particular address, but usually you can just leave this out.
An email can only support up to 5 CC or BCC email addresses.
subject
The subject of the email.
email_name
This is a name you’ll use in Ortto to identify this email for filtering and reporting reasons. So make it is something that is easy to uniquely identify and associate with this email.
no_click_tracks
By default we will generate "Email clicked" activities for any links clicked in your transactional emails. This means that Ortto will rewrite the URLs of you links to go through a redirect before the customer reaches your URL. The user won’t notice as this happens quickly, but sometimes customers like to disable this feature so the URLs are not changed. This is done either because they have a very specific URL structure, or they are concerned about deliverability. Setting
no_click_tracks
totrue
will mean Ortto will not rewrite the links in your email.
no_open_tracks
If you set
no_open_tracks
totrue
, we will not include our tracking pixel in the email. This will mean that "Email opened" activities will not be generated in Ortto, and you won’t be able to report or filter on those as a consequence. However, removing the tracking pixel may help with the deliverability of your email given its transactional nature.
html_body
This is the HTML body for your email. You are required to provide the full email content here. This can be anything you like and it is up to you to make sure that the HTML is valid for as many email clients as you can, and test it to see that it renders correctly before sending to real customers. Because this is transactional email, you are not required to include an {{ unsubscribe }} link, but you can include this if you would like to. You can use any and all Ortto Liquid syntax in the email as long as the
liquid_syntax_enabled
option is set totrue
.
liquid_syntax_enabled
If this is set to
false
, Liquid tags will be ignored. Otherwise, they will be processed as in all Ortto emails. See our guide to Liquid syntax in emails for a list of how to use these correctly.Because Liquid syntax is enabled by default,
liquid_syntax_enabled
is not required in the request if the value is set totrue
(though there is no harm in including it).
campaign_id
This allows you to use a draft or sent Ortto email template for the email. This is for single-send email campaigns only, and not for journey or playbook email assets.
The
campaign_id
value is found in the campaign URL, which you need to collect from the Ortto app. It is then added to the API request body atasset
. If usingcampaign_id
, you do not need to include otherasset
objects in the API request body, however you can include them to override those campaign values.Learn more about
campaign_id
under Using a campaign ID.
asset_id
This allows you to use a draft or published Ortto email asset for the email. This is for assets only, whether attached or unattached to a journey or playbook, and is not for single-send email campaigns.
The
asset_id
value is found in the asset URL, which you need to collect from the Ortto app. It is then added to the API request body atasset
. If usingasset_id
, you do not need to include otherasset
objects in the API request body, however you can include them to override those campaign values.Learn more about
asset_id
under Using an asset ID.
merge_by
The
merge_by
element’s array allows up to three field ID values that specify the person fields used to determine whether the people’s records are either created or updated in your Ortto account’s CDP.Learn more about merge strategies.
find_strategy
The
find_strategy
determines how the merge_by fields are used in finding existing people to merge with.If find_strategy" is not specified in the request, then the default value of `0 ([any]) is used.
Learn about the different options in find strategy.
NOTE: In addition to using the email HTML, transactional emails can also be sent using campaign and asset IDs for existing messages on the account.
Learn more about asset options for transactional emails using a campaign ID and using an asset ID.
Response payload
When a request is successful, the payload will return information regarding the status of the email and corresponding contact.
json
{ "emails": [ { "person_id": "00648cc3be9a88b79dcf1700", "contact_status": "merged", "email_status": "queued", "message_id": "50679958ae9e6bee13835958", "email_name": "confirm-booking" } ] }