Create an email template
Create an email template in a profile.
Create an email template in a profile.
The template holds the HTML body a campaign reuses, so it can be created before any
campaign exists. Only the template metadata comes back - keep the returned uuid to
reference it as the template_uuid of a campaign.
API Token authentication
Profile uuid parameter
550e8400-e09b-41d4-a716-400055000000Create a reusable email template
The email body as HTML. It is sanitised before it is stored, so the saved template can differ from what was sent - inline any styles the email clients need and keep the markup self-contained.
<html><body><h1>Email Template</h1><p>Hello, traveler!</p></body></html>Name the template is listed under. Not shown to the recipients.
Summer Sale DraftSuccess response
Pass this as the template_uuid of a campaign.
550e8400-e29b-41d4-a716-446655440000Null for templates that were never named.
Newsletter Template2025-02-27T11:54:22Z2025-03-04T09:12:07ZUnauthenticated response
Validation error response
Error response
POST /api/reach/v1/profiles/{profileUuid}/templates HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"template_content": "<html><body><h1>Email Template</h1><p>Hello, traveler!</p></body></html>",
"title": "Summer Sale Draft"
}{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Newsletter Template",
"created_at": "2025-02-27T11:54:22Z",
"updated_at": "2025-03-04T09:12:07Z"
}Last updated
Was this helpful?