# Create template (/api-reference/templates/createTemplate)

`POST /templates`

Base URL: `https://next-api.useplunk.com`

Create a new email template

## Request body

- `name`: string (required)
- `subject`: string (required)
- `body`: string (required)
- `type`: enum ("TRANSACTIONAL" | "MARKETING") (required)

Example:

```json
{
  "name": "string",
  "subject": "string",
  "body": "string",
  "type": "TRANSACTIONAL"
}
```

## Responses

### `201` — Template created

- `id`: string
- `name`: string
- `subject`: string
- `body`: string
- `type`: enum ("TRANSACTIONAL" | "MARKETING")
- `createdAt`: string (date-time)

```json
{
  "id": "string",
  "name": "string",
  "subject": "string",
  "body": "string",
  "type": "TRANSACTIONAL",
  "createdAt": "2026-05-17T18:27:16.109Z"
}
```

## Example request

```bash
curl -X POST 'https://next-api.useplunk.com/templates' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"string","subject":"string","body":"string","type":"TRANSACTIONAL"}'
```
