Create a Triggered Mail
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
Name | In | Description | Required | Type | Example |
---|---|---|---|---|---|
AccountID | Path | The account guid | True | GUID | A8C062E4-ECFD-48D0-89B1-A37D2622B7A9 |
CampaignID | Path | The campaign guid | True | GUID | 77E6A0E6-0C92-4138-89BD-886EDF2ECC0D |
Body | Body | The mail to create | True | Json object | See example request |
X-CM-PRODUCTTOKEN | Header | Your product token | True | GUID | C24A5029-37DD-4161-9728-F80D8639588E |
{
"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 status | Description |
---|---|
200 | Mail created |
400 | Bad request |
{
"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
}
Updated 9 months ago