Skip to main content

Webservices related to E-mails

The notion of e-mail campaign defines an e-mail communication, either customized or not, which will be sent to a selection of profiles.

There are two kinds of campaigns:

  • Mass campaigns: the campaign will be sent to the whole target population all at once
  • Continuous campaigns: the campaign will be activated in order to be individually sent over time (typically via scenario, but also entirely through API)

The available API calls related to e-mails enable you to:

Creating an e-mail campaign

It is possible to create a mass e-mail campaign in its entirety through the Actito webservices. To do so, it will be necessary to make several calls in successions in order to define the various creation steps of your campaigns. You will indeed need to follow a process similar to that of the creation of your campaign via the Actito interface.

It will be possible at any time to take over your campaign in the Actito interface.

Setting up a a one shot e-mail campaign

To create and send one shot e-mails entirely through the API, we invite to follow our Daily Newsletter use case on the Developers Portal!

Sending continuous campaigns

In contrary to mass e-mail campaigns, which are sent all at once, it is possible to program continuous sendings, which will allow ongoing e-mail sendings at a specific time for each profile.

Continuous campaigns work as a scenarized way in the sense that let you automate your e-mail sending on the basis of a trigger event. Unlike scenarios, which can be set up in Actito, the trigger event of continuous campaigns do not have to be defined in the interface. The e-mail sending will be directly triggered by a webservice call which you can program according to the purpose of your sending (for example, a welcome e-mail following a registration, a confimation e-mail following an order).

Activating a continuous campaign

A continuous sending should be created beforehands, exactly as explained in the previous operations. After that, it must be activated.

This is done through the operation PUT/entity/{e}/mail/{m}/activate

You will obtain the technical id of the sending as response and the campaign will be henceforth activated.

Contacting a profile with a continuous sending

When a profile fits the conditions determined by the purpose of your continuous sending, the later can be triggered through the operation POST/entity/{e}/mail/{p}/profile/{p}

Variables

This call lets you submit variables in direct relation to the purpose of your continuous sending (for example, a purchase amount in the case of an order confirmation). These variables should directly refer to a personalization that you included in your e-mail body. In contrary to mass e-mails, it is indeed not mandatory to define every personalization for continuous sendings. They can be "provided later", which means by the trigger event of the continuous e-mail.

Defining variables

In the body of your e-mail, variables should be defined like a normal personalization, which with the '$' symbol following by the personalization name between curly bracket (ex.: ${myVariable}).

In the API call, they should be provided as 'key-values' pairs, where "key" is the exact name of the personalization and where "values" stand for the value that the variable will take in the e-mail.

Example

curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" -d "[
{
\"key\": \"amount\",
\"values\": [
\"128\"
]
}
]
" "https://api-pre1.actito.com/v4/entity/actito/mail/203/profile/1147695"