---
title: "Add new fields to a Template"
method: PUT
path: "/templates/{template_id}/add_fields"
tags: ["Templates"]
---

# Add new fields to a Template

`PUT /templates/{template_id}/add_fields`

Adds fields to a PDF template. Configure field types, positions,
defaults, and formatting options.

## Path parameters

- `template_id` string, required

## Request body

- object
  - `fields` object[], required
    - `alignment` 'left' | 'center' | 'right'
    - `autoCalculateMaxLength` boolean
    - `backgroundColor` string
    - `backgroundColorFieldName` string
    - `backgroundColorFieldRequired` boolean
    - `barcodeSymbology` string
    - `bold` boolean
    - `characterSpacing` number
    - `checkCharacter` '&#10003;' | '&#10004;' | '&#10006;' | '&#10007;' | '&#10008;'
    - `checkColor` string
    - `checkColorFieldName` string
    - `checkColorFieldRequired` boolean
    - `color` string
    - `colorFieldName` string
    - `colorFieldRequired` boolean
    - `comb` boolean
    - `combNumberOfCells` number
    - `combValueOffset` number
    - `combinedFieldFormat` string
    - `combinedFieldNames` string
    - `combinedFieldSeparator` string
    - `combinedFieldType` string
    - `condition` string
    - `currency` boolean
    - `dateTimeFormat` string
    - `decimalPlaces` number
    - `default` string
    - `description` string
    - `displayType` 'text' | 'check' | 'qrcode' | 'barcode' | 'image' | 'shape'
    - `exclusiveMaximum` boolean
    - `exclusiveMinimum` boolean
    - `falseText` string
    - `fontSize` number
    - `height` number
    - `hidden` boolean
    - `id` number
    - `imageGravity` 'NorthWest' | 'North' | 'NorthEast' | 'West' | 'Center' | 'East' | 'SouthWest' | 'South' | 'SouthEast'
    - `imageScaleType` 'fit' | 'fill' | 'stretch'
    - `includeTime` boolean
    - `integer` boolean
    - `invertBooleanCondition` boolean
    - `maxLength` number
    - `maximum` number
    - `metadata` string
    - `minLength` number
    - `minimum` number
    - `multiline` boolean
    - `multilineLines` number
    - `name` string, required
    - `numberConditionRangeExclusiveMax` boolean
    - `numberConditionRangeExclusiveMin` boolean
    - `numberConditionRangeMax` number
    - `numberConditionRangeMin` number
    - `numberConditionType` 'equals' | 'range' | 'gte' | 'gt' | 'lte' | 'lt'
    - `opacity` number
    - `optionList` string
    - `overflow` 'shrink_to_fit' | 'truncate'
    - `page` number, required
    - `placeholder` string
    - `qrcodeColor` string
    - `qrcodeColorFieldName` string
    - `qrcodeColorFieldRequired` boolean
    - `required` boolean
    - `rotation` number
    - `shapeBorderColor` string
    - `shapeBorderColorFieldName` string
    - `shapeBorderColorFieldRequired` boolean
    - `shapeBorderWidth` number
    - `shapeFillColor` string
    - `shapeFillColorFieldName` string
    - `shapeFillColorFieldRequired` boolean
    - `shapeType` 'square' | 'rectangle' | 'circle' | 'ellipse'
    - `signatureAllowDraw` boolean
    - `signatureAllowType` boolean
    - `static` boolean
    - `strikethrough` boolean
    - `stringConditionType` 'equals' | 'contains' | 'starts_with' | 'ends_with' | 'regex'
    - `title` string
    - `trueText` string
    - `type` 'string' | 'number' | 'boolean' | 'date' | 'address' | 'country' | 'email' | 'url' | 'image' | 'signature' | 'initials' | 'barcode' | 'combined'
    - `typeface` string
    - `uppercase` boolean
    - `vAlignment` 'bottom' | 'center' | 'top'
    - `width` number
    - `x` number
    - `y` number

## Response `200`

add fields success

- TemplateAddFieldsResponse
  - `status` 'success' | 'error', required
  - `errors` string[]
  - `new_field_ids` integer[]

## Other responses

- `422` — add fields error

---

[API](https://skmtc.net/docspring/apis/docspring-api.md) · [All operations](https://skmtc.net/docspring/apis/docspring-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/docspring/docspring-api/versions/88e2ef4f5847/schema)
