---
title: "Update a template"
method: PUT
path: "/templates/{templateId}"
tags: ["templates"]
---

# Update a template

`PUT /templates/{templateId}`

## Request

- Base URL: `https://docs-api.formify.eu/v1`
- URL: `https://docs-api.formify.eu/v1/templates/{templateId}`
- Auth: OAuth 2 (authorization code, authorization URL `https://docs-api.formify.eu/v1/oauth/authorize`, token URL `https://docs-api.formify.eu/v1/oauth/token`, scopes: `write`)

Replaces the template's configuration. Send the whole configuration — anything omitted is lost, except
`fileId`, which keeps the template's current document when omitted.

Documents already created from this template are unaffected: they took a copy at creation time.

Owner only. A colleague can use and read a shared template but not edit it.

## Path parameters

- `templateId` string, uuid, required

## Request body

- UpdateTemplateRequest: Replaces the template's configuration. `fileId` is optional — omit it to keep the template's current document and change only the fields, name or sharing.
  - `fileId` string, uuid: File ID from `POST /files`. Omit to keep the template's current document.
  - `name` string: Name of the template. Omit to keep the current name.
  - `sharingSetting` 'private' | 'shared': See `CreateTemplateRequest.sharingSetting`.
  - `signeeDetails` TemplateSignatureFieldRequest[], required: Replaces the template's signature fields entirely.
    - `fullName` string: What this field is called. A role label such as `"Buyer"` when the signer is not known yet, or a real name when the same person always signs. A document created from the template replaces it with whatever it supplies.
    - `emailAddress` string, email: Optional. Store a contact address only for a signee who is the same every time.
    - `phoneNumber` string: Optional. International format with a leading `+` and 9 to 15 digits. Requires the `deliverySms` or `deliveryWhatsapp` capability to be used on a document.
    - `phoneNumberDeliveryMethod` 'sms' | 'whatsapp': See `SignatureField.phoneNumberDeliveryMethod`. Only applicable when `phoneNumber` is set.
    - `signatureType` 'digital_ink' | 'bankid_identification' | 'digital_ink_id_scan' | 'face_liveness': Same values and capability requirements as `SignatureField.signatureType`.
    - `signaturePlacement` 'existing' | 'new_page': Same as `SignatureField.signaturePlacement`. `digital_ink_id_scan` must use `existing`.
    - `signingOrder` integer: The signing turn to store on this field. Only has an effect on a document created with `enableSigningOrder: true`.
    - `signatureBox` object: Placement of the signature field. Required when `signaturePlacement` is `existing`. Base size before scaling: - Width: 219 points - Height: 58 points
      - `page` integer: Page number where the signature box should be placed. The first page has index 0.
      - `x` integer: X-coordinate for the signature box placement (minimum value 0)
      - `y` integer: Y-coordinate for the signature box placement (minimum value 0)
      - `scale` number, float: Scales the entire signature field.
    - `idScanBox` object: Placement of the scanned ID placeholder, required when `signatureType` is `digital_ink_id_scan`. Base size before scaling: - Width: 218 points - Height: 138 points
      - `page` integer: Page number where the ID scan placeholder should be placed. The first page has index 0.
      - `x` integer: X-coordinate for the ID scan placeholder placement (minimum value 0)
      - `y` integer: Y-coordinate for the ID scan placeholder placement (minimum value 0)
      - `scale` number, float: Scales the entire ID scan placeholder.
  - `enableSigningOrder` boolean: Store a sequential signing order on the template. Requires the `signingOrder` capability.
  - `errorLanguage` 'en' | 'sv' | 'es': Language for error messages

## Response `200`

Template updated successfully

- TemplateCreatedResponse
  - `templateId` string, uuid: Unique identifier of the template
  - `name` string: Name of the template
  - `createdAt` string, date-time: Template creation timestamp
  - `userId` string, uuid: User ID of the template owner
  - `sharingSetting` 'shared' | 'private': Who on the account may use and manage the template

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized - Missing or invalid access token.
- `403`: Forbidden - not the owner, or the `templates` capability is missing.
- `404`: Template not found
- `409`: Conflict - the template's source document is no longer available, so it cannot be rebuilt.
- `500`: Internal server error

---

[API](https://skmtc.dev/formify/apis/formify-api.md) · [All operations](https://skmtc.dev/formify/apis/formify-api/llms.txt) · [OpenAPI document](https://skmtc.dev/formify/apis/formify-api/revisions/571c4c0d4f4f?raw)
