{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/:site_id/campaigns","auth":"required","settings":"5c6d8979a96ba90033cbf5bb","results":{"codes":[]},"method":"post","examples":{"codes":[{"code":"{\n  \"campaign\": {\n    \"channel\": \"email\",\n    \"name\": \"My Campaign Name\",\n    \"max_send_rate\": 10000,\n    \"send_type\": \"broadcast\",\n    \"schedule\": \"2019-01-28T16:00:00.0Z\",\n    \"status\": \"draft\",\n    \"transactional_flag\": false,\n    \"campaign_codes\": {\n      \"ExampleName\": \"ExampleValue\",\n      \"ExampleName2\": \"ExampleValue2\"\n    },\n    \"campaign_tags\": [\"test\", \"tag test\"],\n    \"remove_duplicates\": true,\n    \"audience\": {\n    \t\"include\": [\n      \"Active\"\n    ],\n    \"exclude\": [\n      \"Slipping Away\",\n      \"New\"\n    ]\n    },\n    \"message_templates\": [\n      {\n        \"from\": \"<hello:::at:::boomtrain.com>\",\n        \"reply_to\": \"<[email protected]>\",\n        \"subject\": \"My Subject line\",\n        \"bcc\": \"\",\n        \"cc\": \"\",\n        \"tracking_params\": {\n          \"Type\": \"Store\"\n        },\n        \"message\": \"I am the email message. I can support HTML, including links and images. All text must be on one line, so be sure to space everything out using standard HTML and CSS commands. All double quotes must be replaced with single quotes so links look like this: <a href='http://xkcd.com'>funny webcomic</a>\"\n      }\n    ]\n  }\n}","language":"json"}]},"params":[{"name":"campaign.channel","type":"string","default":"'email'","desc":"set to: \"email\"","required":false,"in":"body","ref":"","_id":"575b25d51b12630e0083d352"},{"name":"campaign.audience.include","type":"array_string","default":"['All']","desc":"Segments to Include (must be valid)","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556fb3"},{"name":"campaign.audience.exclude","type":"array_string","default":"","desc":"Segments to Exclude (must be valid)","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556fb2"},{"name":"campaign.message_templates.from","type":"string","default":"","desc":"Sender From Address - Must be verified user","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556fb1"},{"name":"campaign.message_templates.from_name","type":"string","default":"","desc":"Sender From name","required":false,"in":"body","ref":"","_id":"5c740ccf2016b1005d932726"},{"name":"campaign.message_templates.reply_to","type":"string","default":"","desc":"The reply-to address for the email.","required":false,"in":"body","ref":"","_id":"5887af8ad9d79c3b00c4032c"},{"name":"campaign.message_templates.subject","type":"string","default":"","desc":"Subject line","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556faa"},{"name":"campaign.message_templates.bcc","type":"string","default":"","desc":"BCC option","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc282"},{"name":"campaign.message_templates.cc","type":"string","default":"","desc":"CC option","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc281"},{"name":"campaign.message_templates.link_tracking","type":"array_object","default":"","desc":"Name-value pairs for External Link Tracking","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc280"},{"name":"campaign.message_templates.message","type":"string","default":"","desc":"HTML String","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556fad"},{"name":"campaign.max_send_rate","type":"int","default":"","desc":"Maximum number of messages per hour.  Should greater than 0.","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc27f"},{"name":"campaign.remove_duplicates","type":"boolean","default":"","desc":"Removes duplicates by email address when using a non-email address user_id. (true/false)","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc27e"},{"name":"campaign.send_type","type":"string","default":"broadcast","desc":"set to: \"broadcast\"","required":true,"in":"body","ref":"","_id":"575b290057b1c00e00556fb7"},{"name":"campaign.schedule","type":"string","default":"","desc":"ISO 8601 Date Time (ex: '2019-01-28T16:00:00.0Z')","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556fb6"},{"name":"campaign.status","type":"string","default":"draft","desc":"Use \"active\" to immediately activate the campaign or \"draft\" to indicate an inactive draft campaign.","required":false,"in":"body","ref":"","_id":"5887af8ad9d79c3b00c4032d"},{"name":"campaign.transactional_flag","type":"boolean","default":"false","desc":"Setting this flag to True will ignore Inactive status on users. (true/false)","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc27d"},{"name":"campaign.name","type":"string","default":"","desc":"name of campaign","required":false,"in":"body","ref":"","_id":"575b290057b1c00e00556fb8"},{"name":"campaign.campaign_codes","type":"array_object","default":"","desc":"Name value pairs of campaign codes to be passed through to the event exports.","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc27c"},{"name":"campaign.campaign_tags","type":"array_string","default":"","desc":"Tags to include on the campaign.","required":false,"in":"body","ref":"","_id":"5c6d8ef872d41800308fc27b"},{"name":"Content-Type","type":"string","default":"application/json","desc":"Must be set to application/json","required":true,"in":"header","ref":"","_id":"588284cbb660480f00c0f292"},{"name":"Accept","type":"string","default":"application/json","desc":"Must be set to application/json","required":true,"in":"header","ref":"","_id":"588284cbb660480f00c0f291"},{"name":"site_id","type":"string","default":"","desc":"ZMP Site ID","required":false,"in":"path","ref":"","_id":"6059f1b9431451005edfbc39"}]},"next":{"description":"","pages":[]},"title":"Create Email Campaign","type":"endpoint","slug":"createupdate-campaign","excerpt":"Create a new email campaign","body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Required Headers\",\n    \"h-1\": \"Value\",\n    \"0-0\": \"Content-Type\",\n    \"1-1\": \"application/json\",\n    \"0-1\": \"application/json\",\n    \"1-0\": \"Accept\",\n    \"2-0\": \"Authorization\",\n    \"2-1\": \"Basic <Auth Key>\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","updates":[],"order":9,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5c6d8ef872d41800308fc27a","project":"56aff08c3a5b810d00745d99","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["56aff08d3a5b810d00745d9d","56aff24f3a5b810d00745da0","56aff25dbc304a0d00ace207","56aff287e0b1e40d00c53798","56aff2b260a37a0d00ed8883","56aff2b8e0b1e40d00c53799","56aff2bd5b1f01170014dc7b","56aff2c9d21e9c0d00b62993","56aff493aef9a21700da0e67","56aff4ce1486990d009c0f64","56aff4da5b1f01170014dc7d","56aff4dfe0b1e40d00c537a2","56aff4e59d32e30d0006d3e9","56aff4e91486990d009c0f65","56aff4f93a5b810d00745da2","56aff4fe9d32e30d0006d3ea","56b91c7ab1e03e0d001057c5","56c4f51aba4a540d0091b9a2","56cd09488c4a331d002c1e44","56d4ec4773dcd20b00fb8769","56e79bc515f96b2200878e54","56ec25c538ff1d2200d56cc2","56ec3a6f36bc8e0e00f190c8","56ec3e308ea7ce0e00a3d8b0","5724d8fe4255580e005938b2","5724dc842ad0bc1700122803","5776ef2a04f7500e0095dc37","57ab9f70b5e8742000e17eb9","57d7117646dcc30e007dd21f","58e6abd5b1eece19008b7d31","59288c65e2653627003e1221","5a8f4797a44f8600128e75ee","5bbf8833eb416300039a2c14","5ea811617bf4b5007328a0af"],"_id":"56aff08c3a5b810d00745d9c","project":"56aff08c3a5b810d00745d99","releaseDate":"2016-02-01T23:55:56.544Z","__v":34,"createdAt":"2016-02-01T23:55:56.544Z"},"category":{"sync":{"isSync":false,"url":""},"pages":["56ec26de1b16a3290030cf58"],"title":"Zeta REST API","slug":"bme-rest-api","order":2,"from_sync":false,"reference":true,"_id":"56ec25c538ff1d2200d56cc2","version":"56aff08c3a5b810d00745d9c","__v":1,"createdAt":"2016-03-18T15:59:01.460Z","project":"56aff08c3a5b810d00745d99"},"user":"5c6d878b750bf101764da244","createdAt":"2019-02-20T17:31:36.154Z","__v":6,"parentDoc":null}

postCreate Email Campaign

Create a new email campaign

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

site_id:
string
ZMP Site ID

Body Params

campaign.channel:
string'email'
set to: "email"
campaign.audience.include:
array of strings['All']
Segments to Include (must be valid)
campaign.audience.exclude:
array of strings
Segments to Exclude (must be valid)
campaign.message_templates.from:
string
Sender From Address - Must be verified user
campaign.message_templates.from_name:
string
Sender From name
campaign.message_templates.reply_to:
string
The reply-to address for the email.
campaign.message_templates.subject:
string
Subject line
campaign.message_templates.bcc:
string
BCC option
campaign.message_templates.cc:
string
CC option
campaign.message_templates.link_tracking:
array of objects
Name-value pairs for External Link Tracking
campaign.message_templates.message:
string
HTML String
campaign.max_send_rate:
integer
Maximum number of messages per hour. Should greater than 0.
campaign.remove_duplicates:
boolean
Removes duplicates by email address when using a non-email address user_id. (true/false)
campaign.send_type:
required
stringbroadcast
set to: "broadcast"
campaign.schedule:
string
ISO 8601 Date Time (ex: '2019-01-28T16:00:00.0Z')
campaign.status:
stringdraft
Use "active" to immediately activate the campaign or "draft" to indicate an inactive draft campaign.
campaign.transactional_flag:
booleanfalse
Setting this flag to True will ignore Inactive status on users. (true/false)
campaign.name:
string
name of campaign
campaign.campaign_codes:
array of objects
Name value pairs of campaign codes to be passed through to the event exports.
campaign.campaign_tags:
array of strings
Tags to include on the campaign.

Headers

Content-Type:
required
stringapplication/json
Must be set to application/json
Accept:
required
stringapplication/json
Must be set to application/json

Examples


Documentation

[block:parameters] { "data": { "h-0": "Required Headers", "h-1": "Value", "0-0": "Content-Type", "1-1": "application/json", "0-1": "application/json", "1-0": "Accept", "2-0": "Authorization", "2-1": "Basic <Auth Key>" }, "cols": 2, "rows": 3 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}