{"openapi":"3.1.0","info":{"title":"Campaign Templates","version":"2.0.0"},"x-readme":{"headers":[],"explorer-enabled":true,"proxy-enabled":true},"x-readme-fauxas":true,"x-samples-languages":["curl","csharp","java","javascript","node","python","php","ruby"],"externalDocs":{"description":"Learn more about Dotdigital APIs","url":"https://developer.dotdigital.com"},"servers":[{"url":"https://{region}-api.dotdigital.com","variables":{"region":{"default":"r1","enum":["r1","r2","r3"],"description":"The Dotdigital region id your account belongs to"}}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/v2/templates":{"parameters":[{"in":"header","name":"x-ddg-integration-token","required":false,"description":"If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here.","schema":{"type":"string","pattern":"/^(?:\\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\\}{0,1})$/","example":"5a96bc79-19a7-4544-973b-e2da0c9136f9"}}],"post":{"summary":"Create template","deprecated":false,"description":"Creates an email campaign template","operationId":"create-template","tags":["Campaign Templates"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","subject","fromName","htmlContent","plainTextContent"],"properties":{"name":{"type":"string","description":"The name of the template being created"},"subject":{"type":"string","description":"The email subject line of the template"},"fromName":{"type":"string","description":"The from name of the template"},"htmlContent":{"type":"string","description":"The HTML content of the template"},"plainTextContent":{"type":"string","description":"The plain text content of the template"}}},"examples":{"Request Example":{"value":{"name":"New product promotion 2","subject":"New product!","fromName":"Company name","htmlContent":"\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>","plainTextContent":"\r\n\n---\r\nWant to unsubscribe? $UNSUB$"},"summary":"Request Example"}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","default":0,"examples":[4]},"name":{"type":"string","examples":["New product promotion 2"]},"subject":{"type":"string","examples":["New product!"]},"fromName":{"type":"string","examples":["Company name"]},"htmlContent":{"type":"string","examples":["\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>"]},"plainTextContent":{"type":"string","examples":["\r\n\n---\r\nWant to unsubscribe? $UNSUB$"]},"replyAction":{"type":"string","examples":["Unset"]},"replyToAddress":{"type":"string","examples":[""]}}},"examples":{"Result":{"summary":"Result","value":{"id":4,"name":"New product promotion 2","subject":"New product!","fromName":"Company name","htmlContent":"\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>","plainTextContent":"\r\n\n---\r\nWant to unsubscribe? $UNSUB$","replyAction":"Unset","replyToAddress":""}}}}}}}},"get":{"summary":"Get templates","deprecated":false,"description":"Gets a list of all email campaign templates","operationId":"get-templates","tags":["Campaign Templates"],"parameters":[{"name":"select","in":"query","description":"The number of records to select between 1 and 1000","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"skip","in":"query","description":"The numbers of records to skip in the result set","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","default":0,"examples":[1]},"name":{"type":"string","examples":["Monthly newsletter Dec 2015"]},"subject":{"type":"string","examples":["Monthly newsletter"]},"fromName":{"type":"string","examples":["Company name"]},"htmlContent":{},"plainTextContent":{},"replyAction":{"type":"string","examples":["Unset"]},"replyToAddress":{}}}},"examples":{"Result":{"summary":"Result","value":[{"id":1,"name":"Monthly newsletter Dec 2015","subject":"Monthly newsletter","fromName":"Company name","htmlContent":null,"plainTextContent":null,"replyAction":"Unset","replyToAddress":null},{"id":2,"name":"Financial update","subject":"Financial update","fromName":"Company name","htmlContent":null,"plainTextContent":null,"replyAction":"Unset","replyToAddress":null},{"id":3,"name":"New product promotion","subject":"New product!","fromName":"Company name","htmlContent":null,"plainTextContent":null,"replyAction":"WebMailForward","replyToAddress":"shop@company-name123.com"}]}}}}}}}},"/v2/templates/{id}":{"parameters":[{"in":"header","name":"x-ddg-integration-token","required":false,"description":"If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here.","schema":{"type":"string","pattern":"/^(?:\\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\\}{0,1})$/","example":"5a96bc79-19a7-4544-973b-e2da0c9136f9"}}],"get":{"summary":"Get template by id","deprecated":false,"description":"Gets an email campaign template by id","operationId":"get-template-by-id","tags":["Campaign Templates"],"parameters":[{"name":"id","in":"path","description":"The id of the email campaign template","required":true,"example":0,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","default":0,"examples":[1]},"name":{"type":"string","examples":["New product promotion"]},"subject":{"type":"string","examples":["New product!"]},"fromName":{"type":"string","examples":["Company name"]},"htmlContent":{"type":"string","examples":["\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>"]},"plainTextContent":{"type":"string","examples":["\r\n\n---\r\nWant to unsubscribe? $UNSUB$"]},"replyAction":{"type":"string","examples":["WebMailForward"]},"replyToAddress":{"type":"string","examples":["shop@company-name123.com"]}}},"examples":{"Result":{"summary":"Result","value":{"id":1,"name":"New product promotion","subject":"New product!","fromName":"Company name","htmlContent":"\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>","plainTextContent":"\r\n\n---\r\nWant to unsubscribe? $UNSUB$","replyAction":"WebMailForward","replyToAddress":"shop@company-name123.com"}}}}}}}},"put":{"summary":"Update template","deprecated":false,"description":"Creates an email campaign template","operationId":"update-template","tags":["Campaign Templates"],"parameters":[{"name":"id","in":"path","description":"The id of the template being updated","required":true,"example":0,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","subject","fromName","htmlContent","plainTextContent"],"properties":{"name":{"type":"string","description":"The name of the template being created"},"subject":{"type":"string","description":"The email subject line of the template"},"fromName":{"type":"string","description":"The from name of the template"},"htmlContent":{"type":"string","description":"The HTML content of the template"},"plainTextContent":{"type":"string","description":"The plain text content of the template"}}},"examples":{"Request Example":{"value":{"name":"New product promotion","subject":"New product!","fromName":"Company name","htmlContent":"\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>","plainTextContent":"\r\n\n---\r\nWant to unsubscribe? $UNSUB$"},"summary":"Request Example"}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","default":0,"examples":[4]},"name":{"type":"string","examples":["New product promotion 2"]},"subject":{"type":"string","examples":["Brand new product released!"]},"fromName":{"type":"string","examples":["Company name"]},"htmlContent":{"type":"string","examples":["\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>"]},"plainTextContent":{"type":"string","examples":["\r\n\n---\r\nWant to unsubscribe? $UNSUB$"]},"replyAction":{"type":"string","examples":["Unset"]},"replyToAddress":{"type":"string","examples":[""]}}},"examples":{"Result":{"summary":"Result","value":{"id":4,"name":"New product promotion 2","subject":"Brand new product released!","fromName":"Company name","htmlContent":"\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n<tbody>\r\n<tr>\r\n<td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n<tbody>\r\n<tr>\r\n<td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n<tbody>\r\n<tr>\r\n<td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>","plainTextContent":"\r\n\n---\r\nWant to unsubscribe? $UNSUB$","replyAction":"Unset","replyToAddress":""}}}}}}}}}}}