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

`POST /v1/templates`

Base URL: `https://api.bitelio.com`

Create a new email template

---

**Path versioning.** This resource is also reachable at the unversioned `/templates`, which is where it has always lived and which keeps working indefinitely — `bitelio@0.1.0` calls it. Prefer `/v1/templates`: the `/v1` prefix is the path that carries a version promise, and a future `/v2` will be able to change shape without breaking anything written against this one.

## 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-10-24T08:42:45.090Z"
}
```

## Example request

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