Skip to main content
POST
/
sign
/
envelopes
/
{envelopeID}
/
documents
Create Document by Envelope ID
curl --request POST \
  --url https://api.gonitro.dev/sign/envelopes/{envelopeID}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'metadata={
  "name": "<string>"
}' \
  --form payload=@example-file
{
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "status": "pending",
  "ID": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

envelopeID
string<uuid>
required

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

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.

Body

multipart/form-data
metadata
object
required

The Metadata for the uploaded document

payload
file

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>"};type=application/json'   -F "payload=@/path/to/document.pdf;type=application/pdf"  # @ symbol reads file content

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.

Response for a pending document

name
string
required

Name of the file provided by the user.

Minimum length: 1
ID
string<uuid>
required

Unique uuid identifier for the document.

Minimum length: 1
createdAt
string<date-time>

UTC timestamp indicating when the document was created.

status
enum<string>

Current status of the document.

Available options:
pending,
uploaded,
failed,
signed,
sealed
I