Templates

Update a template field

patch/api/v1/templates/{id}/fields/{fieldId}

Request

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

Path parameters

idstring required
fieldIdstring required

Request body

valueKeystring

Links repeated text fields for the same signer. Signer edits or clears one occurrence to update every field with this valueKey. Independent of the merge variable used for prefills.

signerRoleIdstring nullable

Signer role ID (set to null to unassign, omit to keep unchanged)

placement'coordinate' | 'anchor' | 'bookmark'
pageNumbernumber

1-based page number, or -1 for the last page.

xPositionnumber
yPositionnumber
widthnumber
heightnumber
requiredboolean
mergeFieldNamestring
defaultValuestring
editableboolean

Treat a value resolved from variables or defaultValue as a suggestion the signer can change before signing.

sharedFillboolean

One signer role owns the generated field, but until that signer signs any signer able to act may fill or correct it. Refused on signature and initials fields.

signingDateboolean

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. Copied onto every document made from the template.

labelstring

Human-readable label shown to the signer for this field

acroFieldNamestring nullable

Embedded AcroForm field to link this field to (see GET /templates/{id}/form-fields). Set to null to unlink: generated documents then draw the value at the field's coordinates instead of writing it through the PDF's form field. Omit to keep unchanged.

acroOptionValuestring nullable

For radio-group AcroForm fields: the option (export value) this field selects when checked. Set to null to clear it, omit to keep it unchanged.

optionsstring[]

Allowed values for dropdown fields. The signer picks one; fills with a value outside this list are rejected.

maxLengthnumber

Maximum characters accepted at fill time. Imported automatically from AcroForm comb fields by detection.

inputMaskstring nullable

Single-line signer input mask. Each # accepts one digit; Korala inserts every other character as a literal.

validationPatternstring

Regular expression the filled value must match (text and date fields). Rejected fills return validationMessage.

validationMessagestring

Signer-facing error when validationPattern does not match

dateFormatstring

Date fields only: format the auto-filled date is rendered in. Combines D/DD, M/MM, and YY/YYYY tokens with a consistent "-", "/", or "." separator. Copied onto generated document fields.

fontSizenumber

Point size the value is drawn at, copied onto generated document fields. Imported automatically from the base PDF's form fields; omit to fit the size to the box.

textColorstring

Color the value is drawn in, as #rrggbb

textAlign'left' | 'center' | 'right'

Horizontal alignment of the value inside the field box

fontFamilystring

Base font the value is drawn in, copied onto generated document fields. Imported from the base PDF's form fields; honored when the platform can render that face, otherwise the default font is used.

multilineboolean

Whether the value may contain line breaks. Imported from multiline PDF form fields and copied onto generated document fields.

groupKeystring

Semantic group key. Checkbox members sharing a groupKey are mutually exclusive (checking one clears the others) even with distinct PDF fill targets — e.g. a W-9 federal tax classification.

groupRequiredboolean

Require at least one member of this field's group to be selected before signing can complete.

requiredWhenFieldIdstring uuid nullable

Make this field conditionally required by the referenced template field (same template, same signer role). Set to null to clear the condition; omit to keep unchanged. Refused on choose-one group members.

requiredWhenValuestring nullable

Exact controller value the condition triggers on. Set to null to trigger on any checked/filled state; omit to keep unchanged.

anchorTextstring

Anchor string for anchor placement (must not contain {{ }}). Hidden markers remain in the PDF text layer — see CreateTemplateFieldDto.

anchorPosition'replace' | 'left' | 'right' | 'above' | 'below'
anchorOffsetXnumber
anchorOffsetYnumber
hideAnchorboolean
anchorMatchWholeWordboolean
bookmarkNamestring

Word bookmark name for bookmark placement — see CreateTemplateFieldDto for the naming constraint.

Example request

{
  "pageNumber": 1,
  "xPosition": 100,
  "yPosition": 200,
  "width": 200,
  "height": 50,
  "required": true,
  "mergeFieldName": "client_name",
  "defaultValue": "Default value",
  "signingDate": true,
  "label": "Your full name",
  "acroFieldName": "topmostSubform[0].Page1[0].f1_01[0]",
  "acroOptionValue": "married",
  "options": [
    "CA",
    "NY"
  ],
  "maxLength": 11,
  "inputMask": "###-##-####",
  "validationPattern": "^\\d{3}-\\d{2}-\\d{4}$",
  "validationMessage": "Enter your SSN as XXX-XX-XXXX",
  "dateFormat": "MM-DD-YYYY",
  "fontSize": 9,
  "textColor": "#000080",
  "fontFamily": "Helvetica-Bold",
  "groupKey": "fed_tax_class",
  "groupRequired": true,
  "requiredWhenValue": "Other",
  "anchorText": "Fund Lead Signature:",
  "bookmarkName": "SigSeller"
}

Response

valueKeystring nullable

Repeated text value key, scoped to the owning signer.

idstring required
templateIdstring required
signerRoleIdstring nullable
fieldType'signature' | 'initials' | 'date' | 'text' | 'checkbox' | 'dropdown' | 'radio' required
placement'coordinate' | 'anchor' | 'bookmark' required
pageNumbernumber required

1-based page number, or -1 for last page.

xPositionnumber nullable
yPositionnumber nullable
widthnumber required
heightnumber required
requiredboolean required
mergeFieldNamestring nullable
defaultValuestring nullable
editableboolean required

When true, a prefilled value is a suggestion the signer can change before signing.

sharedFillboolean 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.

signingDateboolean 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.

labelstring nullable

Human-readable label shown to the signer for this field

acroFieldNamestring nullable

Embedded AcroForm field this field is linked to; generated document fields inherit the link.

acroOptionValuestring nullable

For radio-group AcroForm fields: the option this field selects.

optionsstring[] nullable

Allowed values for dropdown fields

maxLengthnumber nullable

Maximum characters accepted at fill time

inputMaskstring nullable

Input mask where # represents one digit

validationPatternstring nullable

Regex the filled value must match

validationMessagestring nullable

Signer-facing error when validationPattern does not match

dateFormatstring nullable

Date fields only: format the auto-filled date is rendered in, e.g. 'MM-DD-YYYY'

fontSizenumber nullable

Point size the value is drawn at, copied onto generated document fields. Null fits the size to the box.

textColorstring nullable

Color the value is drawn in, as #rrggbb

textAlign'left' | 'center' | 'right'

Horizontal alignment of the value inside the field box

fontFamilystring nullable

Base font the value is drawn in, copied onto generated document fields

multilineboolean required

Whether the value may contain line breaks (a multiline form field)

groupKeystring nullable
groupRequiredboolean required

Whether at least one member of this group must be selected

requiredWhenFieldIdstring uuid nullable

Id of the template field whose checked/filled state makes this field required on generated documents; null when unconditional

requiredWhenValuestring nullable

Exact controller value the condition triggers on; null means any checked/filled state

anchorTextstring nullable
anchorPosition'replace' | 'left' | 'right' | 'above' | 'below' required
anchorOffsetXnumber required
anchorOffsetYnumber required
hideAnchorboolean required
anchorMatchWholeWordboolean required
bookmarkNamestring nullable
createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "inputMask": "###-##-####",
  "fontSize": 9,
  "textColor": "#000080",
  "fontFamily": "Helvetica-Bold"
}

Changes

No recorded changes to this operation across all 1 revision of this API.