> ## Documentation Index
> Fetch the complete documentation index at: https://docs.annature.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a document

Adds a new document to a draft envelope.

This endpoint allows integrators to dynamically build draft envelopes by uploading additional documents before sending. It accepts the same document structure used when creating an envelope, and applies the same file size and page count validations.

Word documents (`.doc`, `.docx`) are automatically converted to PDF on upload. The converted PDF will be optimised and stored, and the document returned in the response will always be in PDF format.

**Note**: Documents can only be added to envelopes that are still in draft status and have not been sent. Adding documents to a **recalled envelope** is not supported via the API.

## Parameters

<ParamField path="id" type="string">
  Optional user-defined unique identifier for the document, must be unique per envelope. If omitted, one will be auto-generated.
</ParamField>

<ParamField path="name" type="string">
  Optional display name of the document. If omitted, one will be auto-generated.
</ParamField>

<ParamField path="base" type="string" required>
  The base64-encoded content of the document. Must be a valid PDF or Word document. Max size: 10mb per document.
</ParamField>

<ParamField path="type" type="string" required>
  The MIME type of the uploaded file (`application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`).

  Word documents are converted to PDF automatically. Standard file size and page count limits apply — see [Document limits](/api-reference/documents/document-object#document-limits) for details.
</ParamField>

<ParamField path="envelope_id" type="string" required>
  The unique identifier of the envelope to which this document should be attached. Envelope must be in `draft` status.
</ParamField>

<RequestExample>
  ```bash Endpoint theme={null}
  POST /v1/documents
  ```

  ```bash Body theme={null}
  {
    "id": "fcad499b03c6fc222bc66208317a18c9",
    "name": "Non disclosure agreement.pdf",
    "base": "iVBORw0KGgoAAAANSUhE..",
    "type": "application/pdf",
    "envelope_id": "7e8f68e4c6df9395cd7ff48d69d7e2c1"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "fcad499b03c6fc222bc66208317a18c9",
    "name": "Non disclosure agreement.pdf",
    "pages": 3,
    "original": "https://annature..",
    "master": null,
    "created": "2025-07-23T02:00:00Z"
  }
  ```
</ResponseExample>
