Templates API
New
Access and modify phishing templates through the API
Overview
The Templates API allows you to manage phishing email templates programmatically. You can retrieve existing templates, create custom templates, and modify template content to suit your organization's specific needs.
Required Permissions
To use the Templates API, your API key must have
templates:read
and templates:write
permissions.API Endpoints
The Templates API provides comprehensive template management capabilities.
List Templates
Retrieve all available phishing templates
GET
/v1/templates
Response Example
{
"templates": [
{
"id": "template_123",
"name": "Password Reset Notification",
"category": "credential_harvesting",
"difficulty": "medium",
"language": "en",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-20T14:30:00Z",
"is_active": true,
"usage_count": 45
}
],
"total": 1,
"page": 1,
"per_page": 50
}
Get Template Details
Retrieve complete template content and metadata
GET
/v1/templates/{id}
Response Example
{
"id": "template_123",
"name": "Password Reset Notification",
"description": "Simulates a password reset email from IT department",
"category": "credential_harvesting",
"difficulty": "medium",
"language": "en",
"content": {
"subject": "Password Reset Required - Action Needed",
"sender_name": "IT Security Team",
"sender_email": "security@{{company_domain}}",
"html_body": "<html>...</html>",
"text_body": "Your password will expire...",
"landing_page_url": "https://secure.{{company_domain}}/reset"
},
"variables": [
{
"name": "company_domain",
"description": "Organization's email domain",
"required": true
},
{
"name": "user_name",
"description": "Recipient's display name",
"required": false
}
],
"metadata": {
"created_by": "admin@company.com",
"tags": ["password", "urgent", "it"],
"compliance_approved": true
}
}
Create Custom Template
Create a new phishing template with custom content
POST
/v1/templates
Template Approval
Custom templates may require approval before they can be used in campaigns, depending on your organization's settings.