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

Authorizations

x-phishy-api-key
string
header
required

Body

application/json · object[]
Details of the new template to create
name
string
required

Name of the email campaign

subject
string
required

Subject line of the email

text
string
required

Plain text version of the email content

html
string
required

HTML content of the email, styled with MJML

is_check_email_opened
boolean
default:false
required

Flag to track if the email has been opened

Flag to track if links within the email have been clicked

is_check_submitted_data
boolean
default:false
required

Flag to track if data was submitted by the recipient

is_check_file_downloaded
boolean
default:false
required

Flag to track if any attached file has been downloaded

is_check_file_executed
boolean
default:false
required

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

addAttachment
boolean
default:false
required

Flag to indicate if an attachment should be included in the email

attachment_in_body
boolean
default:false

Flag to include attachment directly in the email body

attachmentRedirectToPhished
boolean
default:false

Flag to redirect the attachment to a phishing site upon opening

attachment_name
string

Name of the file to be attached, if any

Response

200
application/json
Template created successfully
id
string
required

Unique identifier for the template

name
string
required

Name of the template

content
string
required

HTML content of the template