Overview
Templates are reusable message formats for emails, text messages, and letters. This guide covers everything from creating your first template to advanced features like folders, versioning, and content management.Template Types
GOV.UK Notify supports three template types:Send emails with subject lines, HTML formatting, and attachments
SMS
Send text messages up to 918 characters (6 SMS fragments)
Letter
Send physical letters with custom branding and optional attachments
Creating Templates
Access your templates at/services/{service_id}/templates.
Create Email Template
Start New Template
Click “New template” then select “Email” or navigate to
/services/{service_id}/templates/add-email.Name Your Template
Enter a descriptive template name. This is only visible to your team, not recipients.
Write Email Content
Use the content editor with formatting options:Formatting syntax:
# Heading- Large heading## Sub-heading- Medium heading---- Horizontal line^ inset text- Highlighted inset box[link text](https://example.com)- Hyperlinks- Bullet lists with
-or* - Numbered lists with
1.,2., etc.
Optional: Unsubscribe Link
Enable “Include unsubscribe link” to add automatic one-click unsubscribe for bulk emails.
Unsubscribe links are managed automatically. Users who unsubscribe are tracked system-wide.
Create SMS Template
Start New Template
Select “Text message” when creating a template or go to
/services/{service_id}/templates/add-sms.Name and Write Content
Enter template name and message content. Character counter shows:
- Total characters
- SMS fragments (1 fragment = ~160 characters)
- Cost estimate
Check Character Count
Stay under 918 characters (6 SMS fragments). The counter updates in real-time.
Create Letter Template
Start New Template
Select “Letter” when creating a template.
Creating a letter template automatically creates “Untitled letter template” with placeholder content.
Write Letter Content
Use the same formatting as email templates:
- Headings with
#and## - Bullet points and numbered lists
- Inset text with
^ - Horizontal rules with
---
Configure Postage
Set default postage class:
- Second class - Standard delivery
- First class - Faster delivery
/services/{service_id}/templates/{template_id}/edit-postage.Optional: Attach Additional Pages
Add extra pages as PDF at
/services/{service_id}/templates/{template_id}/attach-pages:- Upload PDF (max 2MB)
- Combined template + attachment must be ≤10 pages
- Useful for terms & conditions, maps, etc.
Editing Templates
Edit Content
- Navigate to template at
/services/{service_id}/templates/{template_id} - Click “Edit template”
- Make changes to subject, content, or settings
- Click “Save”
Rename Template (Letters Only)
For letter templates, rename at/services/{service_id}/templates/{template_id}/rename.
Email and SMS templates are renamed by editing the template directly.
Set Reply-to / Sender
Override default sender for specific templates:- Go to template page
- Click “Change” next to reply-to/sender
- Select from your configured senders
- Save changes
/services/{service_id}/templates/{template_id}/set-template-sender.
Placeholders and Personalization
Adding Placeholders
Insert dynamic content using double parentheses:- Use lowercase and underscores:
((user_name))✓ - No spaces:
((user name))✗ - No special characters except underscore
- Must be unique within template
Conditional Content
Notify doesn’t support conditional logic in templates. Instead:- Create multiple templates for different scenarios
- Handle logic in your application before calling the API
- Use different templates for different user segments
Optional Placeholders
All placeholders are required by default. To make content optional:- Provide empty string in API call:
{"middle_name": ""} - Handle missing data in your application
- Design templates to work with or without optional content
Template Folders
Organize templates into folders for better management.Creating Folders
Create Folder
- Click “Manage folders and templates”
- Select “Add new folder”
- Enter folder name
- Click “Save”
Folder Permissions
Restrict access to specific folders:- Navigate to folder at
/services/{service_id}/templates/folders/{folder_id} - Click “Manage folder”
- At
/services/{service_id}/templates/folders/{folder_id}/manage:- Rename folder
- Select team members who can access
- Save permissions
Deleting Folders
Delete empty folders at/services/{service_id}/templates/folders/{folder_id}/delete:
- Click “Delete folder”
- Confirm deletion
Template Versioning
Notify automatically versions templates when edited.View Version History
Access at/services/{service_id}/templates/{template_id}/versions:
- See all previous versions
- View what changed
- Check who made changes
- See when edits occurred
View Specific Version
Click a version to see it at/services/{service_id}/templates/{template_id}/version/{version_number}:
- Full template content
- Metadata (created date, author)
- Preview of that version
You cannot send using old versions - they’re for reference only. To revert, manually recreate the old content.
Copying Templates
Copy Within Service
Copy From Another Service
Start Copy Process
From templates page, select “Copy an existing template” then choose “from another service”.
Select Source Service
At
/services/{service_id}/templates/copy, choose the service to copy from.You must be a team member of both services to copy templates between them.
- Template content and placeholders
- Subject line (email/letter)
- Postage settings (letters)
- Unsubscribe link setting (email)
- Welsh content (bilingual letters)
- Letter attachments
- Version history
- Send history
- Sender/reply-to overrides (uses destination service defaults)
Deleting Templates
Delete Template
Click “Delete” and navigate to
/services/{service_id}/templates/{template_id}/delete.Redacting Templates
Hide personalized content from message history:- Navigate to
/services/{service_id}/templates/{template_id}/redact - Confirm redaction
- All future messages sent with this template will have placeholder values hidden
Redaction applies to future messages only. Previously sent messages are not affected.
- Templates containing sensitive information
- Compliance with data protection policies
- Hiding personal identifiers from logs
Letter-Specific Features
Letter Attachments
Add PDF attachments to letter templates: Requirements:- PDF format only
- Max 2MB file size
- Combined template + attachment ≤ 10 pages
- Content must be within printable area
- Go to
/services/{service_id}/templates/{template_id}/attach-pages - Upload PDF
- Notify validates and sanitizes the file
- Preview shows combined letter + attachment
- Save to attach permanently
- View at template page
- Replace by uploading new PDF
- Remove at
/services/{service_id}/templates/{template_id}/attach-pages/edit
Bilingual Letters (Welsh)
Create Welsh/English bilingual letters:Add Welsh Content
Edit Welsh version at
/services/{service_id}/templates/{template_id}/edit/welsh:- Welsh subject line
- Welsh letter content
- Same placeholders as English version
Edit English Content
Edit English version separately. Both versions must use identical placeholders.
Letter Contact Blocks
Set sender contact information for letters:- Configure at service level:
/services/{service_id}/service-settings/letter-contacts - Override per template using “Change” on template page
- Appears at bottom of letter
Template Search
Find templates quickly:- Use search box on templates page (appears when 7+ templates)
- Search by:
- Template name
- Content keywords
- Folder names
- Filter by type: All, Email, SMS, Letter
Best Practices
Use Clear Names
Name templates by purpose, not content: “Password reset” not “Template 1”.
Test Before Using
Send test messages to yourself before using templates in production.
Keep Placeholders Simple
Use descriptive names:
((appointment_date)) not ((d)).Organize with Folders
Group related templates: “Appointments”, “Reminders”, “Confirmations”.
Version Control
Check version history before major edits to track changes.
Monitor Character Count
For SMS, stay well under 918 characters to control costs.
Troubleshooting
Template content too long
Template content too long
SMS: Maximum 918 characters (6 fragments)
- Shorten message
- Remove unnecessary words
- Use abbreviations
- Consider email instead
- Reduce content
- Remove attachment
- Split into multiple letters
Cannot add template to folder
Cannot add template to folder
Check:
- You have permission to access the folder
- Folder exists and isn’t deleted
- You’re not trying to nest folders (not supported)
Letter attachment upload fails
Letter attachment upload fails
Common issues:
- PDF is corrupted or password-protected
- File size exceeds 2MB
- Content outside printable area
- Combined pages exceed 10
- Re-save PDF without protection
- Compress PDF or reduce quality
- Adjust margins (minimum 5mm)
- Remove pages from template or attachment
Placeholder errors in API
Placeholder errors in API
If API calls fail with placeholder errors:
- Check placeholder names match exactly
- Verify all required placeholders are provided
- Remove extra whitespace in placeholder names
- Check for typos:
((naem))vs((name))
Cannot delete template
Cannot delete template
If deletion is blocked:
- Template may be in use by scheduled sends
- Wait for scheduled sends to complete
- Cancel scheduled sends first
- Check API integrations aren’t using it
Related Resources
Uploading Recipients
Send templates to multiple recipients via CSV
Branding
Customize template appearance and sender identity
Managing Services
Configure service-level template settings