---
title: "Upload document with tags"
method: POST
path: "/document/fieldextract"
---

# Upload document with tags

`POST /document/fieldextract`

## Request

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

This endpoint allows API users to upload a document with text tags. 

Text tags can be of two types: simple and complex. **Simple text tags** use curly brackets and a notation system to define fields. **Complex text tags** use only field names on a document; field details are provided separately in the `Tags` array. 
> Only .doc, .docx, and .pdf formats are supported.

**Additional parameters**

`parse_type`: determines how the document text tags are parsed. 

Possible values:

- `tag`: parse only simple tags. All Adobe (fillable) fields will be removed from the document without saving.

- `adobe`: parse only Adobe (fillable) fields. All simple tags will be removed from the document without saving.

- `all`: parse both simple tags and Adobe (fillable) fields. Also parses simple tags added inside Adobe fields as their content.

- `default` (or if `parse_type` not specified): parse simple and complex tags and Adobe (fillable) fields. Simple tags added as the content of Adobe fields will not be parsed.

For more information, see the [Text tags](/docs/text-tags) guide or check out our video tutorials:

<details open>

**<summary>Simple text tags video tutorial</summary>**

<sub><sup>Note: The design shown in the video is outdated, but the flow is still accurate. You can go ahead and follow the steps as demonstrated.</sup></sub>

[Simple text tags video tutorial](https://www.youtube.com/watch?v=iopDT5_4-Co)

</details>
<br>

<details open>

**<summary>Complex text tags video tutorial</summary>**

<sub><sup>Note: The design shown in the video is outdated, but the flow is still accurate. You can go ahead and follow the steps as demonstrated.</sup></sub>

[Complex text tags video tutorial](https://www.youtube.com/watch?v=V0YWL2T8F-o)

</details>

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: @/path/to/your/file.pdf
  - `Tags[]:` string: A JSON array of complex text tags in the document. Example: { "tag_name": "EmployeeName", "role": "Employee", "label": "Your name", "required": true, "type": "text", "width": 100, "height": 20 }
  - `parse_type` string: Determines the parse flow for document text tags. Possible values: `tag`, `adobe`, `all`, `default`.
  - `password` string: Password to open a password-protected PDF.

## Response `200`

The document was uploaded and fields were created from its text tags.

- object
  - `id` string: ID of the uploaded document.

## Other responses

- `400`: * Wrong, expired, or missing token. * The request has no file, or the file isn't sent in the `file` field. * The file type isn't supported. * The file is larger than `50` MB. * The PDF is password-protected and `password` is missing. * The `password` is wrong.
- `413`: The request body is larger than `55` MB. The response is an HTML page, not JSON.

---

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