Asset Model Examples
Use these examples to created basic HTML paste and template-based emails.
When pasting HTML into the content attribute, HTML contains certain reserved chars that need to be escaped in JSON. Run the HTML through a JSON escape tool first to ensure that the HTML is valid in the JSON payload.
HTML Paste Email Example
{
"name": "my first message",
"channels": {
"email": true,
"web": false
},
"views": {
"html": {
"content": "<!DOCTYPE html><body>This is a simple html paste email.</body></html>"
},
"text": {},
"subjectline": {},
"preheader": {}
},
"assetType": {
"name": "htmlemail",
"id": 208
}
}Simple Template Based Email Example
Complex Template Based Email Example
Character encoding in data.email.options.characterEncoding can be one of the following:
- utf-8
- us-ascii
- shift_jis
- EUC-KR
- iso-8859-1
- iso-8859-2
- iso-8859-6
- iso-8859-11
- big5
- koi8-r
- iso-2022-jp
- GB2312