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

# Update Template

> Update the subject, content, or metadata of an existing email template.

Update template configuration or HTML/text content via the Mailofly API.

### Path Parameters

**id** `string` *required*

The unique identifier of the template.

### Body Parameters

**name** `string`

Updated name of the template.

**subject** `string`

Updated default subject line.

**content** `string`

Updated HTML body.

### Response

**data** `object`

**id** `string`

Template ID.

**name** `string`

Template name.

**subject** `string`

Template subject.

**updatedAt** `string`

ISO 8601 timestamp.

```bash cURL theme={null}
curl -X PATCH https://api.mailofly.com/templates/tmpl_123 \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Welcome aboard {{name}}!"
  }'
```

```json 200 OK theme={null}
{
  "data": {
    "id": "tmpl_123",
    "name": "Welcome Email",
    "subject": "Welcome aboard {{name}}!",
    "updatedAt": "2026-09-11T13:40:00Z"
  }
}
```


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