---
title: "Retrieve all form fields for a template"
method: GET
path: "/templates/{templateId}/fields"
tags: ["templates"]
---

# Retrieve all form fields for a template

`GET /templates/{templateId}/fields`

## Request

- Base URL: `https://docs-api.formify.eu/v1`
- URL: `https://docs-api.formify.eu/v1/templates/{templateId}/fields`
- 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`)

Retrieves all the form fields defined in a specific template. This endpoint is useful for extracting form field metadata before creating a document from the template.

### Supported Form Field Types
The following form field types are possible:
- **checkbox**: A field that allows a binary selection (checked or unchecked).
- **combobox**: A dropdown field allowing selection of one option.
- **listbox**: A list field allowing selection of one or multiple options.
- **radioButton**: A field that allows a single selection from a group of options.
- **textField**: A single-line input field for text.

### Notes:
- **Required Fields**: A field is marked as required if the `required` property is `true`.
- **Read-Only Fields**: A field is marked as read-only if the `readOnly` property is `true`.
- **Editable Fields**: Fields with `editable = true` can be pre-filled when creating a document.

## Path parameters

- `templateId` string, uuid, required

## Response `200`

Successfully retrieved form fields for the template.

- FormField[]
  - `fieldId` string, uuid: Unique identifier for the field.
  - `name` string: The name of the form field, used as the key for API interactions.
  - `label` string: The display label of the form field.
  - `type` 'checkbox' | 'combobox' | 'listbox' | 'radioButton' | 'textField': The type of the form field.
  - `value` string, nullable: The field's predefined starting value — what it was built with, not what anyone has since filled in. It is the first entry of `defaultValues`, and is `null` when the field has no predefined value. To read what has actually been entered, use `GET /docs/{documentId}/field-values` on a completed document. Entered values are stored per recipient and are never returned by this endpoint.
  - `defaultValues` string[], nullable: List of default values for the form field.
  - `options` object[], nullable: List of available options for dropdown or choice fields.
    - `label` string: The display label of the option.
    - `value` string: The value associated with the option.
  - `required` boolean: Indicates if the field is mandatory for submission.
  - `readOnly` boolean: Indicates if the field is read-only and cannot be modified.
  - `editable` boolean: Indicates if the field is editable through the `POST /docs/{documentId}/field-values` endpoint.
  - `multiLine` boolean, nullable: Indicates if the field supports multi-line text.
  - `comb` boolean, nullable: Indicates if the field uses comb formatting for text input.
  - `page` integer: The page index (zero-based) where the field is located.
  - `boundingBox` object, nullable: The bounding box of the field on the page.
    - `x` number: The X coordinate of the field's top-left corner.
    - `y` number: The Y coordinate of the field's top-left corner.
    - `width` number: The width of the field in points.
    - `height` number: The height of the field in points.

## Other responses

- `401`: Unauthorized - Missing or invalid access token.
- `404`: Template not found
- `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)
