> 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