---
title: "Upload document with tags"
url: "https://docs.signnow.com/docs/document/operations/upload-document-with-text-tags"
type: "endpoint"
section: "document"
slug: "document/operations/upload-document-with-text-tags"
method: "POST"
path: "/document/fieldextract"
operation_id: "upload-document-with-text-tags"
authorization: "bearer"
---

# Upload document with tags

`POST /document/fieldextract`

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>

## Authorization

bearer

## Form Data Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file` | string | Yes | @/path/to/your/file.pdf |
| `Tags[]:` | string | No | 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 | No | Determines the parse flow for document text tags. Possible values:  `tag`, `adobe`, `all`, `default`.  |
| `password` | string | No | Password to open a password-protected PDF. |

## Responses

### 200

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

**Example** (`Successful response`)

```json
{
  "id": "346d46094801b8a8a0826372d0b7ef466cbebacb"
}
```

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

**Example** (`No file`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Must upload one file"
    }
  ]
}
```

**Example** (`Wrong token`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`File too large`)

```json
{
  "errors": [
    {
      "code": 65580,
      "message": "File is too big."
    }
  ]
}
```

**Example** (`Wrong password`)

```json
{
  "errors": [
    {
      "code": 21001012,
      "message": "Could not decrypt the file, invalid password"
    }
  ]
}
```

**Example** (`Password required`)

```json
{
  "errors": [
    {
      "code": 21001011,
      "message": "Decrypt the file, password required"
    }
  ]
}
```

**Example** (`Unsupported file type`)

```json
{
  "errors": [
    {
      "code": 65578,
      "message": "Invalid file type."
    }
  ]
}
```

### 413

The request body is larger than `55` MB. The response is an HTML page, not JSON.

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/document/fieldextract" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

---
*Full reference: https://docs.signnow.com/docs/document/operations/upload-document-with-text-tags*
