v2

latestOpenAPI 3.1.02026-08-064686150.6 KB
Sign

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

ExtensionContent Type
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.docapplication/msword
.dotapplication/msword
.docmapplication/vnd.ms-word.document.macroenabled.12
.dotxapplication/vnd.openxmlformats-officedocument.wordprocessingml.template
.dotmapplication/vnd.ms-word.template.macroenabled.12

Spreadsheet formats

ExtensionContent Type
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xlsapplication/vnd.ms-excel
.xltapplication/vnd.ms-excel
.xlsmapplication/vnd.ms-excel.sheet.macroenabled.12
.xltxapplication/vnd.openxmlformats-officedocument.spreadsheetml.template
.xltmapplication/vnd.ms-excel.template.macroenabled.12

Presentation formats

ExtensionContent Type
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
.pptapplication/vnd.ms-powerpoint

Web formats

ExtensionContent Type
.htmltext/html
.htmtext/html
.rtfapplication/rtf
.xmlapplication/xml

Image formats

ExtensionContent Type
.pngimage/png
.jpgimage/jpeg
.jpegimage/jpeg
.tifimage/tiff
.tiffimage/tiff
.gifimage/gif
.psdimage/vnd.adobe.photoshop
.epsapplication/postscript
.svgimage/svg+xml

Other formats

ExtensionContent Type
.csvtext/csv

PDF formats

ExtensionContent Type
.pdfapplication/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
post/sign/envelopes/{envelopeID}/documents

Path parameters

envelopeIDstring uuid required

A unique UUIDv4 string that identifies the envelope in the Nitro system.

Query parameters

nitroDocumentIDstring

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.

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

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.

namestring required

Name of the file provided by the user.

createdAtstring date-time

UTC timestamp indicating when the document was created.

status'pending' | 'uploaded' | 'failed' | 'signed' | 'sealed'

Current status of the document.

IDstring uuid required

Unique uuid identifier for the document.