---
title: "Get all fields for a template"
method: GET
path: "/api/v1/templates/{id}/fields"
tags: ["Templates"]
---

# Get all fields for a template

`GET /api/v1/templates/{id}/fields`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/templates/{id}/fields`
- Auth: one of:
  - API key in header `X-API-Key`
  - `bearer` (a scheme the document does not define)

## Path parameters

- `id` string, required

## Response `200`

- TemplateFieldDto[]
  - `valueKey` string, nullable: Repeated text value key, scoped to the owning signer.
  - `id` string, required
  - `templateId` string, required
  - `signerRoleId` string, nullable
  - `fieldType` 'signature' | 'initials' | 'date' | 'text' | 'checkbox' | 'dropdown' | 'radio', required
  - `placement` 'coordinate' | 'anchor' | 'bookmark', required
  - `pageNumber` number, required: 1-based page number, or -1 for last page.
  - `xPosition` number, nullable
  - `yPosition` number, nullable
  - `width` number, required
  - `height` number, required
  - `required` boolean, required
  - `mergeFieldName` string, nullable
  - `defaultValue` string, nullable
  - `editable` boolean, required: When true, a prefilled value is a suggestion the signer can change before signing.
  - `sharedFill` boolean, required: One signer role owns the generated field, but until that signer signs any signer able to act may fill or correct it. Never true on signature or initials fields.
  - `signingDate` boolean, nullable: Date fields only. True fills the field with the date the signer signs: the signing page shows today and the signer does not type it. False makes it an ordinary date the signer enters. Refused on any other type. Null on a date made before the flag existed: a date on the signer’s own signature line is then the date of signing.
  - `label` string, nullable: Human-readable label shown to the signer for this field
  - `acroFieldName` string, nullable: Embedded AcroForm field this field is linked to; generated document fields inherit the link.
  - `acroOptionValue` string, nullable: For radio-group AcroForm fields: the option this field selects.
  - `options` string[], nullable: Allowed values for dropdown fields
  - `maxLength` number, nullable: Maximum characters accepted at fill time
  - `inputMask` string, nullable: Input mask where # represents one digit
  - `validationPattern` string, nullable: Regex the filled value must match
  - `validationMessage` string, nullable: Signer-facing error when validationPattern does not match
  - `dateFormat` string, nullable: Date fields only: format the auto-filled date is rendered in, e.g. 'MM-DD-YYYY'
  - `fontSize` number, nullable: Point size the value is drawn at, copied onto generated document fields. Null fits the size to the box.
  - `textColor` string, nullable: Color the value is drawn in, as #rrggbb
  - `textAlign` 'left' | 'center' | 'right': Horizontal alignment of the value inside the field box
  - `fontFamily` string, nullable: Base font the value is drawn in, copied onto generated document fields
  - `multiline` boolean, required: Whether the value may contain line breaks (a multiline form field)
  - `groupKey` string, nullable
  - `groupRequired` boolean, required: Whether at least one member of this group must be selected
  - `requiredWhenFieldId` string, uuid, nullable: Id of the template field whose checked/filled state makes this field required on generated documents; null when unconditional
  - `requiredWhenValue` string, nullable: Exact controller value the condition triggers on; null means any checked/filled state
  - `anchorText` string, nullable
  - `anchorPosition` 'replace' | 'left' | 'right' | 'above' | 'below', required
  - `anchorOffsetX` number, required
  - `anchorOffsetY` number, required
  - `hideAnchor` boolean, required
  - `anchorMatchWholeWord` boolean, required
  - `bookmarkName` string, nullable
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: Malformed UUID in path parameter (`id`).

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
