Template Folders

Organize your templates using folders.

Available methods

    • POST /template-folders Create a template folder

      Create a template folder

      POST /template-folders

      Create a new template folder.

      Request body parameters

      name Type: String Title: Folder Name Read only: false The name of the folder.

      Response body parameters

      name Type: String Title: Folder Name Read only: false The name of the folder.
      id Type: String Title: Folder Id Read only: true A string that uniquely identifies this template folder.
      count Type: Integer Title: Template Count Read only: true The number of templates in the folder.
      _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/template-folders' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"name": "The name of the folder"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 1012
      Vary: Accept-Encoding
      X-Request-Id: 0d69f9a2-3761-4a91-b94e-32f51271aba2
      Link: <https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json>; rel="describedBy"
      Date: Fri, 20 Nov 2015 22:35:05 GMT
      Connection: keep-alive
      
      {
        "id": "d5091effc6",
        "name": "The name of the folder",
        "count": 0,
        "_links": [
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/TemplateFolders.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/d5091effc6",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/d5091effc6",
            "method": "DELETE"
          },
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/d5091effc6",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
          },
          {
            "rel": "templates",
            "href": "https://usX.api.mailchimp.com/3.0/templates?folder_id=d5091effc6",
            "method": "GET",
            "schema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.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 /template-folders Get all template folders
      GET /template-folders/{folder_id} Get a template folder

      Get all template folders

      GET /template-folders

      Get all folders used to organize 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.

      Response body parameters

      folders Type: Array Title: Template Folders Read only: false An array of objects representing template folders.
      Show properties
      name Type: String Title: Folder Name Read only: false The name of the folder.
      id Type: String Title: Folder Id Read only: true A string that uniquely identifies this template folder.
      count Type: Integer Title: Template Count Read only: true The number of templates in the folder.
      _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/template-folders' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 2635
      Vary: Accept-Encoding
      X-Request-Id: 657b10b4-4a53-4e95-9069-b5b227f00e2a
      Link: <https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json>; rel="describedBy"
      Date: Fri, 20 Nov 2015 22:38:04 GMT
      Connection: keep-alive
      
      {
        "folders": [
          {
            "id": "f758cc3387",
            "name": "New Product Templates",
            "count": 0,
            "_links": [
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json",
                "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/TemplateFolders.json"
              },
              {
                "rel": "update",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
                "method": "PATCH",
                "schema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
                "method": "DELETE"
              },
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
              },
              {
                "rel": "templates",
                "href": "https://usX.api.mailchimp.com/3.0/templates?folder_id=f758cc3387",
                "method": "GET",
                "schema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json"
              }
            ]
          },
          {
            "id": "d5091effc6",
            "name": "Announcement Templates",
            "count": 0,
            "_links": [
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json",
                "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/TemplateFolders.json"
              },
              {
                "rel": "update",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders/d5091effc6",
                "method": "PATCH",
                "schema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders/d5091effc6",
                "method": "DELETE"
              },
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/template-folders/d5091effc6",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
              },
              {
                "rel": "templates",
                "href": "https://usX.api.mailchimp.com/3.0/templates?folder_id=d5091effc6",
                "method": "GET",
                "schema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.json"
              }
            ]
          }
        ],
        "total_items": 2,
        "_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/template-folders",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/TemplateFolders.json"
          },
          {
            "rel": "create",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders",
            "method": "POST",
            "schema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.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 a template folder

      GET /template-folders/{folder_id}

      Get information about a specific folder used to organize templates.

      Path parameters

      folder_id The unique id for the template folder.

      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

      name Type: String Title: Folder Name Read only: false The name of the folder.
      id Type: String Title: Folder Id Read only: true A string that uniquely identifies this template folder.
      count Type: Integer Title: Template Count Read only: true The number of templates in the folder.
      _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/template-folders/f758cc3387' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 993
      Vary: Accept-Encoding
      X-Request-Id: ee90da56-453f-4138-94fb-972fed858400
      Link: <https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json>; rel="describedBy"
      Date: Fri, 20 Nov 2015 22:40:01 GMT
      Connection: keep-alive
      
      {
        "id": "f758cc3387",
        "name": "New Product Templates",
        "count": 0,
        "_links": [
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/TemplateFolders.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
            "method": "DELETE"
          },
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
          },
          {
            "rel": "templates",
            "href": "https://usX.api.mailchimp.com/3.0/templates?folder_id=f758cc3387",
            "method": "GET",
            "schema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.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.
    • PATCH /template-folders/{folder_id} Update a template folder

      Update a template folder

      PATCH /template-folders/{folder_id}

      Update a specific folder used to organize templates.

      Path parameters

      folder_id The unique id for the template folder.

      Request body parameters

      name Type: String Title: Folder Name Read only: false The name of the folder.

      Response body parameters

      name Type: String Title: Folder Name Read only: false The name of the folder.
      id Type: String Title: Folder Id Read only: true A string that uniquely identifies this template folder.
      count Type: Integer Title: Template Count Read only: true The number of templates in the folder.
      _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/template-folders/f758cc3387' \
      --header 'content-type: application/json' \
      --data '{"name": "The updated name of the folder"}' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 1020
      Vary: Accept-Encoding
      X-Request-Id: 495b7582-d3c6-45c2-b466-e75006812412
      Link: <https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json>; rel="describedBy"
      Date: Fri, 20 Nov 2015 22:44:49 GMT
      Connection: keep-alive
      
      {
        "id": "f758cc3387",
        "name": "The updated name of the folder",
        "count": 0,
        "_links": [
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/TemplateFolders.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
            "method": "DELETE"
          },
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/TemplateFolders/Instance.json"
          },
          {
            "rel": "templates",
            "href": "https://usX.api.mailchimp.com/3.0/templates?folder_id=f758cc3387",
            "method": "GET",
            "schema": "https://api.mailchimp.com/schema/3.0/Templates/Collection.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 a template folder

      DELETE /template-folders/{folder_id}

      Delete a specific template folder, and mark all the templates in the folder as ‘unfiled’.

      Path parameters

      folder_id The unique id for the template folder.

      Example request

      
      curl --request DELETE \
      --url 'https://usX.api.mailchimp.com/3.0/template-folders/f758cc3387' \
      --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: 6606ae61-18ac-48ec-9928-4525e4e84903
      Date: Fri, 20 Nov 2015 22:47:15 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.