Update Email Template
Update an existing email template.
Endpoint
| Property | Value |
|---|---|
| URL | PUT /email-template/update/{templateId} |
| Method | PUT |
| Auth | R-Auth: <company-jwt> |
| Content-Type | application/json |
| Base URL | Stage Environment https://api-stage.docnova.ai/ Production Environment https://api.docnova.ai/ |
Example Request
curl --location '{{baseUrl}}/email-template/update/{{templateId}}' \
--header 'Content-Type: application/json' \
--header 'R-Auth: {{companyJwt}}' \
--request PUT \
--data-raw '{
"name": "template name update",
"language": "EN",
"bodyTemplate": "body template update",
"subjectTemplate": "subject template update"
}'
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | UUID | Yes | UUID of the email template to update, as returned by Save Email Template |
Request body
Same shape as Save Email Template.
{
"name": "template name update",
"language": "EN",
"bodyTemplate": "body template update",
"subjectTemplate": "subject template update"
}
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Template name used to identify it in the Portal |
language | string | Yes | Language code the template content is written in (e.g. EN) |
subjectTemplate | string | Yes | Template used to render the email subject line |
bodyTemplate | string | Yes | HTML template used to render the email body |
note
bodyTemplate and subjectTemplate support placeholders such as {{name}}, {{portalName}}, {{companyName}} and {{extra1}}, which are replaced with the actual values when the email is sent.
Response
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Response fields
| Field | Type | Description |
|---|---|---|
(body) | string (UUID) | Unique identifier (UUID) of the updated email template. The response is a plain UUID value, not a JSON object. |
Response Codes
| Code | Description |
|---|---|
200 | OK — Email template updated. Example value: 3fa85f64-5717-4562-b3fc-2c963f66afa6 |
201 | Created |
401 | Unauthorized — R-Auth header missing or invalid |
403 | Forbidden — Company is not authorized for this operation |
404 | Not Found |