{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/mandrill/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"type":"markdown"},"seo":{"title":"Messages Calls","siteUrl":"https://dev.mailjet.com/","projectTitle":"Mailjet Developer Documentation","description":"Migrate Mandrill messages/send.json to Mailjet’s Send API. Covers single and templated transactional sends with code samples in Python, Go, PHP, and Node.js.","image":"https://dev.mailjet.com/og-image.png","lang":"en-US","keywords":["Mailjet API","Email API","Content API","SMTP Relay","transactional email","email delivery","Send API","email templates","developer documentation"],"meta":[{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Mailjet Developer Documentation"},{"name":"twitter:card","content":"summary_large_image"},{"name":"robots","content":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"},{"name":"googlebot","content":"index, follow, max-snippet:-1, max-image-preview:large"}],"jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://dev.mailjet.com/#organization","name":"Mailjet","alternateName":"Sinch Mailjet","url":"https://www.mailjet.com","logo":"https://assets.mailjet.com/lib/images/mailjetLogo/mj_logo_with_text_color.png","parentOrganization":{"@type":"Organization","name":"Sinch","url":"https://www.sinch.com"}},{"@type":"WebSite","@id":"https://dev.mailjet.com/#website","name":"Mailjet Developer Documentation","description":"Official developer documentation for the Mailjet Email API, Content API and SMTP Relay.","url":"https://dev.mailjet.com/","inLanguage":"en-US","publisher":{"@id":"https://dev.mailjet.com/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://dev.mailjet.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]},"llmstxt":{"hide":false,"title":"Mailjet Developer Documentation","description":"Developer documentation for the Mailjet Email API, Content API and SMTP Relay - guides, API references and code samples for sending, templating and tracking email at scale.","details":{"content":"Mailjet (part of Sinch) provides APIs for sending and managing email.\n\nThis documentation covers four main areas:\n\n- **Email API** - the Send API (v3 and v3.1) for transactional and marketing email,\n  plus contact management, segmentation, campaigns, statistics, webhooks, the Parse API\n  and the Mailjet Templating Language.\n- **Content API** - programmatic management of email templates, template contents,\n  images, labels and authentication tokens (v1).\n- **SMTP Relay** - sending through Mailjet's SMTP servers, including custom headers.\n- **API Reference** - the complete, generated reference for every endpoint, built directly\n  from the OpenAPI specifications.\n\nBase URL for all REST APIs: `https://api.mailjet.com`.\nAuthentication uses HTTP Basic auth with an API key and secret key.\n\n## Machine-readable entry points\n\nPrefer these when you need the API surface in as few requests as possible:\n\n- `/openapi/openapi-mailjet.md` - the **complete** Email API reference (every endpoint,\n  grouped by resource) as a single Markdown document.\n- `/openapi/openapi-passport.md` - the **complete** Content API reference as a single\n  Markdown document.\n- `/_bundle/openapi/openapi-mailjet.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Email API.\n- `/_bundle/openapi/openapi-passport.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Content API.\n- `/sitemap.xml` - every indexable URL on this site.\n\nEvery page on this site is also available as clean Markdown by appending `.md` to its URL."},"sections":[{"title":"Email API","description":"Sending, contacts, campaigns, statistics, webhooks and templating.","includeFiles":["docs/email-api/**/*.md"],"excludeFiles":[]},{"title":"Content API","description":"Manage templates, template contents, images, labels and tokens.","includeFiles":["docs/content-api/**/*.md","docs/content-api.md"],"excludeFiles":[]},{"title":"SMTP Relay","description":"Send email through Mailjet's SMTP servers.","includeFiles":["docs/smtp-relay/**/*.md"],"excludeFiles":[]},{"title":"API Reference","description":"Complete generated reference for every Mailjet API endpoint.","includeFiles":["openapi/openapi-mailjet.yaml","openapi/openapi-passport.yaml","docs/api-reference/**/*.md"],"excludeFiles":[]},{"title":"Migrating from Mandrill","description":"Guides for switching from Mandrill to Mailjet.","includeFiles":["docs/mandrill/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]},"priority":0.3},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"messages-calls","__idx":0},"children":["Messages Calls"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"introduction","__idx":1},"children":["Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is a key part of both APIs, since it is from here that you will be able to trigger transactional email."," ","The key Mailjet API resources in that section are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/send/message"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/messages/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/message"]}]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mailjet's Send API allows you to send transactional emails using our HTTP API, using POST requests. This solution is aimed at users needing a programmatically way to send messages."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send API allows you to send single messages but also to mutualise the calls by leveraging templating and personalization of the content."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API will return a simple response indicating if the message is ready to be processed by the Mailjet system. This makes the error management on your side simple and efficient."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Our Send API offers templating features, similar to the Mandrill one. Please refer to our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/email-api/send-api-v31/send-basic-email/"},"children":["dedicated API guide"]}," here."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"send","__idx":2},"children":["Send"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /messages/send.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from mailjet import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\ndata = {\n\t'FromEmail': 'pilot@mailjet.com',\n\t'FromName': 'Mailjet Pilot',\n\t'Subject': 'Your email flight plan!',\n\t'Text-part': 'Dear passenger, welcome to Mailjet! May the delivery force be with you!',\n\t'Html-part': '<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!',\n\t'Recipients': [{'Email':'passenger@mailjet.com'}]\n}\nresult = mailjet.send.create(data=data)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nThis calls sends an email to one recipient.\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\temail := &MailjetSendMail {\n      FromEmail: \"pilot@mailjet.com\",\n      FromName: \"Mailjet Pilot\",\n      Subject: \"Your email flight plan!\",\n      TextPart: \"Dear passenger, welcome to Mailjet! May the delivery force be with you!\",\n      HtmlPart: \"<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!\",\n      Recipients: []MailjetRecipient {\n        MailjetRecipient {\n          Email: \"passenger@mailjet.com\",\n        },\n      },\n    }\n\tres, err := mailjetClient.SendMail(email)\n\tif err != nil {\n\t\t\tfmt.Println(err)\n\t} else {\n\t\t\tfmt.Println(\"Success\")\n\t\t\tfmt.Println(res)\n\t}\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$body = [\n    'FromEmail' => \"pilot@mailjet.com\",\n    'FromName' => \"Mailjet Pilot\",\n    'Subject' => \"Your email flight plan!\",\n    'Text-part' => \"Dear passenger, welcome to Mailjet! May the delivery force be with you!\",\n    'Html-part' => \"<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!\",\n    'Recipients' => [\n        [\n            'Email' => \"passenger@mailjet.com\"\n        ]\n    ]\n];\n$response = $mj->post(Resources::$Email, ['body' => $body]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"Mailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\nvariable = Mailjet::Send.create(\n\t\tfrom_email: \"pilot@mailjet.com\",\n\t\tfrom_name: \"Mailjet Pilot\",\n\t\tsubject: \"Your email flight plan!\",\n\t\ttext_part: \"Dear passenger, welcome to Mailjet! May the delivery force be with you!\",\n\t\thtml_part: \"<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!\",\n\t\trecipients: [{ 'Email'=> 'passenger@mailjet.com'}])\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package MyClass;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Email;\npublic class MyClass {\n    /**\n     * This calls sends an email to one recipient.\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Email.resource)\n\t\t\t\t\t\t.property(Email.FROMEMAIL, \"pilot@mailjet.com\")\n\t\t\t\t\t\t.property(Email.FROMNAME, \"Mailjet Pilot\")\n\t\t\t\t\t\t.property(Email.SUBJECT, \"Your email flight plan!\")\n\t\t\t\t\t\t.property(Email.TEXTPART, \"Dear passenger, welcome to Mailjet! May the delivery force be with you!\")\n\t\t\t\t\t\t.property(Email.HTMLPART, \"<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!\")\n\t\t\t\t\t\t.property(Email.RECIPIENTS, new JSONArray()\n                .put(new JSONObject()\n                    .put(\"Email\", \"passenger@mailjet.com\")));\n      response = client.post(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# This calls sends an email to one recipient.\ncurl -s \\\n\t-X POST \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/send \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\n\t\t\"FromEmail\":\"pilot@mailjet.com\",\n\t\t\"FromName\":\"Mailjet Pilot\",\n\t\t\"Subject\":\"Your email flight plan!\",\n\t\t\"Text-part\":\"Dear passenger, welcome to Mailjet! May the delivery force be with you!\",\n\t\t\"Html-part\":\"<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!\",\n\t\t\"Recipients\":[{\"Email\":\"passenger@mailjet.com\"}]\n\t}'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * This calls sends an email to one recipient.\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet.post('send').request({\n  FromEmail: 'pilot@mailjet.com',\n  FromName: 'Mailjet Pilot',\n  Subject: 'Your email flight plan!',\n  'Text-part':\n    'Dear passenger, welcome to Mailjet! May the delivery force be with you!',\n  'Html-part':\n    '<h3>Dear passenger, welcome to Mailjet!</h3><br />May the delivery force be with you!',\n  Recipients: [{ Email: 'passenger@mailjet.com' }],\n})\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"Sent\": [\n    {\n      \"Email\": \"passenger@mailjet.com\",\n      \"MessageID\": 111111111111111\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here are the Mailjet Send API properties definitions, along with samples in all the languages we support through our official libraries."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property Name"},"children":["Property Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FromEmail"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be a valid, activated and registered sender for this account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["May include the name part: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["john@example.com"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&lt;john@example.com&gt;"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"John Doe\" &lt;john@example.com&gt;"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY - MAX FROM: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FromName"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be a valid, activated and registered sender for this account"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["May include the name part: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["john@example.com"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&lt;john@example.com&gt;"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"John Doe\" &lt;john@example.com&gt;"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY - MAX FROM: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sender"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This can be set only on given API Keys. Contact the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/support/ticket"},"children":["support team"]}," if you want us to enable this setting on your account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be a valid active sender for this account."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Perform a simple GET on resource ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/sender"]}," to view a list of allowed senders for your account, or within the Mailjet Account Settings under ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/account/sender"},"children":["Sender Addresses"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MAX SENDER: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recipients"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of recipients, must include at least a property ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Email"]}," in each element"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sample: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[{\"Email\":\"passenger@mailjet.com\",\"Name\":\"passenger\"}]"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["To"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["May include the name part: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["john@example.com"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&lt;john@example.com&gt;"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"John Doe\" &lt;john@example.com&gt;"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If a recipient is specified twice (in the to, cc, or bcc), it is counted only once."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Can be a magic list @lists.mailjet.com. See the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Address"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/contacts/"},"children":["contactslist"]}," property."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MAX RECIPIENTS: 50"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cc, Bcc"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["May include the name part: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["john@example.com"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&lt;john@example.com&gt;"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"John Doe\" &lt;john@example.com&gt;"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If one recipient is specified twice, it will be counted as one only (including to, cc, bcc)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MAX RECIPIENTS: 50"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cc and Bcc can't be used in conjunction with Recipients property"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subject"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["At least 1 char, maximum length is 255 chars"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY - MAX SUBJECTS: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Text-part"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Provides the Text part of the message"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mandatory if the HTML param is not specified"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY IF NO HTML - MAX PARTS: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Html-part"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Provides the HTML part of the message"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mandatory if the text param is not specified"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY IF NO TEXT - MAX PARTS: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-TemplateID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Template ID or Name to be used as content for this email. Overrides the HTML/Text parts if any."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MANDATORY IF NO HTML/TEXT - MAX TEMPLATEID: 1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-TemplateLanguage"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Activate the template language processing. By default the template language processing is desactivated. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["True"]}," to activate."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent to using the X-MJ-TemplateLanguage header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#use-the-template-in-send-api"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MJ-TemplateErrorReporting"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email Address where a carbon copy with error message is sent to."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent to using the X-MJ-TemplateErrorReporting header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#templates-error-management"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MJ-TemplateErrorDeliver"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Define if the message is delivered if an error is discovered in the templating language. By default the delivery is desactivated. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deliver"]}," to let the message be delivered to the recipient, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," to stop it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent to using the X-MJ-TemplateErrorDeliver header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#templates-error-management"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attachments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attach files automatically to this Email"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sum of all attachments, including inline may not exceed 15 MB total"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sample: [{\"Content-type\": \"MIME TYPE\", \"Filename\": \"FILENAME.EXT\", \"content\":\"BASE64 ENCODED CONTENT\"}]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Inline_attachments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attach a file for inline use via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cid:FILENAME.EXT"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sum of all attachements, including inline may not exceed 15 MB total"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sample: [{\"Content-type\": \"MIME TYPE\", \"Filename\": \"FILENAME.EXT\", \"content\":\"BASE64 ENCODED CONTENT\"}]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-prio"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Manage message processing priority inside your account (API key) scheduling queue."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Default is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," as in the SMTP submission."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent of using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Mailjet-Prio"]}," header through SMTP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/docs/email-priority-management"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-campaign"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Groups multiple messages in one campaign"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent of using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Mailjet-Campaign"]}," header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/docs/emails_headers"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-deduplicatecampaign"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Block/unblock messages to be sent multiple times inside one campaign to the same contact."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0: unblocked (default behavior) - 1: blocked"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent of using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Mailjet-DeduplicateCampaign"]}," header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Can only be used if mj-campaign is specified."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/docs/emails_headers"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-trackopen"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Force or disable open tracking on this message, overriding preferences."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent of using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Mailjet-TrackOpen"]}," header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Can only be used with a HTML part."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/docs/emails_headers"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-trackclick"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Force or disable click tracking on this message, overriding preferences."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent to using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Mailjet-TrackClick"]}," header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Can only be specified if the HTML part is provided."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://app.mailjet.com/docs/emails_headers"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-CustomID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attach a custom ID to the message"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent to using the X-MJ-CustomID header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sending-an-email-with-a-custom-id"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mj-EventPayLoad"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attach a payload to the message"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equivalent to using the X-MJ-EventPayload header through SMTP."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sending-an-email-with-a-payload"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Headers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add lines to the email headers"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of headers as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"property\":\"value\""]}," pairs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Notice: overriding values of header properties (ie: subject)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sample: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{\"X-My-Header\":\"my own value\", \"X-My-Header-2\":\"my own value 2\"}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Vars"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Global variables used for personalisation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Messages"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of messages"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Used for bulk emailing."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sending-in-bulk"},"children":["More information"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"send-template","__idx":3},"children":["Send-Template"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /messages/send-template.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package MyClass;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.errors.MailjetClient;\nimport com.mailjet.client.errors.MailjetRequest;\nimport com.mailjet.client.errors.MailjetResponse;\nimport com.mailjet.client.resource.Email;\npublic class MyClass {\n    /**\n     * This calls sends an email to one recipient.\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Email.resource)\n\t\t\t\t\t\t.property(Email.FROMEMAIL, \"pilot@mailjet.com\")\n\t\t\t\t\t\t.property(Email.FROMNAME, \"Mailjet Pilot\")\n\t\t\t\t\t\t.property(Email.MJTEMPLATEID, 1)\n\t\t\t\t\t\t.property(Email.MJTEMPLATELANGUAGE, true)\n\t\t\t\t\t\t.property(Email.SUBJECT, \"Your email flight plan!\")\n\t\t\t\t\t\t.property(Email.RECIPIENTS, new JSONArray()\n                .put(new JSONObject()\n                    .put(\"Email\", \"passenger@mailjet.com\")))\n\t\t\t\t\t\t.property(Email.MJEVENTPAYLOAD, \"Eticket,1234,row,15,seat,B\");\n      response = client.post(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$body = [\n    'FromEmail' => \"pilot@mailjet.com\",\n    'FromName' => \"Mailjet Pilot\",\n    'Subject' => \"Your email flight plan!\",\n    'MJ-TemplateID' => 1,\n    'MJ-TemplateLanguage' => true,\n    'Recipients' => [['Email' => \"passenger@mailjet.com\"]]\n];\n$response = $mj->post(Resources::$Email, ['body' => $body]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# This calls sends an email to one recipient.\ncurl -s \\\n\t-X POST \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/send \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\n\t\t\"FromEmail\":\"pilot@mailjet.com\",\n\t\t\"FromName\":\"Mailjet Pilot\",\n\t\t\"Subject\":\"Your email flight plan!\",\n\t\t\"MJ-TemplateID\":\"1\",\n\t\t\"MJ-TemplateLanguage\":true,\n\t\t\"Recipients\":[\n\t\t\t\t{\n\t\t\t\t\t\t\"Email\": \"passenger@mailjet.com\"\n\t\t\t\t}\n\t\t]\n\t}'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * This calls sends an email to one recipient.\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet.post('send').request({\n  FromEmail: 'pilot@mailjet.com',\n  FromName: 'Mailjet Pilot',\n  Subject: 'Your email flight plan!',\n  'MJ-TemplateID': '1',\n  'MJ-TemplateLanguage': 'true',\n  Recipients: [\n    {\n      Email: 'passenger@mailjet.com',\n    },\n  ],\n})\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# This calls sends an email to one recipient.\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\nvariable = Mailjet::Send.create(\n  from_email: \"pilot@mailjet.com\",\n  from_name: \"Mailjet Pilot\",\n  subject: \"Your email flight plan!\",\n  \"Mj-TemplateID\": \"1\",\n  \"Mj-TemplateLanguage\": true,\n  recipients: [{ 'Email'=> 'passenger@mailjet.com'}]\n)\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nThis calls sends an email to one recipient.\n\"\"\"\nfrom mailjet import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\ndata = {\n  'FromEmail': 'pilot@mailjet.com',\n  'FromName': 'Mailjet Pilot',\n  'Subject': 'Your email flight plan!',\n  'MJ-TemplateID': '1',\n  'MJ-TemplateLanguage': true,\n  'Recipients': [\n\t\t\t\t{\n\t\t\t\t\t\t\"Email\": \"passenger@mailjet.com\"\n\t\t\t\t}\n\t\t]\n}\nresult = mailjet.send.create(data=data)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nThis calls sends an email to one recipient.\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\temail := &MailjetSendMail {\n      FromEmail: \"pilot@mailjet.com\",\n      FromName: \"Mailjet Pilot\",\n      Subject: \"Your email flight plan!\",\n      MJTemplateID: 1,\n      MJTemplateLanguage: \"true\",\n      Recipients: []MailjetRecipient {\n        MailjetRecipient {\n          Email: \"passenger@mailjet.com\",\n        },\n      },\n    },\n\tres, err := mailjetClient.SendMail(email)\n\tif err != nil {\n\t\t\tfmt.Println(err)\n\t} else {\n\t\t\tfmt.Println(\"Success\")\n\t\t\tfmt.Println(res)\n\t}\n}\n","lang":"go"},"children":[]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"Sent\": [\n    {\n      \"Email\": \"passenger@mailjet.com\",\n      \"MessageID\": 111111111111111\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, please visit our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://10.0.10.150:4567/#templates-calls"},"children":["Templates"]}," dedicated section to learn how to create and store templates with the Mailjet API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Mj-TemplateID"]}," property in your Send API payload to specify the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ID"]}," of the the template you created."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You must set the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Mj-TemplateLanguage"]}," property in the payload at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to have the templating language interpreted."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mailjet offers a templating language to customize the content of your messages, based on conditions and loops. Please visit our dedicated ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/email-api/template_language/template_lang_overview/"},"children":["API guide section"]}," to learn more."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"search","__idx":4},"children":["Search"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /messages/search.json"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response payload of a Send API call will provide you with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MessageID"]}," of your messages. You can use this ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MessageID"]}," to access information and statistics about the message."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$response = $mj->get(Resources::$Message, ['id' => $id]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# View : Details of a specific Message (e-mail) processed by Mailjet\ncurl -s \\\n\t-X GET \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/REST/message/$ID_MESSAGE\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * View : Details of a specific Message (e-mail) processed by Mailjet\n *\n */\nvar mailjet = require('node-mailjet').connect(\n  process.env.MJ_APIKEY_PUBLIC,\n  process.env.MJ_APIKEY_PRIVATE\n)\nvar request = mailjet\n  .get('message')\n  .id($ID_MESSAGE)\n  .request()\nrequest\n  .on('success', function(response, body) {\n    console.log(response.statusCode, body)\n  })\n  .on('error', function(err, response) {\n    console.log(response.statusCode, err)\n  })\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# View : Details of a specific Message (e-mail) processed by Mailjet\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\nvariable = Mailjet::Message.find($ID_MESSAGE)\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nView : Details of a specific Message (e-mail) processed by Mailjet\n\"\"\"\nfrom mailjet_rest import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\nid = '$ID_MESSAGE'\nresult = mailjet.message.get(id=id)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nView : Details of a specific Message (e-mail) processed by Mailjet\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\tvar data []resources.Message\n\tmr := &MailjetRequest{\n\t  Resource: \"message\",\n\t  ID: RESOURCE_ID,\n\t}\n\terr := mailjetClient.Get(mr, &data)\n\tif err != nil {\n\t  fmt.Println(err)\n\t}\n\tfmt.Printf(\"Data array: %+v\\n\", data)\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package com.my.project;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Message;\npublic class MyClass {\n    /**\n     * View : Details of a specific Message (e-mail) processed by Mailjet\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Message.resource, ID);\n      response = client.get(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"Count\": 1,\n  \"Data\": [\n    {\n      \"ArrivedAt\": \"2015-07-06T07:10:24Z\",\n      \"AttachmentCount\": \"0\",\n      \"AttemptCount\": \"0\",\n      \"CampaignID\": \"51\",\n      \"ContactID\": \"45\",\n      \"Delay\": \"0\",\n      \"DestinationID\": \"14\",\n      \"FilterTime\": \"61\",\n      \"FromID\": \"1\",\n      \"ID\": \"16888509234525280\",\n      \"IsClickTracked\": \"false\",\n      \"IsHTMLPartIncluded\": \"false\",\n      \"IsOpenTracked\": \"false\",\n      \"IsTextPartIncluded\": \"false\",\n      \"IsUnsubTracked\": \"false\",\n      \"MessageSize\": \"20248\",\n      \"SpamassassinScore\": \"0\",\n      \"SpamassRules\": \"\",\n      \"StateID\": \"0\",\n      \"StatePermanent\": \"false\",\n      \"Status\": \"sent\"\n    }\n  ],\n  \"Total\": 1\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Perform a GET on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[/message](/docs/api-reference/email-api/categories/messages/)"]}," to get basic information about a message, such as the contact it was sent to, who it was sent by, if there were any attachments and how large the message was."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["StateID"]}," property shows the current status the messages are in."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"search-time-series","__idx":5},"children":["Search-Time-Series"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /messages/search-time-series.json"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"filter-by-time-range","__idx":6},"children":["Filter by time range"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Leveraging the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FromTs"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ToTs"]}," query filters of the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/messages/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}]}," API resource, you can find messages matching the period. These filters expect UNIX epoch timestamp."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"filter-by-tag-custom-id","__idx":7},"children":["Filter by tag (custom ID)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can find all the messages associated to a given custom ID (limited to 1 per message at the moment) through the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomID"]}," query filter of the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/messages/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messagesentstatistics"]}]}," resource."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"filter-by-sender-domain","__idx":8},"children":["Filter by sender domain"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can filter all the messages sent from a given domain using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FromID"]}," query filter of the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/messages/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["messagesentstatistics"]}]}," resource. The ID refers to a valid ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/sender-addresses-and-domains/"},"children":["sender"]}," resource"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"info","__idx":9},"children":["Info"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Maps to /messages/info.json"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"PHP","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\nrequire 'vendor/autoload.php';\nuse \\Mailjet\\Resources;\n$mj = new \\Mailjet\\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));\n$response = $mj->get(Resources::$Message, ['id' => $id]);\n$response->success() && var_dump($response->getData());\n?>\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bash","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# View : Details of a specific Message (e-mail) processed by Mailjet\ncurl -s \\\n\t-X GET \\\n\t--user \"$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE\" \\\n\thttps://api.mailjet.com/v3/REST/message/$ID_MESSAGE\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Node.js","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"/**\n *\n * View : Details of a specific Message (e-mail) processed by Mailjet\n *\n */\nvar mailjet = require ('node-mailjet')\n\t.connect(process.env.MJ_APIKEY_PUBLIC, process.env.MJ_APIKEY_PRIVATE)\nvar request = mailjet\n\t.get(\"message\")\n\t.id($ID_MESSAGE)\n\t.request();\nrequest\n\t.on('success', function (response, body) {\n\t\tconsole.log (response.statusCode, body);\n\t})\n\t.on('error', function (err, response) {\n\t\tconsole.log (response.statusCode, err);\n\t});\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Ruby","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"# View : Details of a specific Message (e-mail) processed by Mailjet\nMailjet.configure do |config|\n  config.api_key = ENV['MJ_APIKEY_PUBLIC']\n  config.secret_key = ENV['MJ_APIKEY_PRIVATE']\n  config.default_from = 'your default sending address'\nend\nvariable = Mailjet::Message.find($ID_MESSAGE)\n","lang":"ruby"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"\"\"\"\nView : Details of a specific Message (e-mail) processed by Mailjet\n\"\"\"\nfrom mailjet_rest import Client\nimport os\napi_key = os.environ['MJ_APIKEY_PUBLIC']\napi_secret = os.environ['MJ_APIKEY_PRIVATE']\nmailjet = Client(auth=(api_key, api_secret))\nid = '$ID_MESSAGE'\nresult = mailjet.message.get(id=id)\nprint result.status_code\nprint result.json()\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Go","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"/*\nView : Details of a specific Message (e-mail) processed by Mailjet\n*/\npackage main\nimport (\n\t\"fmt\"\n\t. \"github.com/mailjet/mailjet-apiv3-go\"\n\t\"github.com/mailjet/mailjet-apiv3-go/resources\"\n\t\"os\"\n)\nfunc main () {\n\tmailjetClient := NewMailjetClient(os.Getenv(\"MJ_APIKEY_PUBLIC\"), os.Getenv(\"MJ_APIKEY_PRIVATE\"))\n\tvar data []resources.Message\n\tmr := &MailjetRequest{\n\t  Resource: \"message\",\n\t  ID: RESOURCE_ID,\n\t}\n\terr := mailjetClient.Get(mr, &data)\n\tif err != nil {\n\t  fmt.Println(err)\n\t}\n\tfmt.Printf(\"Data array: %+v\\n\", data)\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"package com.my.project;\nimport com.mailjet.client.errors.MailjetException;\nimport com.mailjet.client.MailjetClient;\nimport com.mailjet.client.MailjetRequest;\nimport com.mailjet.client.MailjetResponse;\nimport com.mailjet.client.resource.Message;\npublic class MyClass {\n    /**\n     * View : Details of a specific Message (e-mail) processed by Mailjet\n     */\n    public static void main(String[] args) throws MailjetException {\n      MailjetClient client;\n      MailjetRequest request;\n      MailjetResponse response;\n      client = new MailjetClient(\"api key\", \"api secret\");\n      request = new MailjetRequest(Message.resource, ID);\n      response = client.get(request);\n      System.out.println(response.getStatus());\n      System.out.println(response.getData());\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"Count\": 1,\n  \"Data\": [\n    {\n      \"ArrivedAt\": \"2015-07-06T07:10:24Z\",\n      \"AttachmentCount\": \"0\",\n      \"AttemptCount\": \"0\",\n      \"CampaignID\": \"51\",\n      \"ContactID\": \"45\",\n      \"Delay\": \"0\",\n      \"DestinationID\": \"14\",\n      \"FilterTime\": \"61\",\n      \"FromID\": \"1\",\n      \"ID\": \"16888509234525280\",\n      \"IsClickTracked\": \"false\",\n      \"IsHTMLPartIncluded\": \"false\",\n      \"IsOpenTracked\": \"false\",\n      \"IsTextPartIncluded\": \"false\",\n      \"IsUnsubTracked\": \"false\",\n      \"MessageSize\": \"20248\",\n      \"SpamassassinScore\": \"0\",\n      \"SpamassRules\": \"\",\n      \"StateID\": \"0\",\n      \"StatePermanent\": \"false\",\n      \"Status\": \"sent\"\n    }\n  ],\n  \"Total\": 1\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Issue a GET request to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/email-api/categories/messages/"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}]}," containing the ID which was returned by our Send API"]}]},"headings":[{"value":"Messages Calls","id":"messages-calls","depth":1},{"value":"Introduction","id":"introduction","depth":2},{"value":"Send","id":"send","depth":2},{"value":"Send-Template","id":"send-template","depth":2},{"value":"Search","id":"search","depth":2},{"value":"Search-Time-Series","id":"search-time-series","depth":2},{"value":"Filter by time range","id":"filter-by-time-range","depth":3},{"value":"Filter by tag (custom ID)","id":"filter-by-tag-custom-id","depth":3},{"value":"Filter by sender domain","id":"filter-by-sender-domain","depth":3},{"value":"Info","id":"info","depth":2}],"frontmatter":{"title":"Messages Calls","seo":{"description":"Migrate Mandrill messages/send.json to Mailjet’s Send API. Covers single and templated transactional sends with code samples in Python, Go, PHP, and Node.js.","priority":0.3,"title":"Messages Calls"}},"lastModified":"2026-08-26T10:53:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/mandrill/messages-calls","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}