Email API
These instructions describe how to send emails using InTarget Email API
Please get in touch with [email protected] to get an access token
Make sure you comply with our Bounce and Complain Policies when using InTarget API
We could stop sendings in case your bounce rate would be >= 5% or complain rate >= 0.05%
Basic recommendations:
Implement a double opt-in strategy. When users sign up to receive email from you, send them a message with a confirmation link, and do not start sending them email until they confirm their address by clicking that link. A double opt-in strategy helps reduce the number of hard bounces resulting from typographical errors.
When collecting email addresses with a web-based form, perform minimal validation on those addresses upon submission.
Create an Email Template
https://api.intarget.app/rest/email-template/create?access-token=
Request Body:
{
"title": "Welcome Email",
"content": "<!DOCTYPE html>\r\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\"><head>\r\n <meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\">\r\n <meta name=\"viewport\" content=\"initial-scale=1.0\">\r\n <meta name=\"format-detection\" content=\"telephone=no\">\r\n <title>TITLE<\/title>\r\n \r\n <style type=\"text\/css\">\r\n body{ margin: 0; padding: 0; }\r\n img{ border: 0px; display: block; }\r\n\r\n .socialLinks{ font-size: 6px; }\r\n .socialLinks a{\r\n display: inline-block;\r\n }\r\n\r\n .long-text p{ margin: 1em 0px; }\r\n .long-text p:last-child{ margin-bottom: 0px; }\r\n .long-text p:first-child{ margin-top: 0px; }\r\n\r\n .unsubscribe-link{\r\n color: #000000;\r\n }\r\n <\/style>\r\n <style type=\"text\/css\">\r\n \/* yahoo, hotmail *\/\r\n .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div{ line-height: 100%; }\r\n .yshortcuts a{ border-bottom: none !important; }\r\n .vb-outer{ min-width: 0 !important; }\r\n .RMsgBdy, .ExternalClass{\r\n width: 100%;\r\n background-color: #3f3f3f;\r\n background-color: #3f3f3f}\r\n\r\n \/* outlook\/office365 add buttons outside not-linked images and safari have 2px margin *\/\r\n [o365] button{ margin: 0 !important; }\r\n\r\n \/* outlook *\/\r\n table{ mso-table-rspace: 0pt; mso-table-lspace: 0pt; }\r\n #outlook a{ padding: 0; }\r\n img{ outline: none; text-decoration: none; border: none; -ms-interpolation-mode: bicubic; }\r\n a img{ border: none; }\r\n\r\n @media screen and (max-width: 600px) {\r\n table.vb-container, table.vb-row{\r\n width: 95% !important;\r\n }\r\n\r\n .mobile-hide{ display: none !important; }\r\n .mobile-textcenter{ text-align: center !important; }\r\n\r\n .mobile-full{\r\n width: 100% !important;\r\n max-width: none !important;\r\n }\r\n }\r\n \/* previously used also screen and (max-device-width: 600px) but Yahoo Mail doesn't support multiple queries *\/\r\n <\/style>\r\n <style type=\"text\/css\">\r\n \r\n #ko_textBlock_6 .links-color a, #ko_textBlock_6 .links-color a:link, #ko_textBlock_6 .links-color a:visited, #ko_textBlock_6 .links-color a:hover{\r\n color: #3f3f3f;\r\n color: #ffc000;\r\n text-decoration: underline\r\n }\r\n \r\n #ko_doubleImageBlock_10 a, #ko_doubleImageBlock_10 a:link, #ko_doubleImageBlock_10 a:visited, #ko_doubleImageBlock_10 a:hover{\r\n color: #3f3f3f;\r\n color: #ffc000;\r\n text-decoration: underline\r\n }\r\n \r\n #ko_imageBlock_3 a, #ko_imageBlock_3 a:link, #ko_imageBlock_3 a:visited, #ko_imageBlock_3 a:hover{\r\n color: #3f3f3f;\r\n color: #ffc000;\r\n text-decoration: underline\r\n }\r\n <\/style>\r\n\r\n<style>\r\n@font-face {\r\n font-family: 'Inter var';\r\n font-weight: 100 900;\r\n font-display: swap;\r\n font-style: normal;\r\n font-named-instance: 'Regular';\r\n src: url(\"chrome-extension:\/\/neabdmkliomokekhgnogbeonopbjmajc\/content\/Inter-roman.var.woff2?v=3.19\") format(\"woff2\");\r\n}\r\n@font-face {\r\n font-family: 'Inter var';\r\n font-weight: 100 900;\r\n font-display: swap;\r\n font-style: italic;\r\n font-named-instance: 'Italic';\r\n src: url(\"chrome-extension:\/\/neabdmkliomokekhgnogbeonopbjmajc\/content\/Inter-italic.var.woff2?v=3.19\") format(\"woff2\");\r\n}\r\n<\/style><\/head>\r\n<!--[if !(gte mso 16)]-->\r\n<body bgcolor=\"#ffffff\" text=\"#f2f2f2\" alink=\"#cccccc\" vlink=\"#cccccc\" style=\"margin: 0; padding: 0; background-color: #ffffff; color: #f2f2f2;\" data-new-gr-c-s-check-loaded=\"14.1136.0\" data-gr-ext-installed=\"\"><!--<![endif]--><center>\r\n\r\n <table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_imageBlock_3\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-container\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 0px; border-spacing: 0px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr><td width=\"100%\" valign=\"top\" align=\"center\" class=\"links-color\"><!--[if (lte ie 8)]><div style=\"display: inline-block; width: 570px; -mru-width: 0px;\"><![endif]--><img border=\"0\" hspace=\"0\" align=\"center\" vspace=\"0\" width=\"570\" class=\"mobile-full\" style=\"border: 0px; display: block; vertical-align: top; height: auto; margin: 0 auto; color: #ffffff; font-size: 14px; font-family: Verdana, Geneva, sans-serif; width: 100%; max-width: 570px; height: auto;\" src=\"https:\/\/storage.intarget.app\/templates\/63872775e35c65.41619978.jpg?method=resize&width=570\"><!--[if (lte ie 8)]><\/div><![endif]--><\/td><\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n \r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_spacerBlock_11\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" height=\"24\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0; font-size: 1px; height: 1px; height: 24px;\">\r\n \r\n \r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_titleBlock_4\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-row\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 0px; border-spacing: 0px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr>\r\n <td align=\"center\" valign=\"top\" style=\"font-size: 0; padding: 0 9px;\"><div style=\"vertical-align: top; width: 100%; max-width: 552px; -mru-width: 0px;\"><!--\r\n --><table role=\"presentation\" class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px;\" width=\"552\">\r\n\r\n <tbody><tr>\r\n <td width=\"100%\" valign=\"top\" align=\"center\" style=\"font-weight: normal; color: #ffffff; font-size: 22px; font-family: Verdana, Geneva, sans-serif; text-align: center;\"><span style=\"font-weight: normal;\">ENJOY UP TO $1000<\/span><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_titleBlock_5\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-row\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 0px; border-spacing: 0px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr>\r\n <td align=\"center\" valign=\"top\" style=\"font-size: 0; padding: 0 9px;\"><div style=\"vertical-align: top; width: 100%; max-width: 552px; -mru-width: 0px;\"><!--\r\n --><table role=\"presentation\" class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px;\" width=\"552\">\r\n\r\n <tbody><tr>\r\n <td width=\"100%\" valign=\"top\" align=\"center\" style=\"font-weight: normal; color: #ffffff; font-size: 16px; font-family: Verdana, Geneva, sans-serif; text-align: center;\"><span style=\"font-weight: normal;\">WELCOME BONUS<\/span><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_textBlock_6\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"18\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-container\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 18px; border-spacing: 18px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr><td class=\"long-text links-color\" width=\"100%\" valign=\"top\" align=\"center\" style=\"font-weight: normal; color: #ffffff; font-size: 14px; font-family: Verdana, Geneva, sans-serif; text-align: center; line-height: normal;\"><p style=\"margin: 1em 0px; margin-top: 0px;\">Far far away, behind the word mountains, far from the countries <a href=\"\" style=\"color: #3f3f3f; color: #ffc000; text-decoration: underline;\">Vokalia and Consonantia<\/a>, there live the blind texts.<\/p>\r\n <p style=\"margin: 1em 0px; margin-bottom: 0px;\">Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.<\/p><\/td><\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_buttonBlock_7\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"18\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-container\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 18px; border-spacing: 18px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr>\r\n <td valign=\"top\" align=\"center\"><table role=\"presentation\" cellpadding=\"12\" border=\"0\" align=\"center\" cellspacing=\"0\" style=\"border-spacing: 0; mso-padding-alt: 12px 12px 12px 12px;\"><tbody><tr>\r\n <td width=\"auto\" valign=\"middle\" align=\"center\" bgcolor=\"#ffc000\" style=\"text-align: center; font-weight: normal; padding: 12px; padding-left: 14px; padding-right: 14px; background-color: #ffc000; color: #3f3f3f; font-size: 18px; font-family: Verdana, Geneva, sans-serif; border-radius: 10px;\"><a style=\"text-decoration: none; font-weight: normal; color: #3f3f3f; font-size: 18px; font-family: Verdana, Geneva, sans-serif;\" target=\"_new\" href=\"\">GET YOUR BONUS NOW<\/a><\/td>\r\n <\/tr><\/tbody><\/table><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_hrBlock_8\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-row\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 0px; border-spacing: 0px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr>\r\n <td align=\"center\" valign=\"top\" style=\"font-size: 0; padding: 0 9px;\"><div style=\"vertical-align: top; width: 100%; max-width: 552px; -mru-width: 0px;\"><!--\r\n --><table role=\"presentation\" class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px;\" width=\"552\">\r\n\r\n <tbody><tr>\r\n <td valign=\"top\" align=\"center\"><table role=\"presentation\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"border-spacing: 0; width: 100%;\"><tbody><tr>\r\n <td width=\"100%\" height=\"1\" style=\"padding: 0; font-size: 1px; line-height: 1px; max-height: 1px; width: 100%; background-color: #3f3f3f; line-height: 1px; max-height: 1px; overflow: hidden;\"> <\/td>\r\n <\/tr><\/tbody><\/table><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_doubleImageBlock_10\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n \r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"9\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-row\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 9px; border-spacing: 9px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr>\r\n <td align=\"center\" valign=\"top\" style=\"font-size: 0;\"><div style=\"width: 100%; max-width: 552px; -mru-width: 0px;\"><!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"552\"><tr><![endif]--><!--\r\n --><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><td align=\"left\" valign=\"top\" width=\"276\"><![endif]--><!--\r\n --><div class=\"mobile-full\" style=\"display: inline-block; vertical-align: top; width: 100%; max-width: 276px; -mru-width: 0px; min-width: calc(50%); max-width: calc(100%); width: calc(304704px - 55200%);\"><!--\r\n --><table role=\"presentation\" class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px; -yandex-p: calc(2px - 3%);\" width=\"276\" align=\"left\">\r\n\r\n <tbody>\r\n <tr><td width=\"100%\" valign=\"top\" align=\"center\" class=\"links-color\"><!--[if (lte ie 8)]><div style=\"display: inline-block; width: 258px; -mru-width: 0px;\"><![endif]--><img border=\"0\" hspace=\"0\" align=\"center\" vspace=\"0\" width=\"258\" style=\"border: 0px; display: block; vertical-align: top; height: auto; margin: 0 auto; color: #ffffff; font-size: 14px; font-family: Verdana, Geneva, sans-serif; width: 100%; max-width: 258px; height: auto;\" class=\"\" src=\"https:\/\/storage.intarget.app\/templates\/638727b23da9c4.37110624.jpeg?method=resize&width=258\"><!--[if (lte ie 8)]><\/div><![endif]--><\/td><\/tr>\r\n\r\n <\/tbody><\/table><!--\r\n --><\/div><!--[if (gte mso 9)|(lte ie 8)]><\/td><![endif]--><!--\r\n --><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><td align=\"left\" valign=\"top\" width=\"276\"><![endif]--><!--\r\n --><div class=\"mobile-full\" style=\"display: inline-block; vertical-align: top; width: 100%; max-width: 276px; -mru-width: 0px; min-width: calc(50%); max-width: calc(100%); width: calc(304704px - 55200%);\"><!--\r\n --><table role=\"presentation\" class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px; -yandex-p: calc(2px - 3%);\" width=\"276\" align=\"left\">\r\n\r\n <tbody>\r\n <tr><td width=\"100%\" valign=\"top\" align=\"center\" class=\"links-color\"><!--[if (lte ie 8)]><div style=\"display: inline-block; width: 258px; -mru-width: 0px;\"><![endif]--><img border=\"0\" hspace=\"0\" align=\"center\" vspace=\"0\" width=\"258\" style=\"border: 0px; display: block; vertical-align: top; height: auto; margin: 0 auto; color: #ffffff; font-size: 14px; font-family: Verdana, Geneva, sans-serif; width: 100%; max-width: 258px; height: auto;\" class=\"\" src=\"https:\/\/storage.intarget.app\/templates\/638727b3c602e7.16644971.jpeg?method=resize&width=258\"><!--[if (lte ie 8)]><\/div><![endif]--><\/td><\/tr>\r\n\r\n <\/tbody><\/table><!--\r\n --><\/div><!--[if (gte mso 9)|(lte ie 8)]><\/td><![endif]--><!--\r\n --><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/tr><\/table><![endif]--><\/div><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table><table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" style=\"background-color: #1E222D;\" id=\"ko_hrBlock_9\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1E222D\" width=\"570\" class=\"vb-row\" style=\"border-collapse: separate; width: 100%; background-color: #1E222D; mso-cellspacing: 0px; border-spacing: 0px; max-width: 570px; -mru-width: 0px;\">\r\n\r\n <tbody><tr>\r\n <td align=\"center\" valign=\"top\" style=\"font-size: 0; padding: 0 9px;\"><div style=\"vertical-align: top; width: 100%; max-width: 552px; -mru-width: 0px;\"><!--\r\n --><table role=\"presentation\" class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px;\" width=\"552\">\r\n\r\n <tbody><tr>\r\n <td valign=\"top\" align=\"center\"><table role=\"presentation\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"border-spacing: 0; width: 100%;\"><tbody><tr>\r\n <td width=\"100%\" height=\"1\" style=\"padding: 0; font-size: 1px; line-height: 1px; max-height: 1px; width: 100%; background-color: #3f3f3f; line-height: 1px; max-height: 1px; overflow: hidden;\"> <\/td>\r\n <\/tr><\/tbody><\/table><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table>\r\n\r\n\r\n <!-- footerBlock -->\r\n <table role=\"presentation\" class=\"vb-outer\" width=\"100%\" cellpadding=\"0\" border=\"0\" cellspacing=\"0\" bgcolor=\"#1d232e\" style=\"background-color: #1d232e;\" id=\"ko_footerBl_2\">\r\n <tbody><tr><td class=\"vb-outer\" align=\"center\" valign=\"top\" style=\"padding-left: 9px; padding-right: 9px; font-size: 0;\">\r\n <!--[if (gte mso 9)|(lte ie 8)]><table role=\"presentation\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"570\"><tr><td align=\"center\" valign=\"top\"><![endif]--><!--\r\n --><div style=\"margin: 0 auto; max-width: 570px; -mru-width: 0px;\"><table role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 0px; border-spacing: 0px; max-width: 570px; -mru-width: 0px;\" width=\"570\" class=\"vb-row\">\r\n\r\n <tbody><tr>\r\n <td align=\"center\" valign=\"top\" style=\"font-size: 0; padding: 0 9px;\"><div style=\"vertical-align: top; width: 100%; max-width: 552px; -mru-width: 0px;\"><!--\r\n --><table class=\"vb-content\" border=\"0\" cellspacing=\"9\" cellpadding=\"0\" style=\"border-collapse: separate; width: 100%; mso-cellspacing: 9px; border-spacing: 9px;\" width=\"552\">\r\n\r\n <tbody><tr>\r\n <td class=\"long-text links-color\" width=\"100%\" valign=\"top\" align=\"center\" style=\"font-weight: normal; color: #919191; font-size: 13px; font-family: Arial, Helvetica, sans-serif; text-align: center;\"><p style=\"margin: 1em 0px; margin-bottom: 0px; margin-top: 0px;\"> <a style=\"color: #ffffff\" href=\"{unsubscribeUrl}\">Unsubscribe<\/a><\/p><\/td>\r\n <\/tr>\r\n <\/tbody><\/table><\/div><\/td>\r\n <\/tr>\r\n\r\n <\/tbody><\/table><\/div><!--\r\n --><!--[if (gte mso 9)|(lte ie 8)]><\/td><\/tr><\/table><![endif]-->\r\n <\/td><\/tr>\r\n <\/tbody><\/table>\r\n <!-- \/footerBlock -->\r\n\r\n<\/center><!--[if !(gte mso 16)]-->\r\n<\/body><!--<![endif]--><grammarly-desktop-integration data-grammarly-shadow-root=\"true\"><\/grammarly-desktop-integration><\/html>"
}
title — template title — required
content — HTML content for your template — required
Each email template must contain {unsubscribeUrl} variable
Response Body:
{"id":977}
Before sending it in a JSON field, you must encode the HTML to ensure it doesn't interfere with the JSON structure. This typically involves converting special characters to their corresponding Unicode escape sequences.
Send an Email
https://api.intarget.app/rest/email-message/send?access-token=
Request Body:
{
"templateId": 977,
"type": 1,
"email": "[email protected]",
"subject": "Hi, {name}",
"externalVariables": {
"name": "John"
}
}
templateId — template ID created by API or using InTarget email builder — required
type — Email type — optional
1 — promotional (by default)
2 — transactional
email — valid Email address — required
subject — Email subject — required
externalVariables — add any external variables like {name} to your Email template or subject — optional
Response Body:
{
"data": true
}
Statistics for API sendings
https://api.intarget.app/rest/email-message/statistics?from=2023-11-08%2000:00:00&to=2023-11-09%2000:00:00&templateId=977&access-token=
Response Body:
{
"sent": 10,
"delivered": 9,
"opened": 7,
"clicked": 3,
"bounced": 1,
"complaint": 0,
"rejected": 0,
"unsubscribed": 0,
"failed": 0,
"temporaryFailed": 0,
"skipped": 0
}
Last updated
Was this helpful?