---
title: "Create an email template"
method: POST
path: "/marketing/templates"
tags: ["Admin Marketing: Communications"]
---

# Create an email template

`POST /marketing/templates`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/marketing/templates`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/marketing/templates/post.ts> (a function with typed inputs; its response is checked against the schema)

Create an email template

## Request body

- object
  - `name` string, required
  - `status` 'active' | 'inactive' | 'draft', required
  - `content` string, required

## Response `201`

Template created.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
