PUT
/
templates
/
{id}
curl --request PUT \
  --url http://base.url.com/templates/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-phishy-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "subject": "<string>",
  "text": "<string>",
  "html": "<string>",
  "attachment_name": "<string>",
  "attachmentInBody": true,
  "attachmentRedirectToPhished": true,
  "is_check_clicked_link": true,
  "is_check_submitted_data": true,
  "is_check_file_downloaded": true,
  "is_check_file_executed": true
}'
{
  "id": "<string>",
  "name": "<string>",
  "content": "<string>"
}

Authorizations

x-phishy-api-key
string
header
required

Body

application/json
Updated details of the template
name
string
required

Name of the email template

subject
string
required

Subject line of the email template

text
string
required

Plain text version of the email content

html
string
required

HTML content of the email, can include MJML or standard HTML

attachment_name
string
required

Name of the file to be attached

attachmentInBody
boolean
required

Flag to include the attachment directly in the email body

attachmentRedirectToPhished
boolean
required

Flag to redirect the attachment to a phishing site upon opening

Flag to track if links within the email have been clicked

is_check_submitted_data
boolean
required

Flag to track if data was submitted by the recipient

is_check_file_downloaded
boolean
required

Flag to track if any attached file has been downloaded

is_check_file_executed
boolean
required

Flag to track if any executable file attached has been run by the recipient

Response

200
application/json
Template updated successfully
id
string
required

Unique identifier for the template

name
string
required

Name of the template

content
string
required

HTML content of the template