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:
Region | Base URL |
---|---|
India | https://apiind.netcoresmartech.com/v4/content/get |
United States | https://api.netcoresmartech.com/v4/content/get |
Europe | https://apieu.netcoresmartech.com/v4/content/get |
Request Header
Authentication details are required to access the API. Ensure you include the necessary tokens or credentials in your request headers.
Header Name | Type | Description | Example | Required? |
---|---|---|---|---|
api-key | String | API key for authentication | 41a1de35948f915f64907ced9eed4f00 | Yes |
Request Body
All necessary parameters should be passed in the request body in JSON format.
Body Parameter | Data Type | Description | Part of Body Parameter | Required? |
---|---|---|---|---|
page_details | object | Object containing pagination details. | Yes | |
page_no | Integer | The page number to retrieve, useful for paginating through large datasets. | page_details | Yes |
page_size | Integer | The number of templates to retrieve per page. | page_details | Yes |
sorting_criteria | Object | Object defining the sorting criteria for the results. | No | |
sort_by | String | The field by which to sort the templates, options include last_modified_time or template_id . | sorting_criteria | No |
sort_order | String | The order of sorting, either desc for descending or asc for ascending. | sorting_criteria | No |
filtering_criteria | Object | Object containing criteria to filter the list of templates. | Yes | |
block_details | Array of objects | Specific filtering parameters. | filtering_criteria | Yes |
status | String | Filter by template status, option include archive or active . | block_details | No |
channel | String | Filter by channel, option include email . | block_details | Yes |
category | Array of Integers | Array of category IDs to filter templates that belong to specific categories. | block_details | No |
template_id | Array of Integers | Template IDs to retrieve specific templates. | block_details | No |
template_name_contains | String | Filter by partial template name, returning templates that contain the specified text. | block_details | No |
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 Code | Description | Response Sample |
---|---|---|
200 | The 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": "" } ] } |
400 | The request was invalid. Check the request parameters and body for errors. | { "message": "string", "statusCode": 0 } |
500 | An error occurred on the server while processing the request. | { "statusCode": 0, "message": "string" } |
Updated about 2 months ago