Skip to main content
Version: 1.0.1

Update Email Template


Update an existing email template.

Endpoint​

PropertyValue
URLPUT /email-template/update/{templateId}
MethodPUT
AuthR-Auth: <company-jwt>
Content-Typeapplication/json
Base URLStage 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​

ParameterTypeRequiredDescription
templateIdUUIDYesUUID 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​

FieldTypeRequiredDescription
namestringYesTemplate name used to identify it in the Portal
languagestringYesLanguage code the template content is written in (e.g. EN)
subjectTemplatestringYesTemplate used to render the email subject line
bodyTemplatestringYesHTML 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​

FieldTypeDescription
(body)string (UUID)Unique identifier (UUID) of the updated email template. The response is a plain UUID value, not a JSON object.

Response Codes​

CodeDescription
200OK — Email template updated. Example value: 3fa85f64-5717-4562-b3fc-2c963f66afa6
201Created
401Unauthorized — R-Auth header missing or invalid
403Forbidden — Company is not authorized for this operation
404Not Found