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

# Create a document

`POST /e-signature-templates/{eSignatureTemplateId}/documents`

## Request

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

Create a document in the eSignature template

## Request body `multipart/form-data`

- object
  - `name` string, required: Name of the document
  - `data` string, binary: Only required if the KIND is regular
  - `pageRotations` ESignaturePageRotation[]: Only valid page rotations will be entered in the document. Rotations outside the page count or valid rotation (i.e. 90, 180, or 270) will be discarded.
    - `pageIndex` number, required
    - `rotationDegrees` number, required: Rotation degree counter-clockwise

## Response `200`

Returns the object if it was successfully created.

- 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)
