List Email Template

Learn to retrieve details about a list of all Email Templates with API.

This API allows you to retrieves detailed information about a list of all Email templates.

HTTP Method

This API uses the POST method to update a existing email template.

API Endpoint

The List Email Template API is available across multiple regions; below are the base URLs for different regions:

Request Header

Authentication details are required to access the API. Ensure you include the necessary tokens or credentials in your request headers.

Header NameTypeDescriptionExampleRequired?
api-keyStringAPI key for authentication41a1de35948f915f64907ced9eed4f00Yes

Request Body

All necessary parameters should be passed in the request body in JSON format.

Body ParameterData TypeDescriptionPart of Body ParameterRequired?
page_detailsobjectObject containing pagination details.Yes
page_noIntegerThe page number to retrieve, useful for paginating through large datasets.page_detailsYes
page_sizeIntegerThe number of templates to retrieve per page.page_detailsYes
sorting_criteriaObjectObject defining the sorting criteria for the results.No
sort_byStringThe field by which to sort the templates, options include last_modified_time or template_id.sorting_criteriaNo
sort_orderStringThe order of sorting, either desc for descending or asc for ascending.sorting_criteriaNo
filtering_criteriaObjectObject containing criteria to filter the list of templates.Yes
block_detailsArray of objectsSpecific filtering parameters.filtering_criteriaYes
statusStringFilter by template status, option include archive or active.block_detailsNo
channelStringFilter by channel, option include email.block_detailsYes
categoryArray of IntegersArray of category IDs to filter templates that belong to specific categories.block_detailsNo
template_idArray of IntegersTemplate IDs to retrieve specific templates.block_detailsNo
template_name_containsStringFilter by partial template name, returning templates that contain the specified text.block_detailsNo

Example Request Body

{
  "page_details": {
    "page_no": 23,
    "page_size": 20
  },
  "sorting_criteria": {
    "sort_by": "last_modified_time | template_id",
    "sort_order": "desc"
  },
  "filtering_criteria": {
    "block_details": [
      {
        "status": "archive | active",
        "channel": "email",
        "category": [
          3,
          45,
          67,
          2,
          34
        ],
        "template_id": [
          123,
          23,
          546,
          5434
        ],
        "template_name_contains": "partial search text"
      }
    ]
  }
}'

Response & Error Codes

Error CodeDescriptionResponse Sample
200The request was successful, and the template was created.{ "page_no": 23, "page_max": 55, "page_size": 20, "template_details": [ { "channel": "email", "category": "cat", "template_id": 23, "created_time": "", "template_name": "name", "last_updated_time": "" }, { "channel": "email", "category": "cat", "template_id": 23, "created_time": "", "template_name": "name", "last_updated_time": "" } ] }
400The request was invalid. Check the request parameters and body for errors.{ "message": "string", "statusCode": 0 }
500An error occurred on the server while processing the request.{ "statusCode": 0, "message": "string" }