---
title: "Create a template from Word DOCX"
method: POST
path: "/templates/docx"
tags: ["Templates"]
---

# Create a template from Word DOCX

`POST /templates/docx`

The API endpoint provides the functionality to create a fillable document template for an existing Microsoft Word document. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="/keyring-examples/fieldtags.docx" target="_blank" class="link font-bold" >/keyring-examples/fieldtags.docx</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="/keyring-guides/use-embedded-text-field-tags-in-the-pdf.html" class="link">Use embedded text field tags to create a fillable form</a>

## Request body

- object
  - `name` string — Name of the template.
  - `external_id` string — Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.
  - `folder_name` string — The folder's name in which the template should be created.
  - `shared_link` boolean — Set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.
  - `documents` object[], required — An array of DOCX documents to create a template.
    - `name` string, required — Name of the document.
    - `file` string, base64, required — Base64-encoded content of the DOCX file or downloadable file URL.
    - `dynamic` boolean — Set to `true` to make the document dynamic. When enabled, the DOCX document content can be edited or use [[variables]] in the template editor.
    - `fields` object[] — Fields are optional if you use {{...}} text tags to define fields in the document.
      - `name` string — Name of the field.
      - `type` 'heading' | 'text' | 'signature' | 'initials' | 'date' | 'number' | 'image' | 'checkbox' | 'multiple' | 'file' | 'radio' | 'select' | 'cells' | 'stamp' | 'payment' | 'phone' | 'verification' | 'kba' | 'strikethrough' — Type of the field (e.g., text, signature, date, initials).
      - `role` string — Role name of the signer.
      - `required` boolean — Indicates if the field is required.
      - `title` string — Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown.
      - `description` string — Field description displayed on the signing form. Supports Markdown.
      - `areas` object[] — List of areas where the field is located in the document.
        - `x` number — X-coordinate of the field area.
        - `y` number — Y-coordinate of the field area.
        - `w` number — Width of the field area.
        - `h` number — Height of the field area.
        - `page` integer — Page number of the field area. Starts from 1.
        - `option` string — Option string value for 'radio' and 'multiple' select field types.
      - `options` string[] — An array of option values for 'select' field type.
      - `validation` object — Field validation rules.
        - `pattern` string — HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.
        - `message` string — A custom error message to display on validation failure.
        - `min` union — Minimum allowed number value or date depending on field type.
          - number
          - string
        - `max` union — Maximum allowed number value or date depending on field type.
          - number
          - string
        - `step` number — Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency.
      - `preferences` object — Field display preferences.
        - `font_size` integer — Font size of the field value in pixels.
        - `font_type` 'bold' | 'italic' | 'bold_italic' — Font type of the field value.
        - `font` 'Times' | 'Helvetica' | 'Courier' — Font family of the field value.
        - `color` 'black' | 'white' | 'blue' — Font color of the field value.
        - `background` 'black' | 'white' | 'blue' — Field box background color.
        - `align` 'left' | 'center' | 'right' — Horizontal alignment of the field text value.
        - `valign` 'top' | 'center' | 'bottom' — Vertical alignment of the field text value.
        - `format` string — The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.
        - `price` number — Price value of the payment field. Only for payment fields.
        - `currency` 'USD' | 'EUR' | 'GBP' | 'CAD' | 'AUD' — Currency value of the payment field. Only for payment fields.
        - `mask` union — Set `true` to make sensitive data masked on the document.
          - integer
          - boolean
        - `reasons` string[] — An array of signature reasons to choose from.

## Response `200`

OK

- object
  - `id` integer, required — Unique identifier of the document template.
  - `slug` string, required — Unique slug of the document template.
  - `name` string, required — The name of the template.
  - `preferences` object, required — Template preferences.
  - `schema` object[], required — List of documents attached to the template.
    - `attachment_uuid` string, required — Unique identifier of attached document to the template.
    - `name` string, required — Name of the attached document to the template.
  - `fields` object[], required — List of fields to be filled in the template.
    - `uuid` string, required — Unique identifier of the field.
    - `submitter_uuid` string, required — Unique identifier of the submitter that filled the field.
    - `name` string, required — Field name.
    - `type` 'heading' | 'text' | 'signature' | 'initials' | 'date' | 'number' | 'image' | 'checkbox' | 'multiple' | 'file' | 'radio' | 'select' | 'cells' | 'stamp' | 'payment' | 'phone' | 'verification' | 'kba' | 'strikethrough', required — Type of the field (e.g., text, signature, date, initials).
    - `required` boolean, required — Indicates if the field is required.
    - `preferences` object — Field display preferences.
      - `font_size` integer — Font size of the field value in pixels.
      - `font_type` string — Font type of the field value.
      - `font` string — Font family of the field value.
      - `color` string — Font color of the field value.
      - `background` string — Field box background color.
      - `align` string — Horizontal alignment of the field text value.
      - `valign` string — Vertical alignment of the field text value.
      - `format` string — The data format for different field types.
      - `price` number — Price value of the payment field. Only for payment fields.
      - `currency` string — Currency value of the payment field. Only for payment fields.
      - `mask` boolean — Indicates if the field is masked on the document.
      - `reasons` string[] — An array of signature reasons to choose from.
    - `areas` object[], required — List of areas where the field is located in the document.
      - `x` number, required — X coordinate of the area where the field is located in the document.
      - `y` number, required — Y coordinate of the area where the field is located in the document.
      - `w` number, required — Width of the area where the field is located in the document.
      - `h` number, required — Height of the area where the field is located in the document.
      - `attachment_uuid` string, required — Unique identifier of the attached document where the field is located.
      - `page` integer, required — Page number of the attached document where the field is located.
  - `submitters` object[], required — The list of submitters for the template.
    - `name` string, required — The name of the submitter.
    - `uuid` string, required — Unique identifier of the submitter.
  - `author_id` integer, required — Unique identifier of the author of the template.
  - `archived_at` string, nullable, required — Date and time when the template was archived.
  - `created_at` string, required — The date and time when the template was created.
  - `updated_at` string, required — The date and time when the template was last updated.
  - `source` 'native' | 'api' | 'embed', required — Source of the template.
  - `external_id` string, nullable, required — Your application-specific unique string key to identify this template within your app.
  - `folder_id` integer, required — Unique identifier of the folder where the template is located.
  - `folder_name` string, required — Folder name where the template is located.
  - `shared_link` boolean — Indicates if the template is accessible by link.
  - `author` object, required
    - `id` integer, required — Unique identifier of the author.
    - `first_name` string, required — First name of the author.
    - `last_name` string, required — Last name of the author.
    - `email` string, required — Author email.
  - `documents` object[], required — List of documents attached to the template.
    - `id` integer, required — Unique identifier of the document.
    - `uuid` string, required — Unique identifier of the document.
    - `url` string, required — URL of the document.
    - `preview_image_url` string, required — Document preview image URL.
    - `filename` string, required — Document filename.

---

[API](https://skmtc.dev/keyring-network/apis/keyring-docsign-api.md) · [All operations](https://skmtc.dev/keyring-network/apis/keyring-docsign-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keyring-network/keyring-docsign-api/revisions/5381dc74855a/schema)
