---
title: "Prefill text fields"
method: PUT
path: "/v2/documents/{document_id}/prefill-texts"
---

# Prefill text fields

`PUT /v2/documents/{document_id}/prefill-texts`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/v2/documents/{document_id}/prefill-texts`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/v2/documents/:document_id/prefill-texts/put.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows users to prefill text fields that signers can edit. Only fields of type `text` can be prefilled.

**Example**

<img src="/reference-assets/images/Screenshots with attribute explanations/Prefill_text_example.png" alt="Prefilled text">

## Request body

- object
  - `fields` object[], required: The array that contains field objects to add values to. Each field object is identified by the `field_name`.
    - `field_name` string, required: The unique field name that identifies the field. Can be found in the `name` parameter of the field in response from `GET /document/{document_id}`.
    - `prefilled_text` string, required: The value that should appear on the document.

## Response `204`

Successful response. The text fields are prefilled.

- object

## Other responses

- `400`: * Wrong, expired, or missing token. * `fields` is empty or missing. * The document has no text field with this `field_name`.
- `404`: The document doesn't exist.

---

[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)
