---
search:
  tags:
    - Templates
    - PATCH
seo:
  description: >-
    Update a template. Reference for the PATCH /templates/{id} endpoint in the
    BillionSend API.
sidebar:
  label: Update a template
  badge: PATCH
title: Update a template
type: openapi-operation
---
`PATCH /templates/{id}`

**Request body** (`application/json`)

- `name` (string)
- `subject` (string | null) — "" or null clears the subject
- `html` (string)
- `text` (string | null)
- `alias` (string | null) — null clears the alias
- `from` (string | null) — Not supported yet: any value is a 422
- `reply_to` (string | string[] | null) — Not supported yet: any value is a 422
- `variables` (any[]) — Not supported yet: a non-empty list is a 422

Request body example:

```json
{
  "name": "string",
  "subject": "string",
  "html": "string",
  "text": "string",
  "alias": "string",
  "from": "string",
  "reply_to": "string",
  "variables": [
    null
  ]
}
```

**Responses**

- `200` — Template updated (live immediately)
- `401` — Missing, malformed, unknown or revoked API key
- `404` — Not found
- `409` — Alias already in use
- `422` — Validation error, including from/reply\_to/variables (not supported yet)
- `429` — Over the rate limit (rate\_limit\_exceeded, with Retry-After)

Response example, 200:

```json
{
  "object": "template",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
```
