---
title: "Create Document by Envelope ID"
method: POST
path: "/sign/envelopes/{envelopeID}/documents"
tags: ["Sign"]
---

# Create Document by Envelope ID

`POST /sign/envelopes/{envelopeID}/documents`

In Nitro, a *Document* is a file that participants in an eSignature Envelope will read and sign. This could be an employment contract, NDA, legal agreement, banking form, or any other file required in your signature workflow.

The **Create Document by Envelope ID** endpoint supports uploading a **single** file per request.
Every document must be part of an Envelope container. To upload a document, first [Create an Envelope](https://developers.gonitro.com/docs/api-reference/envelope/create-envelope) and retain the Envelope `ID`.

### Supported file formats
When a `contentType` is provided in the metadata, the following formats are accepted and will be converted to PDF automatically:

#### Document formats

| Extension | Content Type |
|-----------|-------------|
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| .doc | application/msword |
| .dot | application/msword |
| .docm | application/vnd.ms-word.document.macroenabled.12 |
| .dotx | application/vnd.openxmlformats-officedocument.wordprocessingml.template |
| .dotm | application/vnd.ms-word.template.macroenabled.12 |

#### Spreadsheet formats

| Extension | Content Type |
|-----------|-------------|
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| .xls | application/vnd.ms-excel |
| .xlt | application/vnd.ms-excel |
| .xlsm | application/vnd.ms-excel.sheet.macroenabled.12 |
| .xltx | application/vnd.openxmlformats-officedocument.spreadsheetml.template |
| .xltm | application/vnd.ms-excel.template.macroenabled.12 |

#### Presentation formats

| Extension | Content Type |
|-----------|-------------|
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
| .ppt | application/vnd.ms-powerpoint |

#### Web formats

| Extension | Content Type |
|-----------|-------------|
| .html | text/html |
| .htm | text/html |
| .rtf | application/rtf |
| .xml | application/xml |

#### Image formats

| Extension | Content Type |
|-----------|-------------|
| .png | image/png |
| .jpg | image/jpeg |
| .jpeg | image/jpeg |
| .tif | image/tiff |
| .tiff | image/tiff |
| .gif | image/gif |
| .psd | image/vnd.adobe.photoshop |
| .eps | application/postscript |
| .svg | image/svg+xml |

#### Other formats

| Extension | Content Type |
|-----------|-------------|
| .csv | text/csv |

#### PDF formats

| Extension | Content Type |
|-----------|-------------|
| .pdf | application/pdf |

When `contentType` is omitted from the metadata, only PDF files are accepted.

When uploading a document, the following limits apply:
  - Maximum pages per document: 250
  - Maximum size per document: 20Mb
  - Maximum documents per envelope: 15
  - Maximum size per envelope: 300 Mb

## Path parameters

- `envelopeID` string, uuid, required

## Query parameters

- `nitroDocumentID` string — An ID reference to a user-associated Nitro Document. Instead of uploading a new file, you can attach an existing Nitro Document to an envelope by referencing its `nitroDocumentID`. This lets you reuse documents that have already been uploaded. To do this, provide the `nitroDocumentID` **instead** of a file in the `payload`. Important: `nitroDocumentID` and `payload` parameters are mutually exclusive. You must choose one of the following combinations: `payload` + `metadata` `nitroDocumentID` + `metadata` Providing both in the same request will throw an error.

## Response `201`

When a document is created you will get a unique ID for it. You can add fields to the document later by referencing its unique ID using other endpoints in this API. When the document is first created, it will be in a pending state until it is processed by our system.

- PendingDocumentResponse — Response for a pending document
  - `name` string, required — Name of the file provided by the user.
  - `createdAt` string, date-time — UTC timestamp indicating when the document was created.
  - `status` 'pending' | 'uploaded' | 'failed' | 'signed' | 'sealed' — Current status of the document.
  - `ID` string, uuid, required — Unique uuid identifier for the document.

## Other responses

- `400` — Invalid envelope or document name
- `401` — Unauthorized - Invalid or missing JWT token
- `413` — Content too large
- `415` — File format not supported
- `422` — Unprocessable entity - too many documents. An envelope can contain up to 15 documents, with each document not exceeding 20 MB in size.

---

[API](https://skmtc.net/gonitro/apis/nitro-sign-public-api.md) · [All operations](https://skmtc.net/gonitro/apis/nitro-sign-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gonitro/nitro-sign-public-api/revisions/26e3043a365b/schema)
