# Save a reply an inbox can send

Source: https://docs.vlayers.ai/reference/email/save-email-template

`PUT /v1/email/mailboxes/{address}/templates` · scope `mailbox:manage`

Saves a reply on an inbox, or replaces the one with the same name. Put `{{placeholders}}` where the words change; you give their values when you send. You can change them whether or not the inbox sends only from saved replies, with a key for the workspace or in the dashboard; a key limited to this one inbox cannot, because it would be writing itself a way around its own setting.

Requires an API key with the `mailbox:manage` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `address` | path | string | yes | The inbox address. Example: `"support@acme.vlayersmail.com"` |
| `name` | body | string | yes | What you call it: letters, numbers, spaces, dots, dashes and underscores. |
| `subject` | body | string | no | One line. Optional. |
| `body` | body | string | yes | The words of the reply, with `{{placeholders}}` where they change. |

## Request

cURL:

```bash
curl -X PUT "https://api.vlayers.ai/v1/email/mailboxes/$MAILBOX_ADDRESS/templates" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Refund approved",
    "subject": "Your refund",
    "body": "Hi {{name}}, your refund is on its way."
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { summary } = await voicelayer.email.saveTemplate('<mailbox-address>', {
  name: 'Refund approved',
  subject: 'Your refund',
  body: 'Hi {{name}}, your refund is on its way.'
});
console.log(summary);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.email.save_template(
    "<mailbox-address>",
    name="Refund approved",
    subject="Your refund",
    body="Hi {{name}}, your refund is on its way.",
)
print(result.summary)
```

## Response `200`

```json
{
  "template": {
    "name": "Refund approved",
    "subject": "Your refund",
    "body": "Hi {{name}}, your refund is on its way.",
    "variables": [
      "name"
    ],
    "updatedAt": "2026-10-20T15:04:05.000Z"
  },
  "replaced": false,
  "summary": "Saved the reply \"Refund approved\" on support@acme.vlayersmail.com."
}
```
