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

# Update template

`PUT /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}/templates/{templateName}`

## Request

- Base URL: `https://fax.api.sinch.com`
- URL: `https://fax.api.sinch.com/v3/projects/{projectId}/services/{serviceId}/domains/{domainName}/templates/{templateName}`
- Auth: one of:
  - HTTP basic
  - OAuth 2
    - Client credentials
    - Token URL: `https://auth.sinch.com/oauth2/token`

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.

## Changes

- **2026-10-01** `7f5e54fa9f05`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sinch/apis/fax-api/changes/v3/projects/:projectId/services/:serviceId/domains/:domainName/templates/:templateName/put.md)

---

[API](https://skmtc.dev/sinch/apis/fax-api.md) - [All operations](https://skmtc.dev/sinch/apis/fax-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sinch/apis/fax-api/revisions/d3054d7412d5?raw)
