> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/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.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the template.
</ParamField>

### Body Parameters

<ParamField body="name" type="string">
  Updated name of the template.
</ParamField>

<ParamField body="subject" type="string">
  Updated default subject line.
</ParamField>

<ParamField body="content" type="string">
  Updated HTML body.
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">Template ID.</ResponseField>
  <ResponseField name="name" type="string">Template name.</ResponseField>
  <ResponseField name="subject" type="string">Template subject.</ResponseField>
  <ResponseField name="updatedAt" type="string">ISO 8601 timestamp.</ResponseField>
</ResponseField>

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

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


## Related topics

- [Template Editor](/templates/template-editor.md)
- [Update Campaign](/api/campaigns/update-campaign.md)
- [Index](/changelog/index.md)
- [Create Template](/templates/create-template.md)
