> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://mailchimp.com/developer/transactional/api/templates/list/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mailchimp.com/_mcp/server. # List all templates POST https://mandrillapp.com/api/1.4/templates/list Content-Type: application/json Returns a list of all templates available to this user. Reference: https://mailchimp.com/developer/transactional/api/templates/list ## Request ### Body (application/json) This endpoint expects a TemplatesListRequest. - `key` (string, required) — A valid Mandrill API key - `label` (string, optional, nullable) — Optional label to filter the templates ## Response ### 200 Success - `list of TemplatesTemplate` ## Errors ### 401 Unauthorized Error Invalid or missing API key. - `status` (string, required) — Status of the response, typically "error" - `code` (enum, required) — Numeric error code - Allowed values: `401` - `name` (enum, required) — Machine-friendly error name - Allowed values: `Invalid_Key` - `message` (string, required) — Human-readable error message ### 500 Internal Server Error An unexpected internal server error occurred. - `status` (string, required) — Status of the response, typically "error" - `code` (integer, required) — Numeric error code - `name` (string, required) — Machine-friendly error name - `message` (string, required) — Human-readable error message ## Types ### TemplatesTemplate Template information including content, metadata, and settings - `slug` (string, required) — Immutable unique identifier for the template - `name` (string, required) — Human-readable name of the template - `labels` (list of string, required) — Array of labels for filtering templates - `code` (string, required, nullable) — Draft HTML code for the template with mc:edit attributes - `subject` (string, required, nullable) — Draft default subject line - `from_email` (string, required, nullable) — Draft default sending address - `from_name` (string, required, nullable) — Draft default from name - `text` (string, required, nullable) — Draft default text part - `publish_name` (string, required) — Published name of the template - `publish_code` (string, required, nullable) — Published HTML code for the template - `publish_subject` (string, required, nullable) — Published default subject line - `publish_from_email` (string, required, nullable) — Published default sending address - `publish_from_name` (string, required, nullable) — Published default from name - `publish_text` (string, required, nullable) — Published default text part - `published_at` (string, required, nullable) — Date and time when template was last published in UTC YYYY-MM-DD HH:MM:SS format - `created_at` (string, required) — Date and time when template was created in UTC YYYY-MM-DD HH:MM:SS format - `updated_at` (string, required) — Date and time when template was last updated in UTC YYYY-MM-DD HH:MM:SS format - `is_broken_template` (boolean, required) — Whether the template has broken syntax or references - `draft_updated_at` (string, optional) — Date and time when template draft was last updated in UTC YYYY-MM-DD HH:MM:SS format ## Examples **Request** ```json { "key": "ONzNrsmbtNXoIKyfPmjnig", "label": "example-label" } ``` **Response** ```json [ { "slug": "test-template", "name": "test-template", "labels": [], "code": "

test

", "subject": "test", "from_email": "test@mailchimp.com", "from_name": "Freddie", "text": "test", "publish_name": "test-template", "publish_code": "

test

", "publish_subject": "test", "publish_from_email": "test@mailchimp.com", "publish_from_name": "Freddie", "publish_text": "test", "published_at": "2025-08-29 18:47:40", "created_at": "2025-08-29 18:47:40.26276", "updated_at": "2025-08-29 18:47:40.26277", "is_broken_template": false, "draft_updated_at": "2025-08-29 18:47:40" } ] ``` **SDK Code** ```python import requests url = "https://mandrillapp.com/api/1.4/templates/list" payload = { "key": "ONzNrsmbtNXoIKyfPmjnig", "label": "example-label" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://mandrillapp.com/api/1.4/templates/list'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"key":"ONzNrsmbtNXoIKyfPmjnig","label":"example-label"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://mandrillapp.com/api/1.4/templates/list" payload := strings.NewReader("{\n \"key\": \"ONzNrsmbtNXoIKyfPmjnig\",\n \"label\": \"example-label\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://mandrillapp.com/api/1.4/templates/list") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{\n \"key\": \"ONzNrsmbtNXoIKyfPmjnig\",\n \"label\": \"example-label\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://mandrillapp.com/api/1.4/templates/list") .header("Content-Type", "application/json") .body("{\n \"key\": \"ONzNrsmbtNXoIKyfPmjnig\",\n \"label\": \"example-label\"\n}") .asString(); ``` ```php request('POST', 'https://mandrillapp.com/api/1.4/templates/list', [ 'body' => '{ "key": "ONzNrsmbtNXoIKyfPmjnig", "label": "example-label" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://mandrillapp.com/api/1.4/templates/list"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"key\": \"ONzNrsmbtNXoIKyfPmjnig\",\n \"label\": \"example-label\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "key": "ONzNrsmbtNXoIKyfPmjnig", "label": "example-label" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://mandrillapp.com/api/1.4/templates/list")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Find all the Mailchimp API documentation and tools developers need to send marketing and transactional emails.