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

# Update Template

> Update a template's content.

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

<ParamField body="name" type="string">
  A new name for the template.
</ParamField>

<ParamField body="subject" type="string">
  A new subject line.
</ParamField>

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

<ParamField body="text" type="string">
  New plain text body content.
</ParamField>

### Request

```bash cURL theme={null}
curl -X PATCH https://api.unosend.co/templates/tpl_abc123 \
  -H "Authorization: Bearer un_xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Welcome aboard, {{first_name}}!"
  }'
```

### Response

```json 200 theme={null}
{
  "success": true,
  "data": {
    "id": "tpl_abc123",
    "name": "Welcome Email",
    "subject": "Welcome aboard, {{first_name}}!",
    "html": "<h1>Welcome, {{first_name}}!</h1><p>Thanks for joining {{company_name}}.</p>"
  }
}
```
