---
title: "Add smart fields to template"
method: POST
path: "/document/{template_id}/integration_objects"
---

# Add smart fields to template

`POST /document/{template_id}/integration_objects`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/document/{template_id}/integration_objects`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/document/:template_id/integration_objects/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows API users to add smart fields to a template: fillable fields mapped to the fields in a CSV file. With smart fields, users can have their documents generated from a template and pre-filled automatically with data from a CSV file (spreadsheet) before sending.

## Request body

- object
  - `integration_objects` object[], required: Array of Smart Field objects.
    - `x` integer, required: X coordinates of a pixel on the page where the smart field should be placed.
    - `y` integer, required: X coordinates of a pixel on the page where the smart field should be placed.
    - `data` string, required: The name of the smart field.
    - `font` string, required: Font for the text in the smart field. Possible values: `Arial`, `Times New Roman`, `Courier New`, `Tahoma`, and `Comic Sans MS`.
    - `size` integer, required: Font size for the text in the field.
    - `width` number: Field width
    - `height` number: Field height
    - `page_number` integer, required: The page in the document where the smart field should be placed.
    - `api_integration_id` string, required: Always set to `b98fc00add6b43a606bc527c81eee741bf16a7d8`

## Response `200`

Returns a new document ID in SignNow.

- object
  - `ids` string[]: IDs of the added smart fields.

## Other responses

- `400`: * Wrong, expired, or missing token. * Incorrect payload. * User doesn’t own the document. * Document is a part of a document group that is being changed. * `integration_objects` not an array. * Empty `integration_objects`. * `api_integration_id` is not a string. * `api_integration_id` is not found. * Incorrect `color` format. * `bold`, `italic`, or `underline` is not a boolean. * `line_height` is not numeric. * `line_height` is less than 0 or greater than 999.99. * `size` is not numeric. * Empty `size`. * `size` is less than 0 or greater than 2147483647. * `x` or `y` is not numeric. * Empty `x` or `y`. * `x` or `y` is less than 0. * `x` or `y` is greater than 16777215. * `data` is not a string. * Empty `data`. * `data` contains an ampersand (&). * `height` or `width` is not an integer. * `height` or `width` is not within the 0-16777215 range. * `font` is not a string. * Empty `font`. * `page_number` is not an integer. * Empty `page_number`. * `page_number` is less than 0.
- `404`: Document not found.

---

[API](https://skmtc.dev/signnow/apis/signnow-api.md) - [All operations](https://skmtc.dev/signnow/apis/signnow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signnow/apis/signnow-api/revisions/1c9c30a6142b?raw)
