CINXE.COM
API | Mandrill
<!DOCTYPE html> <html> <head><script type="text/javascript" src="https://web-static.archive.org/_static/js/bundle-playback.js?v=7YQSqjSh" charset="utf-8"></script> <script type="text/javascript" src="https://web-static.archive.org/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="https://web-static.archive.org/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("http://mandrillapp.com:80/api/docs/index.html","20120712095518","https://web.archive.org/","web","https://web-static.archive.org/_static/", "1342086918"); </script> <link rel="stylesheet" type="text/css" href="https://web-static.archive.org/_static/css/banner-styles.css?v=p7PEIJWi" /> <link rel="stylesheet" type="text/css" href="https://web-static.archive.org/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <title>API | Mandrill</title> <meta http-equiv="X-UA-Compatible" content="IE=8, IE=9"> <link rel="stylesheet" href="/web/20120712095518cs_/http://mandrillapp.com/api/docs/css/apidocs.css" type="text/css"> <link href="/web/20120712095518im_/http://mandrillapp.com/api/docs/favicon.ico" rel="icon"> <title>Mandrill API Documentation</title> <meta name="description" content="Mandrill is a transactional email platform from MailChimp"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="creator" content="MailChimp"> <meta name="publisher" content="Rocket Science Group, LLC"> <meta name="format" content="text/html"> <meta name="robots" content="index,follow,archive"> <script src="https://web.archive.org/web/20120712095518js_/http://use.typekit.com/naw0mzv.js" type="text/javascript"></script> <script type="text/javascript"> try{Typekit.load();}catch(e){} </script> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> </head> <body> <header class="line"> <hgroup class="unit size3of8 padding-left-0"> <a class="logo" href="https://web.archive.org/web/20120712095518/http://mandrill.com/"> <h1>Mandrill</h1> </a> </hgroup> <nav class="unit mainNav size5of8"> <ul> <li> <a href="https://web.archive.org/web/20120712095518/http://mandrill.com/pricing">Pricing</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://mandrillapp.com/api/docs/" class="feature">API</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://blog.mandrill.com/">Blog</a> </li> <li> <a class="internal-link nothighlighted" data-target="#signup-form" href="https://web.archive.org/web/20120712095518/http://mandrill.com/signup" id="signup-link">Sign Up</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://mandrillapp.com/">Log In</a> </li> </ul> </nav> </header> <section class="line wrapper"> <aside id="sidebar" class="unit side"> <div class="ab"> <div id="st"> <form method="POST"> <input type="text" id="st-search-input" class="st-search-input av-text" placeholder="Search API Documentation"> </form> </div> <div id="st-results-container"></div> <script type="text/javascript"> var Swiftype = window.Swiftype || {}; (function() { Swiftype.key = 'jUjc9ygw3sdeB8BM4gy9'; Swiftype.inputElement = '#st-search-input'; Swiftype.resultContainingElement = '#st-results-container'; Swiftype.attachElement = '#st-search-input'; Swiftype.renderStyle = "overlay"; var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true; script.src = "//web.archive.org/web/20120712095518/http://swiftype.com/embed.js"; var entry = document.getElementsByTagName('script')[0]; entry.parentNode.insertBefore(script, entry); }()); </script> <nav class="navigation" id="nav"> <ul> <li class=" section"><a href="users.html">Users Calls</a> <ul> <li><a href="users.html#method=info">info </a></li><li><a href="users.html#method=ping">ping </a></li><li><a href="users.html#method=ping2">ping2 </a></li><li><a href="users.html#method=senders">senders </a></li> </ul> </li><li class=" section"><a href="messages.html">Messages Calls</a> <ul> <li><a href="messages.html#method=send">send </a></li><li><a href="messages.html#method=send-template">send-template </a></li><li><a href="messages.html#method=search">search </a></li><li><a href="messages.html#method=parse">parse </a></li><li><a href="messages.html#method=send-raw">send-raw </a></li> </ul> </li><li class=" section"><a href="tags.html">Tags Calls</a> <ul> <li><a href="tags.html#method=list">list </a></li><li><a href="tags.html#method=info">info </a></li><li><a href="tags.html#method=time-series">time-series </a></li><li><a href="tags.html#method=all-time-series">all-time-series </a></li> </ul> </li><li class=" section"><a href="rejects.html">Rejects Calls</a> <ul> <li><a href="rejects.html#method=list">list </a></li><li><a href="rejects.html#method=delete">delete </a></li> </ul> </li><li class=" section"><a href="senders.html">Senders Calls</a> <ul> <li><a href="senders.html#method=list">list </a></li><li><a href="senders.html#method=domains">domains </a></li><li><a href="senders.html#method=info">info </a></li><li><a href="senders.html#method=time-series">time-series </a></li> </ul> </li><li class=" section"><a href="urls.html">Urls Calls</a> <ul> <li><a href="urls.html#method=list">list </a></li><li><a href="urls.html#method=search">search </a></li><li><a href="urls.html#method=time-series">time-series </a></li> </ul> </li><li class=" section"><a href="templates.html">Templates Calls</a> <ul> <li><a href="templates.html#method=add">add </a></li><li><a href="templates.html#method=info">info </a></li><li><a href="templates.html#method=update">update </a></li><li><a href="templates.html#method=publish">publish </a></li><li><a href="templates.html#method=delete">delete </a></li><li><a href="templates.html#method=list">list </a></li><li><a href="templates.html#method=time-series">time-series </a></li><li><a href="templates.html#method=render">render </a></li> </ul> </li><li class=" section"><a href="webhooks.html">Webhooks Calls</a> <ul> <li><a href="webhooks.html#method=list">list </a></li><li><a href="webhooks.html#method=add">add </a></li><li><a href="webhooks.html#method=info">info </a></li><li><a href="webhooks.html#method=update">update </a></li><li><a href="webhooks.html#method=delete">delete </a></li> </ul> </li> </ul> </nav> </div> </aside> <div id="main"> <div class="in ab double"> <div class="padtop main"> <div class="content"> <h1>Mandrill API Documentation</h1> <h2>API Endpoint</h2> <p>All API URLs listed in this documentation are relative to <strong>https://mandrillapp.com/api/1.0/</strong>. For example, the <a href="users.html#method-ping">/users/ping</a> API call is reachable at <strong>https://mandrillapp.com/api/1.0/users/ping.json</strong>.</p> <h2>RESTful</h2> <p> The Mandrill API is a mostly <a href="https://web.archive.org/web/20120712095518/http://en.wikipedia.org/wiki/RESTful#RESTful_web_services">RESTful</a> API. Known caveats: <ul class="simplelist bullets"> <li>All API calls should be made with <strong>HTTP POST</strong>.</li> <li>You <strong>can</strong> consider any non-200 HTTP response code an error - the returned data will contain more detailed information</li> <li>All methods are accessed via: https://mandrillapp.com/api/1.0/SOME-METHOD.OUTPUT_FORMAT</li> </ul> </p> <h2>Passing Request Data</h2> <p>Request data is passed to the API by POSTing JSON objects to the API endpoints with the appropriate parameters. The documentation for each API call will contain more detail on the parameters accepted by the call. As an alternative, you can also use HTTP POST parameters, just like submitting an HTML FORM, but JSON objects are recommended.</p> <h2>Output Formats</h2> <p> We support four output formats. To use any of them, simply replace the file extension in the API URL (OUTPUT_FORMAT above) with one of: <ul class="simplelist bullets"> <li>json (default)</li> <li>xml</li> <li>yaml</li> <li>php</li> </ul> The response data for each call will the be encoded in the specified format. Regardless of the output format desired, inputs are only accepted as JSON objects or HTTP POST parameters. </p> <h2>Questions? Problems?</h2> <p> Have you run into difficulties or a method just doesn't seem to work right? Check out our <a href="https://web.archive.org/web/20120712095518/http://apidocs.mailchimp.com/help">API Support options</a> and we'll be happy to assist you. </p> <h2>API Call Categories</h2> <ul class="simplelist bullets"> <li class="namespace"> <a href="users.html">Users</a> </li><li class="namespace"> <a href="messages.html">Messages</a> </li><li class="namespace"> <a href="tags.html">Tags</a> </li><li class="namespace"> <a href="rejects.html">Rejects</a> </li><li class="namespace"> <a href="senders.html">Senders</a> </li><li class="namespace"> <a href="urls.html">Urls</a> </li><li class="namespace"> <a href="templates.html">Templates</a> </li><li class="namespace"> <a href="webhooks.html">Webhooks</a> </li> </ul> <div class="namespace-summary margintop"> <h2>Users Calls</h2> <ul> <li> <a href="users.html#method-info">info</a>(<strong>string</strong> key) <div>Return the information about the API-connected user</div> </li><li> <a href="users.html#method-ping">ping</a>(<strong>string</strong> key) <div>Validate an API key and respond to a ping</div> </li><li> <a href="users.html#method-ping2">ping2</a>(<strong>string</strong> key) <div>Validate an API key and respond to a ping (anal JSON parser version)</div> </li><li> <a href="users.html#method-senders">senders</a>(<strong>string</strong> key) <div>Return the senders that have tried to use this account, both verified and unverified</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Messages Calls</h2> <ul> <li> <a href="messages.html#method-send">send</a>(<strong>string</strong> key, <strong>struct</strong> message) <div>Send a new transactional message through Mandrill</div> </li><li> <a href="messages.html#method-send-template">send-template</a>(<strong>string</strong> key, <strong>string</strong> template_name, <strong>array</strong> template_content, <strong>struct</strong> message) <div>Send a new transactional message through Mandrill using a template</div> </li><li> <a href="messages.html#method-search">search</a>(<strong>string</strong> key, <strong>string</strong> query, <strong>string</strong> date_from, <strong>string</strong> date_to, <strong>array</strong> tags, <strong>array</strong> senders, <strong>integer</strong> limit) <div>Search the content of recently sent messages and optionally narrow by date range, tags and senders</div> </li><li> <a href="messages.html#method-parse">parse</a>(<strong>string</strong> key, <strong>string</strong> raw_message) <div>Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces</div> </li><li> <a href="messages.html#method-send-raw">send-raw</a>(<strong>string</strong> key, <strong>string</strong> raw_message) <div>Take a raw MIME document for a message, and send it exactly as if it were sent over the SMTP protocol</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Tags Calls</h2> <ul> <li> <a href="tags.html#method-list">list</a>(<strong>string</strong> key) <div>Return all of the user-defined tag information</div> </li><li> <a href="tags.html#method-info">info</a>(<strong>string</strong> key, <strong>string</strong> tag) <div>Return more detailed information about a single tag, including aggregates of recent stats</div> </li><li> <a href="tags.html#method-time-series">time-series</a>(<strong>string</strong> key, <strong>string</strong> tag) <div>Return the recent history (hourly stats for the last 30 days) for a tag</div> </li><li> <a href="tags.html#method-all-time-series">all-time-series</a>(<strong>string</strong> key) <div>Return the recent history (hourly stats for the last 30 days) for all tags</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Rejects Calls</h2> <ul> <li> <a href="rejects.html#method-list">list</a>(<strong>string</strong> key, <strong>string</strong> email) <div>Retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results.</div> </li><li> <a href="rejects.html#method-delete">delete</a>(<strong>string</strong> key, <strong>string</strong> email) <div>Deletes an email rejection. There is no limit to how many rejections you can remove from your blacklist, but keep in mind that each deletion has an affect on your reputation.</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Senders Calls</h2> <ul> <li> <a href="senders.html#method-list">list</a>(<strong>string</strong> key) <div>Return the senders that have tried to use this account.</div> </li><li> <a href="senders.html#method-domains">domains</a>(<strong>string</strong> key) <div>Returns the sender domains that have been added to this account.</div> </li><li> <a href="senders.html#method-info">info</a>(<strong>string</strong> key, <strong>string</strong> address) <div>Return more detailed information about a single sender, including aggregates of recent stats</div> </li><li> <a href="senders.html#method-time-series">time-series</a>(<strong>string</strong> key, <strong>string</strong> address) <div>Return the recent history (hourly stats for the last 30 days) for a sender</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Urls Calls</h2> <ul> <li> <a href="urls.html#method-list">list</a>(<strong>string</strong> key) <div>Get the 100 most clicked URLs</div> </li><li> <a href="urls.html#method-search">search</a>(<strong>string</strong> key, <strong>string</strong> q) <div>Return the 100 most clicked URLs that match the search query given</div> </li><li> <a href="urls.html#method-time-series">time-series</a>(<strong>string</strong> key, <strong>string</strong> url) <div>Return the recent history (hourly stats for the last 30 days) for a url</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Templates Calls</h2> <ul> <li> <a href="templates.html#method-add">add</a>(<strong>string</strong> key, <strong>string</strong> name, <strong>string</strong> code, <strong>boolean</strong> publish) <div>Add a new template</div> </li><li> <a href="templates.html#method-info">info</a>(<strong>string</strong> key, <strong>string</strong> name) <div>Get the information for an existing template</div> </li><li> <a href="templates.html#method-update">update</a>(<strong>string</strong> key, <strong>string</strong> name, <strong>string</strong> code, <strong>boolean</strong> publish) <div>Update the code for an existing template</div> </li><li> <a href="templates.html#method-publish">publish</a>(<strong>string</strong> key, <strong>string</strong> name) <div>Publish the content for the template. Any new messages sent using this template will start using the content that was previously in draft.</div> </li><li> <a href="templates.html#method-delete">delete</a>(<strong>string</strong> key, <strong>string</strong> name) <div>Delete a template</div> </li><li> <a href="templates.html#method-list">list</a>(<strong>string</strong> key) <div>Return a list of all the templates available to this user</div> </li><li> <a href="templates.html#method-time-series">time-series</a>(<strong>string</strong> key, <strong>string</strong> name) <div>Return the recent history (hourly stats for the last 30 days) for a template</div> </li><li> <a href="templates.html#method-render">render</a>(<strong>string</strong> key, <strong>string</strong> template_name, <strong>array</strong> template_content, <strong>array</strong> merge_vars) <div>Inject content and optionally merge fields into a template, returning the HTML that results</div> </li></ul> </div><div class="namespace-summary margintop"> <h2>Webhooks Calls</h2> <ul> <li> <a href="webhooks.html#method-list">list</a>(<strong>string</strong> key) <div>Get the list of all webhooks defined on the account</div> </li><li> <a href="webhooks.html#method-add">add</a>(<strong>string</strong> key, <strong>string</strong> url, <strong>array</strong> events) <div>Add a new webhook</div> </li><li> <a href="webhooks.html#method-info">info</a>(<strong>string</strong> key, <strong>integer</strong> id) <div>Given the ID of an existing webhook, return the data about it</div> </li><li> <a href="webhooks.html#method-update">update</a>(<strong>string</strong> key, <strong>integer</strong> id, <strong>string</strong> url, <strong>array</strong> events) <div>Update an existing webhook</div> </li><li> <a href="webhooks.html#method-delete">delete</a>(<strong>string</strong> key, <strong>integer</strong> id) <div>Delete an existing webhook</div> </li></ul> </div> </div> </div> </div> </div> </section> <footer class="line"> <div class="sizewrap"> <nav class="footer-nav line"> <div class="unit size1of4 "> <h2>About</h2> <ul> <li> <a href="https://web.archive.org/web/20120712095518/http://mandrill.com/pricing">Pricing</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://blog.mandrill.com/">Blog</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://mandrill.com/privacy/">Privacy Policy</a> </li> </ul> </div> <div class="unit size1of4"> <h2>Support</h2> <ul> <li> <a href="https://web.archive.org/web/20120712095518/http://mandrillapp.com/api/docs/">API Docs</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://help.mandrill.com/customer/portal/topics/210309-smtp-integration/articles">SMTP Docs</a> </li> <li> <a href="https://web.archive.org/web/20120712095518/http://help.mandrill.com/">Help</a> </li> </ul> </div> </nav> <div class="line"> <div class="size6of8 left1of8"> <p class="colophon">漏2012 All rights reserved. Mandrill庐 is a registered trademark of <a href="https://web.archive.org/web/20120712095518/http://rocketsciencegroup.com/">The Rocket Science Group</a>.</p> </div> </div> </div> </footer> <script src="/web/20120712095518js_/http://mandrillapp.com/api/docs/js/jquery-1.7.2.min.js"></script> <script type="text/javascript"> $(function () { var $code = $('code'); if ($code.length) { $.getScript('highlight/highlight.pack.js', function () { $code.each(function(i,e){ var wrapper = $('<pre></pre>'); $(e).html( $.trim( $(e).html() ) ); $(e).wrap( wrapper ); hljs.highlightBlock( e ); }); }); } }) </script> </body> </html> <!-- FILE ARCHIVED ON 09:55:18 Jul 12, 2012 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 08:11:01 Mar 03, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.504 exclusion.robots: 0.029 exclusion.robots.policy: 0.017 esindex: 0.01 cdx.remote: 11.863 LoadShardBlock: 173.808 (3) PetaboxLoader3.resolve: 186.054 (3) PetaboxLoader3.datanode: 81.302 (4) load_resource: 100.106 -->