---
title: "Add a template"
method: POST
path: "/template"
tags: ["Template API"]
---

# Add a template

`POST /template`

## Request

- Base URL: `https://emailapi.netcorecloud.net/v5.1`
- URL: `https://emailapi.netcorecloud.net/v5.1/template`
- Auth: API key in header `api_key`

Create and store a new email template on the Netcore CPaaS dashboard.

A template is a reusable server-side email layout referenced by template_id when sending emails.
You can include substitution placeholders like [% NAME %] that are replaced at send time.

Templates created in a master account are not accessible in subaccounts.

Base URLs:
Non-EU: https://emailapi.netcorecloud.net/
EU: https://apieu.netcorecloud.net/

## Headers

- `api_key` string, required

## Request body

- object
  - `template_name` string, required: Add a unique template name using letters, numbers, or underscore only (max 255 characters).
  - `content` object[], required: Add one or more template content blocks (HTML and/or AMP).
    - `type` string: Choose content format — use html for standard email or amp for AMP email. If using amp, also add an html fallback block.
    - `value` string: Add the URL-encoded template body content. You can include placeholders like [% NAME %].

## Response `201`

Template added successfully

- object
  - `data` object
    - `template_id` integer
    - `template_name` string
  - `message` string
  - `status` string

## Other responses

- `400`: Bad request
- `401`: Unauthorized

---

[API](https://skmtc.dev/netcorecloud/apis/email-api-v5.md) - [All operations](https://skmtc.dev/netcorecloud/apis/email-api-v5/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/email-api-v5/revisions/7f81d8722ba3?raw)
