---
title: "Update a document"
method: PUT
path: "/e-signature-templates/{eSignatureTemplateId}/documents/{id}"
tags: ["Documents"]
---

# Update a document

`PUT /e-signature-templates/{eSignatureTemplateId}/documents/{id}`

## Request

- Base URL: `https://files.api.pactima.com/v1`
- URL: `https://files.api.pactima.com/v1/e-signature-templates/{eSignatureTemplateId}/documents/{id}`
- Auth: HTTP bearer

Update the document in an eSignature template

## Request body `multipart/form-data`

- object
  - `name` string: Name of the document
  - `data` string, binary
  - `pageRotations` ESignaturePageRotation[]
    - `pageIndex` number, required
    - `rotationDegrees` number, required: Rotation degree counter-clockwise
  - `easySignInputs` EasySignInput[]
    - `id` string
    - `signerId` string, required
    - `index` number, required
    - `label` string
    - `labelImage` EasySignInputLabelImage
      - `data` string: base64 of image data
      - `width` number: Width of image
      - `horizontalAlignment` 'LEFT' | 'CENTER' | 'RIGHT'
    - `isOptional` boolean
    - `placeholder` string
    - `preFilledValue` string
    - `helpText` string
    - `type` 'SIGNATURE' | 'STAMP' | 'INITIALS' | 'TEXT_INPUT' | 'CHECKBOX' | 'ADDRESS' | 'EMAIL' | 'PHONE_NUMBER' | 'NAME' | 'DATE' | 'DATE_SIGNED' | 'DISPLAY_TEXT' | 'CHECKBOX_GROUP'
    - `validation` EasySignInputValidation
      - `type` 'LETTERS' | 'NUMBER' | 'ALPHANUMERIC' | 'REGEX', required
      - `value` string
    - `positionMapping` EasySignInputPositionMapping
      - `pageIndex` number, required
      - `left` number, required: Offset from the left. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
      - `top` number, required: Offset from the top. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
      - `height` number, required: Height of the entry pad. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
      - `width` number, required: Width of the entry pad. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
      - `metadata` unknown
    - `value` string
    - `entryPadId` string
    - `entryPadsCheckboxGroupId` string

## Response `200`

Returns the object if successfully updated. Returns an error if the update parameters are invalid.

- ESignatureTemplateDocument
  - `id` string
  - `name` string
  - `pageCount` number
  - `entryPads` ESignatureEntryPad[]
    - `id` string
    - `signerId` string, required: Id of the signer
    - `type` 'signature' | 'initials' | 'stamp' | 'date' | 'text' | 'checkbox' | 'name' | 'notary_public_profile_info' | 'email', required
    - `left` number, required: Offset from the left. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
    - `top` number, required: Offset from the top. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
    - `height` number, required: Height of the entry pad. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
    - `width` number, required: Width of the entry pad. Must be between 0 and 100. Units of measure is the percentage relative to the width of the containing page.
    - `pageIndex` number, required: Page index whereby the entry pad is contained in the document.
    - `isOptional` boolean: Set to true if the entry pad is optional.
    - `metadata` unknown

---

[API](https://skmtc.dev/pactima/apis/esignature-templates-api.md) - [All operations](https://skmtc.dev/pactima/apis/esignature-templates-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pactima/apis/esignature-templates-api/revisions/7d2bb0c7b4b9?raw)
