Create Document by Envelope ID
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 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 |
|---|---|
| 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
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
A unique UUIDv4 string that identifies the envelope in the Nitro system.
Query Parameters
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.
Body
The Metadata for the uploaded document
The document to upload, provided as binary data. Each file can be up to 20 MB and 250 pages.
An Envelope can include up to 15 files total, with a combined size limit of 300 MB.
Example:
curl -X POST "https://api.gonitro.dev/sign/envelopes/{envelopeID}/documents" -H "Authorization: Bearer <token>" -F 'metadata={"name":"<your_document_name>","contentType":"application/pdf"};type=application/json' -F "payload=@/path/to/document.pdf" # @ symbol reads file contentResponse
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.
Response for a pending document
Name of the file provided by the user.
1Unique uuid identifier for the document.
1UTC timestamp indicating when the document was created.
Current status of the document.
pending, uploaded, failed, signed, sealed