Embarke Web API (REST)

Using the Embarke Web API (REST)
To send your transactional email through the Embarke Web API, we provide an emulation of the SendGrid Web API for email.

Refer to the SendGrid documentation for the format and parameters here:
SendGrid Web API for Email documentation

Embarke supports this as documented, as well as some additional headers you can set.

The endpoint for our emulated Web API (for mail) is:

Instead of your SendGrid credentials, you’ll use your Embarke Account ID and Account Key for the parameters “api_user” and “api_key”.
These are available from the Settings page in the dashboard by clicking the Configure SMTP link under SMTP Configuration.

Controlling Time Optimization
You can use the “headers” parameter as documented by SendGrid to control our time optimization features as follows:
Add a header called “x-embarkeapi”, with a JSON formatted value as follows:

You can specify a date/time to schedule a message, a delivery window that we can optimize in (from 0 hours to 7 days), and tag the message (for reporting purposes). The format is as follows:

   x-embarkeapi:{ "sendDate": "2013-05-26T18:00Z", 
                  "maxSendHours": 24, 
                  "campaignId": "My Campaign",
                  "mailAccount": "esp-account-username",
                  "tags": ["My custom tag1", "My tag 2", ...] }

sendDate is the scheduled time to start in ISO8601 format (e.g. 2013-10-06T11:30Z)

maxSendHours is the longest window within which Embarke can try to optimize the message. To send without optimizing, just use a maxSendHours value of 0. 0 – 168 hours is the valid range (up to 7 days), 24 hours is the default.

campaignId (optional) – use this to group a set of messages into a single campaign mailing for reporting.

mailAccount (optional) – used when you have more than one account configured with your ESP. This parameter lets you specify which account should be used to deliver the email. The value is the account name/ID from your ESP.

tags (optional) is one or more identifiers for the type of message (used for reporting), such as “Newsletter”, “Promotion”, “Welcome mail”, etc.