Skip to main content

Create a triggered mail

Send a trigger for your triggered campaign to send a mail.

POST https://api.cm.com/bulkemail/v1.0/accounts/{accountID}/campaigns/{campaignID}/mails

POST Parameters​

NameInDescriptionRequiredTypeExample
AccountIDPathThe account guidTrueGUIDA8C062E4-ECFD-48D0-89B1-A37D2622B7A9
CampaignIDPathThe campaign guidTrueGUID77E6A0E6-0C92-4138-89BD-886EDF2ECC0D
BodyBodyThe mail to createTrueJson objectSee example request
X-CM-PRODUCTTOKENHeaderYour product tokenTrueGUIDC24A5029-37DD-4161-9728-F80D8639588E
Example request
{
"ToAddress": "[email protected]",
"ToName": "John Doe",
"Locale": "nl-NL",
"CustomerReference": "12345",
"CustomValues": [
{
"Field": "FirstName",
"Value": "John"
},
{
"Field": "LastName",
"Value": "Doe"
},
{
"Field": "Age",
"Value": "30"
}
],
"Attachments": [
{
"Content": "VGhpcyBpcyBhIGF3ZXNvbWUgdGV4dCBmaWxl",
"FileName": "info.txt"
}
]
}

Responses​

Http statusDescription
200Mail created
400Bad request
Example response
{
"ID": "dc62ece8-234b-496e-b5f7-0abbbbeaa99a",
"AccountID": "a8c062e4-ecfd-48d0-89b1-a37d2622b7a9",
"CampaignID": "77e6a0e6-0c92-4138-89bd-886edf2ecc0d",
"ToAddress": "[email protected]",
"ToName": "John Doe",
"Locale": "nl-NL",
"CustomerReference": "12345",
"CustomValues": [
{
"Field": "FirstName",
"Value": "John"
},
{
"Field": "LastName",
"Value": "Doe"
},
{
"Field": "Age",
"Value": "30"
}
],
"Attachments": null
}