PUT api/emails/{id}

This method will update existing email template for an active user

Requires Authorization!

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Id of the email template record to update

integer

Required

Body Parameters

Instance of Updated email model

EmailTemplateBindingModel
NameDescriptionTypeAdditional information
Name

string

Required

Content

string

Required

IsHtml

boolean

None.

MassEmailSupport

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "content": "sample string 2",
  "isHtml": true,
  "massEmailSupport": true
}

text/html

Sample:
{"name":"sample string 1","content":"sample string 2","isHtml":true,"massEmailSupport":true}

application/xml, text/xml

Sample:
<EmailTemplateBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.Emails">
  <Content>sample string 2</Content>
  <IsHtml>true</IsHtml>
  <MassEmailSupport>true</MassEmailSupport>
  <Name>sample string 1</Name>
</EmailTemplateBindingModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'EmailTemplateBindingModel'.

Response Information

Resource Description

Instance of Update email object model

EmailTemplateResponseModel
NameDescriptionTypeAdditional information
Id

integer

None.

UserId

integer

None.

Name

string

None.

Content

string

None.

IsHtml

boolean

None.

MassEmailSupport

boolean

None.

DeleteAllowed

boolean

None.

AddedDate

date

None.

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "userId": 2,
  "name": "sample string 3",
  "content": "sample string 4",
  "isHtml": true,
  "massEmailSupport": true,
  "deleteAllowed": true,
  "addedDate": "2025-07-06T04:21:05.6654468-05:00"
}

text/html

Sample:
{"id":1,"userId":2,"name":"sample string 3","content":"sample string 4","isHtml":true,"massEmailSupport":true,"deleteAllowed":true,"addedDate":"2025-07-06T04:21:05.6654468-05:00"}

application/xml, text/xml

Sample:
<EmailTemplateResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.Emails">
  <AddedDate>2025-07-06T04:21:05.6654468-05:00</AddedDate>
  <Content>sample string 4</Content>
  <DeleteAllowed>true</DeleteAllowed>
  <Id>1</Id>
  <IsHtml>true</IsHtml>
  <MassEmailSupport>true</MassEmailSupport>
  <Name>sample string 3</Name>
  <UserId>2</UserId>
</EmailTemplateResponseModel>