Update Email Template
Learn to update email template with API
This API allows you to update existing email templates across various channels. This is currently supported exclusively for email channels.
HTTP Method
This API uses the POST
method to update a existing email template.
API Endpoint
The Update 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/update |
United States | https://api.netcoresmartech.com/v4/content/update |
Europe | https://apieu.netcoresmartech.com/v4/content/update |
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 | Required? | Part of Body Parameter |
---|---|---|---|---|
channel | string | Specifies the platform for the template. For example: email | Yes | |
template_id | integer | Template ID of the template to be updated. | Yes | |
status | string | Status of the template, either "active" or "archive". | No | |
template_content_meta_data | object | Contains metadata about the template content. | Yes | |
type | string | Intake type, either "URL" or "inline". Only one can be used; choosing one excludes the other. | Yes | template_content_meta_data |
encoding | string | Specifies encoding as "base64" or left blank. Note: If "base64" encoding is specified, the content within the content block (inline_html or amp_inline_html), must adhere to base64 encoding standards. | No | template_content_meta_data |
category | string | Optional category for the template. If unspecified, the template remains uncategorized. | No | template_content_meta_data |
template_content_block | object | Contains the actual content for the template. | Yes | |
html_url | string | URL for HTML content, applicable when type is "url". | No | template_content_block |
inline_html | string | Inline HTML content, applicable when type is "inline". | No | template_content_block |
amp_url | string | AMP HTML URL, applicable when type is "url". | No | template_content_block |
amp_inline_html | null | AMP HTML inline content, applicable when type is "inline" for AMP templates. | No | template_content_block |
template_name | string | Required name of template | Yes |
Example Request Body
{
"status": "active",
"channel": "email",
"template_id": 20,
"template_content_block": {
"amp_url": "",
"html_url": "",
"inline_html": "<<html content>>",
"template_name": "Updated Template"
},
"template_content_meta_daa": {
"type": "inline",
"category": "Marketing",
"encoding": "base64"
}
}
Response & Error Codes
Error Code | Description | Example Sample |
---|---|---|
200 | The request was successful, and the template was created. | { "data": { "status": "string", "description": "string", "template_id": "1223" }, "message": "string", "statusCode": 0 } |
400 | The request was invalid. Check the request parameters and body for errors. | { "statusCode": 0, "message": "string" } |
500 | An error occurred on the server while processing the request. | { "statusCode": 0, "message": "string" } |
Updated about 1 month ago