---
title: "Update template"
method: PUT
path: "/services/{serviceId}/domains/{domainName}/templates/{templateName}"
tags: ["Templates"]
---

# Update template

`PUT /services/{serviceId}/domains/{domainName}/templates/{templateName}`

Update a template for a specific domain for the specified service.

## Path parameters

- `serviceId` string, required
- `domainName` string, required
- `templateName` 'successful outbound fax' | 'unsuccessful outbound fax' | 'successful inbound fax' | 'unsuccessful inbound fax', required — The name of the email template.

## Request body

- UpdateTemplateRequest
  - `template` string — The contents of the template. The following variables are available for you to use in templates: | Variable | Description | | -------- | ----------- | | id | The ID of the fax. | | from | The phone number sending the fax. | | to | The phone number receiving the fax. | | completedTime | The date and time that the fax was completed. | | numberOfPages | The number of pages included in the fax. | | currencyCode | The currency in which the fax was billed. | | amount | The total cost of the fax. | | retryCount | The number of times the fax was retried. |

## Response `200`

The updated template.

- TemplateByNameResponse
  - `template` object — The email template.
    - `name` 'successful outbound fax' | 'unsuccessful outbound fax' | 'successful inbound fax' | 'unsuccessful inbound fax' — The name of the email template.
    - `createdAt` string, date-time — The timestamp on which the template was created.
    - `id` string — The ID of the template.
    - `version` object
      - `tag` string — The tag for the template.
      - `template` string — The contents of the template.
      - `createdAt` string, date-time — The timestamp on which the template was created.
      - `comment` string — Optional field for comments if necessary.
      - `active` boolean — Displays whether the template is active or not.
      - `id` string — The ID for the template version.
      - `headers` object — Headers that are sent along with the template.

---

[API](https://skmtc.net/sinch/apis/fax-api.md) · [All operations](https://skmtc.net/sinch/apis/fax-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sinch/fax-api/revisions/ebcbb377ee0f/schema)
