For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create an email template

Create an email template in a profile.

Create an email template

post

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.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
profileUuidstringRequired

Profile uuid parameter

Example: 550e8400-e09b-41d4-a716-400055000000
Body

Create a reusable email template

template_contentstringRequired

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.

Example: <html><body><h1>Email Template</h1><p>Hello, traveler!</p></body></html>
titlestring · max: 255 · nullableOptional

Name the template is listed under. Not shown to the recipients.

Example: Summer Sale Draft
Responses
200

Success response

application/json
uuidstring · nullableOptional

Pass this as the template_uuid of a campaign.

Example: 550e8400-e29b-41d4-a716-446655440000
titlestring · nullableOptional

Null for templates that were never named.

Example: Newsletter Template
created_atstring · date-time · nullableOptionalExample: 2025-02-27T11:54:22Z
updated_atstring · date-time · nullableOptionalExample: 2025-03-04T09:12:07Z
post/api/reach/v1/profiles/{profileUuid}/templates
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?