Templates

Manage your MailChimp templates. A template is an HTML file used to create the layout and basic design for a campaign. Learn more about templates.

Subresources

Available methods

    • POST /templates Create a new template

      Create a new template

      POST /templates

      Create a new template for the account. Only Classic templates are supported.

      Request body parameters

      name Type: String Title: Template Name Read only: false The name of the template.
      folder_id Type: String Title: Folder ID Read only: false The id of the folder the template is currently in.
      html Type: String Title: Template HTML Read only: false The raw HTML for the template. We support the MailChimp Template Language in any HTML code passed via the API.

      Response body parameters

      id Type: Integer Title: Template ID Read only: true The individual id for the template.
      type Type: String Title: Template Type Read only: true The type of template (user, base, or gallery).
      name Type: String Title: Template Name Read only: false The name of the template.
      drag_and_drop Type: Boolean Title: Drag and Drop Read only: true Whether the template uses the drag and drop editor.
      responsive Type: Boolean Title: Responsive Read only: true Whether the template contains media queries to make it responsive.
      category Type: String Title: Template Category Read only: true If available, the category the template is listed in.
      date_created Type: String Title: Date Created Read only: true The date and time the template was created.
      created_by Type: String Title: Created By Read only: true The login name for template’s creator.
      active Type: Boolean Title: Active Read only: true User templates are not ‘deleted,’ but rather marked as ‘inactive.’ Returns whether the template is still active.
      folder_id Type: String Title: Folder ID Read only: false The id of the folder the template is currently in.
      thumbnail Type: String Title: Template Thumbnail Read only: true If available, the URL for a thumbnail of the template.
      share_url Type: String Title: Share URL Read only: true The URL used for template sharing.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request POST \
      --url 'https://usX.api.mailchimp.com/3.0/templates' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"name":"Test Template","html":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\">\n<html>\n    <head>\n        <meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\">\n        \n        <meta property=\"og:title\" content=\"*|MC:SUBJECT|*\">\n        \n        <title>*|MC:SUBJECT|*<\/title>\n\t\t\n\t<style type=\"text\/css\">\n\t\t#outlook a{\n\t\t\tpadding:0;\n\t\t}\n\t\tbody{\n\t\t\twidth:100% !important;\n\t\t}\n\t\tbody{\n\t\t\t-webkit-text-size-adjust:none;\n\t\t}\n\t\tbody{\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t}\n\t\timg{\n\t\t\tborder:none;\n\t\t\tfont-size:14px;\n\t\t\tfont-weight:bold;\n\t\t\theight:auto;\n\t\t\tline-height:100%;\n\t\t\toutline:none;\n\t\t\ttext-decoration:none;\n\t\t\ttext-transform:capitalize;\n\t\t}\n\t\t#backgroundTable{\n\t\t\theight:100% !important;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t\twidth:100% !important;\n\t\t}\n\t\tbody,.backgroundTable{\n\t\t\tbackground-color:#FAFAFA;\n\t\t}\n\t\t#templateContainer{\n\t\t\tborder:1px solid #DDDDDD;\n\t\t}\n\t\th1,.h1{\n\t\t\tcolor:#202020;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:34px;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:100%;\n\t\t\tmargin-bottom:10px;\n\t\t\ttext-align:left;\n\t\t}\n\t\th2,.h2{\n\t\t\tcolor:#202020;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:30px;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:100%;\n\t\t\tmargin-bottom:10px;\n\t\t\ttext-align:left;\n\t\t}\n\t\th3,.h3{\n\t\t\tcolor:#202020;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:26px;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:100%;\n\t\t\tmargin-bottom:10px;\n\t\t\ttext-align:left;\n\t\t}\n\t\th4,.h4{\n\t\t\tcolor:#202020;\n\t\t\tdisplay:block;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:22px;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:100%;\n\t\t\tmargin-bottom:10px;\n\t\t\ttext-align:left;\n\t\t}\n\t\t#templatePreheader{\n\t\t\tbackground-color:#FAFAFA;\n\t\t}\n\t\t.preheaderContent div{\n\t\t\tcolor:#505050;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:10px;\n\t\t\tline-height:100%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.preheaderContent div a:link,.preheaderContent div a:visited{\n\t\t\tcolor:#336699;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t.preheaderContent div img{\n\t\t\theight:auto;\n\t\t\tmax-width:600px;\n\t\t}\n\t\t#templateHeader{\n\t\t\tbackground-color:#FFFFFF;\n\t\t\tborder-bottom:0;\n\t\t}\n\t\t.headerContent{\n\t\t\tcolor:#202020;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:34px;\n\t\t\tfont-weight:bold;\n\t\t\tline-height:100%;\n\t\t\tpadding:0;\n\t\t\ttext-align:center;\n\t\t\tvertical-align:middle;\n\t\t}\n\t\t.headerContent a:link,.headerContent a:visited{\n\t\t\tcolor:#336699;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t#headerImage{\n\t\t\theight:auto;\n\t\t\tmax-width:600px !important;\n\t\t}\n\t\t#templateContainer,.bodyContent{\n\t\t\tbackground-color:#FDFDFD;\n\t\t}\n\t\t.bodyContent div{\n\t\t\tcolor:#505050;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:14px;\n\t\t\tline-height:150%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.bodyContent div a:link,.bodyContent div a:visited{\n\t\t\tcolor:#336699;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t.bodyContent img{\n\t\t\tdisplay:inline;\n\t\t\tmargin-bottom:10px;\n\t\t}\n\t\t#templateFooter{\n\t\t\tbackground-color:#FDFDFD;\n\t\t\tborder-top:0;\n\t\t}\n\t\t.footerContent div{\n\t\t\tcolor:#707070;\n\t\t\tfont-family:Arial;\n\t\t\tfont-size:12px;\n\t\t\tline-height:125%;\n\t\t\ttext-align:left;\n\t\t}\n\t\t.footerContent div a:link,.footerContent div a:visited{\n\t\t\tcolor:#336699;\n\t\t\tfont-weight:normal;\n\t\t\ttext-decoration:underline;\n\t\t}\n\t\t.footerContent img{\n\t\t\tdisplay:inline;\n\t\t}\n\t\t#social{\n\t\t\tbackground-color:#FAFAFA;\n\t\t\tborder:1px solid #F5F5F5;\n\t\t}\n\t\t#social div{\n\t\t\ttext-align:center;\n\t\t}\n\t\t#utility{\n\t\t\tbackground-color:#FDFDFD;\n\t\t\tborder-top:1px solid #F5F5F5;\n\t\t}\n\t\t#utility div{\n\t\t\ttext-align:center;\n\t\t}\n\t\t#monkeyRewards img{\n\t\t\tmax-width:160px;\n\t\t}\n<\/style><\/head>\n    <body leftmargin=\"0\" marginwidth=\"0\" topmargin=\"0\" marginheight=\"0\" offset=\"0\">\n    \t<center>\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"100%\" width=\"100%\" id=\"backgroundTable\">\n            \t<tr>\n                \t<td align=\"center\" valign=\"top\">\n                        <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"600\" id=\"templatePreheader\">\n                            <tr>\n                                <td valign=\"top\" class=\"preheaderContent\">\n                                \n                                    <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\">\n                                    \t<tr>\n                                        \t<td valign=\"top\">\n                                            \t<div mc:edit=\"std_preheader_content\">\n                                                \tUse one or two sentences in this area to offer a teaser of your email content. Text here will show in a preview area in some email clients.\n                                                <\/div>\n                                            <\/td>\n                                            <td valign=\"top\" width=\"180\">\n                                            \t<div mc:edit=\"std_preheader_links\">\n                                                \t<!-- *|IFNOT:ARCHIVE_PAGE|* -->Is this email not displaying correctly?<br><a href=\"*|ARCHIVE|*\" target=\"_blank\">View it in your browser<\/a>.<!-- *|END:IF|* -->\n                                                <\/div>\n                                            <\/td>\n                                        <\/tr>\n                                    <\/table>\n                                \n                                <\/td>\n                            <\/tr>\n                        <\/table>\n                    \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" id=\"templateContainer\">\n                        \t<tr>\n                            \t<td align=\"center\" valign=\"top\">\n                                \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" id=\"templateHeader\">\n                                        <tr>\n                                            <td class=\"headerContent\">\n                                            \n                                            \t<img src=\"http:\/\/gallery.mailchimp.com\/653153ae841fd11de66ad181a\/images\/placeholder_600.gif\" style=\"max-width:600px;\" id=\"headerImage campaign-icon\" mc:label=\"header_image\" mc:edit=\"header_image\" mc:allowdesigner=\"\" mc:allowtext=\"\">\n                                            \n                                            <\/td>\n                                        <\/tr>\n                                    <\/table>\n                                <\/td>\n                            <\/tr>\n                        \t<tr>\n                            \t<td align=\"center\" valign=\"top\">\n                                \t<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"600\" id=\"templateBody\">\n                                    \t<tr>\n                                            <td valign=\"top\" class=\"bodyContent\">\n                                \n                                                <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\">\n                                                    <tr>\n                                                        <td valign=\"top\">\n                                                            <div mc:edit=\"std_content00\">\n                                                                <span class=\"h1\">Heading 1<\/span>\n                                                                <span class=\"h2\">Heading 2<\/span>\n                                                                <span class=\"h3\">Heading 3<\/span>\n                                                                <span class=\"h4\">Heading 4<\/span>\n                                                                <strong>Getting started:<\/strong> Customize your template by clicking on the style editor tabs up above. Set your fonts, colors, and styles. After setting your styling is all done you can click here in this area, delete the text, and start adding your own awesome content.\n                                                                <br>\n                                                                <br>\n                                                                After you enter your content, highlight the text you want to style and select the options you set in the style editor in the \"styles\" drop down box. Want to <a href=\"http:\/\/www.mailchimp.com\/kb\/article\/im-using-the-style-designer-and-i-cant-get-my-formatting-to-change\" target=\"_blank\">get rid of styling on a bit of text<\/a>, but having trouble doing it? Just use the \"clear styles\" button to strip the text of any formatting and reset your style.\n                                                            <\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/td>\n                                                    <\/tr>\n                                                <\/table>                                              \n                                            <\/td>\n                                        <\/tr>\n                                    <\/table>\n                                <\/td>\n                            <\/tr>\n                        \t<tr>\n                            \t<td align=\"center\" valign=\"top\">\n                                \t<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"600\" id=\"templateFooter\">\n                                    \t<tr>\n                                        \t<td valign=\"top\" class=\"footerContent\">\n                                                <table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\">\n                                                    <tr>\n                                                        <td colspan=\"2\" valign=\"middle\" id=\"social\">\n                                                            <div mc:edit=\"std_social\">\n                                                                &nbsp;<a href=\"*|TWITTER:PROFILEURL|*\">follow on Twitter<\/a> | <a href=\"*|FACEBOOK:PROFILEURL|*\">friend on Facebook<\/a> | <a href=\"*|FORWARD|*\">forward to a friend<\/a>&nbsp;\n                                                            <\/div>\n                                                        <\/td>\n                                                    <\/tr>\n                                                    <tr>\n                                                        <td valign=\"top\" width=\"370\">\n                                                            <br>\n                                                            <div mc:edit=\"std_footer\">\n                                                                *|IF:LIST|*\n                                                                <em>Copyright &copy; *|CURRENT_YEAR|* *|LIST:COMPANY|*, All rights reserved.<\/em>\n                                                                <br>\n                                                                <!-- *|IFNOT:ARCHIVE_PAGE|* -->\n                                                                *|LIST:DESCRIPTION|*\n                                                                <br>\n                                                                <strong>Our mailing address is:<\/strong>\n                                                                <br>\n                                                                *|HTML:LIST_ADDRESS_HTML|*\n                                                                <br>\n                                                                <!-- *|END:IF|* -->\n                                                                *|ELSE:|*\n                                                                <!-- *|IFNOT:ARCHIVE_PAGE|* -->\n                                                                <em>Copyright &copy; *|CURRENT_YEAR|* *|USER:COMPANY|*, All rights reserved.<\/em>\n                                                                <br>\n                                                                <strong>Our mailing address is:<\/strong>\n                                                                <br>\n                                                                *|USER:ADDRESS_HTML|*\n                                                                <!-- *|END:IF|* -->\n                                                                *|END:IF|*\n                                                            <\/div>\n                                                            <br>\n                                                        <\/td>\n                                                        <td valign=\"top\" width=\"170\" id=\"monkeyRewards\">\n                                                            <br>\n                                                            <div mc:edit=\"monkeyrewards\">\n                                                                *|IF:REWARDS|* *|HTML:REWARDS|* *|END:IF|*\n                                                            <\/div>\n                                                            <br>\n                                                        <\/td>\n                                                    <\/tr>\n                                                    <tr>\n                                                        <td colspan=\"2\" valign=\"middle\" id=\"utility\">\n                                                            <div mc:edit=\"std_utility\">\n                                                                &nbsp;<a href=\"*|UNSUB|*\">unsubscribe from this list<\/a> | <a href=\"*|UPDATE_PROFILE|*\">update subscription preferences<\/a><!-- *|IFNOT:ARCHIVE_PAGE|* --> | <a href=\"*|ARCHIVE|*\">view email in browser<\/a><!-- *|END:IF|* -->&nbsp;\n                                                            <\/div>\n                                                        <\/td>\n                                                    <\/tr>\n                                                <\/table>\n                                            \n                                            <\/td>\n                                        <\/tr>\n                                    <\/table>\n                                <\/td>\n                            <\/tr>\n                        <\/table>\n                        <br>\n                    <\/td>\n                <\/tr>\n            <\/table>\n        <\/center>\n    <\/body>\n<\/html>"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Fri, 05 Feb 2016 15:24:09 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1056
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 2280c66a-44de-4b10-9f91-2f26448ef09e
      Link: <https://api.mailchimp.com/schema/3.0/Templates/Instance.json>; rel="describedBy", <https://usX.admin.mailchimp.com/templates/edit?id=265057>; rel="dashboard"
      
      {
        "id": 265057,
        "type": "user",
        "name": "Test Template",
        "drag_and_drop": false,
        "responsive": false,
        "category": "",
        "date_created": "2016-02-05 15:24:09",
        "created_by": "Freddie von Chimpenheimer",
        "active": true,
        "thumbnail": "",
        "share_url": "",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/templates/265057",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/templates",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/templates/265057",
            "method": "DELETE"
          },
          {
            "rel": "default-content",
            "href": "https://usX.api.mailchimp.com/3.0/templates/265057/default-content",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Defaultcontent/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • GET /templates Get all templates
      GET /templates/{template_id} Get information about a specific template

      Get all templates

      GET /templates

      Get a list of an account’s available templates.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
      count Type: Integer Title: Count Read only: true The number of records to return. Default value is 10.
      offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.
      created_by Type: String Title: Created By Read only: false The MailChimp account user who created the template.
      since_created_at Type: String Title: Since Created At Read only: false Restrict the response to templates created after the set date.
      before_created_at Type: String Title: Before Created At Read only: false Restrict the response to templates created before the set date.
      type Type: String Title: Template Type Read only: false Limit results based on template type.
      category Type: String Title: Category Read only: false Limit results based on category.
      folder_id Type: String Title: Folder ID Read only: false The unique folder id.

      Response body parameters

      templates Type: Array Title: User Templates Read only: false All of an account’s saved or custom templates.
      Show properties
      id Type: Integer Title: Template ID Read only: true The individual id for the template.
      type Type: String Title: Template Type Read only: true The type of template (user, base, or gallery).
      name Type: String Title: Template Name Read only: false The name of the template.
      drag_and_drop Type: Boolean Title: Drag and Drop Read only: true Whether the template uses the drag and drop editor.
      responsive Type: Boolean Title: Responsive Read only: true Whether the template contains media queries to make it responsive.
      category Type: String Title: Template Category Read only: true If available, the category the template is listed in.
      date_created Type: String Title: Date Created Read only: true The date and time the template was created.
      created_by Type: String Title: Created By Read only: true The login name for template’s creator.
      active Type: Boolean Title: Active Read only: true User templates are not ‘deleted,’ but rather marked as ‘inactive.’ Returns whether the template is still active.
      folder_id Type: String Title: Folder ID Read only: false The id of the folder the template is currently in.
      thumbnail Type: String Title: Template Thumbnail Read only: true If available, the URL for a thumbnail of the template.
      share_url Type: String Title: Share URL Read only: true The URL used for template sharing.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
      total_items Type: Integer Title: Item Count Read only: false The total number of items matching the query regardless of pagination.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/templates' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Vary: Accept-Encoding
      X-Request-Id: 6788ee52-8a1d-40a2-af0b-4c7a5a6df968
      Link: <https://api.mailchimp.com/schema/3.0/Templates/Collection.json>; rel="describedBy"
      Content-Length: 8503
      Date: Thu, 17 Sep 2015 19:15:57 GMT
      Connection: keep-alive
      
      
      {
        "templates": [
          {
            "id": 2000094,
            "type": "gallery",
            "name": "Event by Veerle Pieters",
            "drag_and_drop": true,
            "responsive": true,
            "category": "Events",
            "date_created": "2015-09-16 13:16:04",
            "created_by": "",
            "active": true,
            "folder_id": 0,
            "thumbnail": "http://gallery.mailchimp.com/27aac8a65e64c994c4416d6b8/images/event_veerle_pieters_nb.png",
            "share_url": "",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/templates/2000094",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/templates",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json",
                "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/templates/2000094",
                "method": "DELETE"
              }
            ]
          }
        ],
        "_links": [
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Root.json"
          },
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/templates",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
          }
        ],
        "total_items": 1
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

      Get information about a specific template

      GET /templates/{template_id}

      Get information about a specific template.

      Path parameters

      template_id The unique id for the template.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

      Response body parameters

      id Type: Integer Title: Template ID Read only: true The individual id for the template.
      type Type: String Title: Template Type Read only: true The type of template (user, base, or gallery).
      name Type: String Title: Template Name Read only: false The name of the template.
      drag_and_drop Type: Boolean Title: Drag and Drop Read only: true Whether the template uses the drag and drop editor.
      responsive Type: Boolean Title: Responsive Read only: true Whether the template contains media queries to make it responsive.
      category Type: String Title: Template Category Read only: true If available, the category the template is listed in.
      date_created Type: String Title: Date Created Read only: true The date and time the template was created.
      created_by Type: String Title: Created By Read only: true The login name for template’s creator.
      active Type: Boolean Title: Active Read only: true User templates are not ‘deleted,’ but rather marked as ‘inactive.’ Returns whether the template is still active.
      folder_id Type: String Title: Folder ID Read only: false The id of the folder the template is currently in.
      thumbnail Type: String Title: Template Thumbnail Read only: true If available, the URL for a thumbnail of the template.
      share_url Type: String Title: Share URL Read only: true The URL used for template sharing.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/templates/2000094' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 855
      Vary: Accept-Encoding
      X-Request-Id: 5a554e78-22a3-40d1-93e8-e6e73d0ad1ab
      Link: <https://api.mailchimp.com/schema/3.0/Templates/Instance.json>; rel="describedBy"
      Date: Thu, 17 Sep 2015 19:18:22 GMT
      Connection: keep-alive
      
      
      {
        "id": 2000094,
        "type": "gallery",
        "name": "Event by Veerle Pieters",
        "drag_and_drop": true,
        "responsive": true,
        "category": "Events",
        "date_created": "2015-09-16 13:16:04",
        "created_by": "",
        "active": true,
        "folder_id": 0,
        "thumbnail": "http://gallery.mailchimp.com/27aac8a65e64c994c4416d6b8/images/event_veerle_pieters_nb.png",
        "share_url": "",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/templates/2000094",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/templates",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/templates/2000094",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • PATCH /templates/{template_id} Update an existing template

      Update an existing template

      PATCH /templates/{template_id}

      Update the name, HTML, or folder_id of an existing template.

      Path parameters

      template_id The unique id for the template.

      Request body parameters

      name Type: String Title: Template Name Read only: false The name of the template.
      folder_id Type: String Title: Folder ID Read only: false The id of the folder the template is currently in.
      html Type: String Title: Template HTML Read only: false The raw HTML for the template. We support the MailChimp Template Language in any HTML code passed via the API.

      Response body parameters

      id Type: Integer Title: Template ID Read only: true The individual id for the template.
      type Type: String Title: Template Type Read only: true The type of template (user, base, or gallery).
      name Type: String Title: Template Name Read only: false The name of the template.
      drag_and_drop Type: Boolean Title: Drag and Drop Read only: true Whether the template uses the drag and drop editor.
      responsive Type: Boolean Title: Responsive Read only: true Whether the template contains media queries to make it responsive.
      category Type: String Title: Template Category Read only: true If available, the category the template is listed in.
      date_created Type: String Title: Date Created Read only: true The date and time the template was created.
      created_by Type: String Title: Created By Read only: true The login name for template’s creator.
      active Type: Boolean Title: Active Read only: true User templates are not ‘deleted,’ but rather marked as ‘inactive.’ Returns whether the template is still active.
      folder_id Type: String Title: Folder ID Read only: false The id of the folder the template is currently in.
      thumbnail Type: String Title: Template Thumbnail Read only: true If available, the URL for a thumbnail of the template.
      share_url Type: String Title: Share URL Read only: true The URL used for template sharing.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request PATCH \
      --url 'https://usX.api.mailchimp.com/3.0/templates/265057' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"name":"This is an updated Template name"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Fri, 05 Feb 2016 16:08:36 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1164
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: ea702ecd-91dc-44a3-9c84-139d68a7447f
      Link: <https://api.mailchimp.com/schema/3.0/Templates/Instance.json>; rel="describedBy", <https://usX.admin.mailchimp.com/templates/edit?id=265057>; rel="dashboard"
      
      {
        "id": 265057,
        "type": "user",
        "name": "This is an updated Template name",
        "drag_and_drop": false,
        "responsive": false,
        "category": "",
        "date_created": "2016-02-05 15:24:09",
        "created_by": "Freddie von Chimpenheimer",
        "active": true,
        "thumbnail": "http://gallery.mailchimp.com/xxxx/template-screens/265057_screen.png",
        "share_url": "",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/templates/265057",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/templates",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/templates/265057",
            "method": "DELETE"
          },
          {
            "rel": "default-content",
            "href": "https://usX.api.mailchimp.com/3.0/templates/265057/default-content",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Templates/Defaultcontent/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Templates.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • DELETE /templates/{template_id} Delete a specific template

      Delete a specific template

      DELETE /templates/{template_id}

      Delete a specific template.

      Path parameters

      template_id The unique id for the template.

      Example request

      
      curl --request DELETE \
      --url 'https://usX.api.mailchimp.com/3.0/templates/2000094' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 204 No Content
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 2
      X-Request-Id: 0e71b16c-d99f-4651-b2e5-ea39747f44e1
      Date: Wed, 17 Sep 2015 20:29:37 GMT
      Connection: keep-alive
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.