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

# Upload document

`POST /document`

This endpoint allows API users to upload a file to the user's account and get the ID of the uploaded document. Accepts .pdf, .doc, .docx, .odt, .rtf, .png, .jpg, .jpeg, .gif, .bmp, .xml, .xls, .xlsx, .ppt, .pptx, .ps, and .eps file types.

Maximum file size per upload is 50 Mb. 

The same limit works for the attachments uploaded by signers via SignNow editor.

For more information, check out our video tutorial.

<details open>

**<summary>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>

[Video tutorial](https://www.youtube.com/watch?v=4pPTE7-WXVM)

</details>

## Authorization

bearer

## Form Data Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file` | string | Yes | @/path/to/your/file.pdf |
| `check_fields` | boolean | No | If true, you can upload a document with simple text tags. For more information, see [Upload document with tags](/docs/document/operations/upload-document-with-text-tags). |
| `name` | string | No | Name of the document. Max: `255` characters. Default: the file name without the extension. |
| `folder_id` | string | No | ID of the user's folder to upload the document to. Default: the `Documents` folder. |
| `password` | string | No | Password to open a password-protected PDF. |

## Responses

### 200

Successful response.

**Example** (`Successful response`)

```json
{
  "id": "0d4ad4b1d6a64bf6a8e8b7f0e2f5b5ac0c1f9e3d"
}
```

### 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.
* The `folder_id` doesn't match any of the user's folders.
* The `name` is longer than `255` characters.

**Example** (`No file`)

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

**Example** (`Wrong token`)

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

**Example** (`Name too long`)

```json
{
  "errors": [
    {
      "code": 65581,
      "message": "Document name is too long. Max size is 255 symbols"
    }
  ]
}
```

**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** (`Wrong folder ID`)

```json
{
  "errors": [
    {
      "code": 65579,
      "message": "Incorrect folder id."
    }
  ]
}
```

**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" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

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