Send Email

API Query Parameters

The API accepts either a single dsid (DailyStory unique id) or a comma separated list of email addresses. If email query string parameter has a value, the dsid value will be ignored.

Any email addresses that are invalid or are attempted to be used for invalid contacts will be ignored.

JSON Body

Optionally include a JSON body with properties used to personalize the email.

{ "subject":"My new email subject", // optional to set a subject "from":"hello@example.com", // optional set a from address "confirmation_url":"https://example.com", // optional set a profile field "confirmation_code":"confirmation-38474" // optional set a profile field }

These fields are then accessible in the email. The following fields are reserved field and for a templated email that is sent these fields are usually already set.

For example:

Hello, your confirmation code is{{profile.confirmation_code}}.

It's also possible to send a subject or from with a personalization token, for example:

{ "subject":"Your id is {{@profile.custom_id}}" }

When the email is sent if the contact has a personalization field of custom_id it will automatically be inserted.  

Path Parameters
idnumberrequired
Id of the email to send
Query Parameters
dsidstring
The contact's dsid to send an email to.
emailstring
Comma separated list of email addresses
HTTP Response Examples
200
{ "Status": true, "Message": "Email sent", "Response": { "messageid": "20231127164859.ee81700d9b371f25@mg.dailystory.net" } }