> ## 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.

**id** `string` *required*

The ID of the template.

**name** `string`

A new name for the template.

**subject** `string`

A new subject line.

**html** `string`

New HTML body content.

**text** `string`

New plain text body content.

### 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>"
  }
}
```


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