> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH /v1/templates/{template_id}

> Change a template's name, note or channel versions.

Changes a template. Only what the body gives changes; `variants`, when given, replaces every channel's version.

<Note>Needs the `templates:write` scope.</Note>

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `template_id` | string | Yes | The template's id. |

## Body

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `name` | string | No | Up to 100 characters, unique on the account. |
| `variants` | object | No | Every channel's content, replacing the current ones. |
| `description` | string | No | A note, up to 200 characters. |

`variants` holds one object per channel, keyed `sms` or `whatsapp`, in that channel's content shape: SMS takes `text`; WhatsApp takes `text` (inside the 24-hour window) and `template`, `language` and `params` (an approved WhatsApp template, used outside it). Write `{{name}}` wherever a value goes; `variables` in the answer lists every name the template needs.

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.fireflo.au/v1/templates/7a2c9e14-5b3d-4f6a-8c1e-2d9b0f7e6a53 \
    -H "Authorization: Bearer $OMNI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "description": "Sent when an order leaves the warehouse"
    }'
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.patch(
      "https://api.fireflo.au/v1/templates/7a2c9e14-5b3d-4f6a-8c1e-2d9b0f7e6a53",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
      json={
          "description": "Sent when an order leaves the warehouse",
      },
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/templates/7a2c9e14-5b3d-4f6a-8c1e-2d9b0f7e6a53", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "description": "Sent when an order leaves the warehouse"
    }),
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK`

```json theme={null}
{
  "id": "7a2c9e14-5b3d-4f6a-8c1e-2d9b0f7e6a53",
  "name": "order_shipped",
  "description": "Sent when an order leaves the warehouse",
  "variants": {
    "whatsapp": {
      "text": "Hi {{name}}, your order {{order}} has shipped.",
      "template": "order_shipped",
      "language": "en",
      "params": [
        "{{name}}",
        "{{order}}"
      ]
    },
    "sms": {
      "text": "Hi {{name}}, your order {{order}} has shipped. - Acme"
    }
  },
  "variables": [
    "name",
    "order"
  ],
  "updated": "2026-10-05T09:14:22.413Z"
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 404 | `not_found` | No template has that id on this account. |
| 400 | `invalid_request` | The name is missing, `variants` is empty, or names something that isn't a channel taking messages (`field` is `name` or `variants`). |
| 409 | `name_taken` | Another template has that name. |
| 400 | `invalid_json` | The body isn't valid JSON. |
| 403 | `scope_missing` | The key doesn't have the `templates:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.