cat <<'EOF' | curl -X POST \
-H 'Authorization: Bearer API TOKEN' \
-H 'Content-Type: application/json' \
https://staging-api.rebelmail.com/v0/emails -d @-
{
"email": {
"preview": true,
"campaignId": "581271fb29a10c001c076def",
"to": "kevin@rebelmail.com",
"from": "kevin@rebelmail.com",
"subject": "Example Subject",
"context": {
"rid": "%%emailaddr%%",
"customHeader": "",
"customFooter": "",
"gallery": {
"height": "400",
"width": "600",
"thumbHeight": "64",
"thumbWidth": "64",
"thumbBorder": "#333",
"thumbBorderSelected": "#0096d6",
"hasArrows": true,
"tooltip": {
"background": "#0096d6",
"color": "#000",
"border": "#ffffff",
"text": "Click thumbs for more images"
},
"images": [
{
"src": "http://dummyimage.com/600x600/ff6666/ffcccc&text=Image-1",
"href": "http://www.rebelmail.com",
},
{
"src": "http://dummyimage.com/600x600/ff6666/ffcccc&text=Image-2",
"href": "http://www.rebelmail.com",
}
],
"fallback": {
"type": "image",
"href": "",
"src": "http://dummyimage.com/600x600/ff6666/ffcccc&text=Fallback",
"width": "600",
"height": "600",
"alt": "Alt Text"
}
}
}
}
}
EOF