# The template object

A template is a document with glyphs that you upload once and send many times. Its fields come from the glyphs in the document.

Single-template responses include `fields`; lists do not. The same field object appears on pacts, where each field also has an `id` and, once its signer has signed, a `value`.

## Attributes

- `uid` (string): The template's id: 8 letters and digits.
- `name` (string): Your name for it (150 characters at most). Defaults to the file name.
- `source_name` (string): The uploaded file's name.
- `source_type` (string): What was uploaded. Word documents are converted to PDF on upload. One of: `pdf`, `docx`.
- `page_count` (integer): Pages in the document.
- `signer_count` (integer): Signers the glyphs call for: the highest glyph number.
- `field_count` (integer): Fields found in the document.
- `date_created` (string (date-time)): When it was uploaded.
- `date_updated` (string (date-time)): When it last changed.
- `fields` (array of objects): Every field, from its glyphs or placed by hand, in page order. Single-template responses only.
  - `id` (integer | null): The field's id on a pact. `null` on a template.
  - `recipient` (integer): The signer the field belongs to: the number in its glyph (`\s2\` → `2`), or the signer it was given to in the website's field editor.
  - `type` (string): What the signer provides. One of: `signature`, `initials`, `name`, `date`, `text`, `checkbox`.
  - `page` (integer): The page it is on, starting at 1.
  - `x` (number): Distance from the page's left edge, in PDF points (1/72 inch).
  - `y` (number): Distance from the top of the page to the box's bottom edge, in points: the glyph's text baseline. Signatures stand on that line.
  - `width` (number): The box's width in points: set by the field type for a glyph, as drawn for a field placed by hand on the website.
  - `height` (number): The box's height in points: set by the field type for a glyph, as drawn for a field placed by hand on the website.
  - `label` (string | null): The label from the glyph, such as `Company` in `\t1:Company\`, or the one typed in the field editor.
  - `required` (boolean): `false` when the glyph ends in `!` (`\t1:Phone!\`, `\c1!\`), or when the field was made optional in the field editor.
  - `value` (string | null): What was filled in, once that signer has signed: text as typed, `"1"` or `"0"` for a checkbox, the typed name for `name`, and the signing date (`MM/dd/yyyy`, UTC) for `date`. Signatures and initials are images on the PDF, so they stay `null`.

## The field object

- `id` (integer | null): The field's id on a pact. `null` on a template.
- `recipient` (integer): The signer the field belongs to: the number in its glyph (`\s2\` → `2`), or the signer it was given to in the website's field editor.
- `type` (string): What the signer provides. One of: `signature`, `initials`, `name`, `date`, `text`, `checkbox`.
- `page` (integer): The page it is on, starting at 1.
- `x` (number): Distance from the page's left edge, in PDF points (1/72 inch).
- `y` (number): Distance from the top of the page to the box's bottom edge, in points: the glyph's text baseline. Signatures stand on that line.
- `width` (number): The box's width in points: set by the field type for a glyph, as drawn for a field placed by hand on the website.
- `height` (number): The box's height in points: set by the field type for a glyph, as drawn for a field placed by hand on the website.
- `label` (string | null): The label from the glyph, such as `Company` in `\t1:Company\`, or the one typed in the field editor.
- `required` (boolean): `false` when the glyph ends in `!` (`\t1:Phone!\`, `\c1!\`), or when the field was made optional in the field editor.
- `value` (string | null): What was filled in, once that signer has signed: text as typed, `"1"` or `"0"` for a checkbox, the typed name for `name`, and the signing date (`MM/dd/yyyy`, UTC) for `date`. Signatures and initials are images on the PDF, so they stay `null`.

## Example

```json
{
  "uid": "7DXW69YJ",
  "name": "Consulting agreement",
  "source_name": "consulting-agreement.docx",
  "source_type": "docx",
  "page_count": 3,
  "signer_count": 2,
  "field_count": 7,
  "date_created": "2026-10-14T16:02:11Z",
  "date_updated": "2026-10-14T16:02:11Z",
  "fields": [
    {
      "id": null,
      "recipient": 1,
      "type": "text",
      "page": 1,
      "x": 140.25,
      "y": 188.4,
      "width": 160,
      "height": 14,
      "label": "Company name",
      "required": true,
      "value": null
    },
    {
      "id": null,
      "recipient": 1,
      "type": "signature",
      "page": 3,
      "x": 72,
      "y": 612.5,
      "width": 185,
      "height": 30,
      "label": null,
      "required": true,
      "value": null
    },
    {
      "id": null,
      "recipient": 1,
      "type": "name",
      "page": 3,
      "x": 72,
      "y": 650.1,
      "width": 200,
      "height": 12,
      "label": null,
      "required": true,
      "value": null
    },
    {
      "id": null,
      "recipient": 1,
      "type": "date",
      "page": 3,
      "x": 320,
      "y": 650.1,
      "width": 100,
      "height": 12,
      "label": null,
      "required": true,
      "value": null
    },
    {
      "id": null,
      "recipient": 2,
      "type": "signature",
      "page": 3,
      "x": 72,
      "y": 712.5,
      "width": 185,
      "height": 30,
      "label": null,
      "required": true,
      "value": null
    },
    {
      "id": null,
      "recipient": 2,
      "type": "date",
      "page": 3,
      "x": 320,
      "y": 750.1,
      "width": 100,
      "height": 12,
      "label": null,
      "required": true,
      "value": null
    },
    {
      "id": null,
      "recipient": 2,
      "type": "checkbox",
      "page": 3,
      "x": 72,
      "y": 778.6,
      "width": 12,
      "height": 12,
      "label": "Send me a copy by post",
      "required": false,
      "value": null
    }
  ]
}
```
