> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Upload document to request

POST https://api-d.docusign.com/v1/accounts/{accountId}/requests/{requestId}/documents
Content-Type: multipart/form-data

Uploads a new document to the specified request.

Reference: https://developers.docusign.com/docs/agreement-desk-api/reference/agreementdesk/requests/uploadrequestdocument

## Authentication

- `Authorization` header (bearer token, required) — Docusign OAuth 2.0 access token

## Servers

- `https://api-d.docusign.com` (Demo, default)
- `https://api.docusign.com` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The ID of the account that owns the request statuses.
- `requestId` (string, required) — The ID of the request (Agreement Desk ticket) the document belongs to.

### Body (multipart/form-data)

This endpoint expects a multipart form containing a file.

- `file` (file, required) — The document file to upload.
- `label_id` (string, optional) — The optional identifier of a document label to assign.
- `name` (string, optional) — An optional display name for the document. Defaults to the uploaded file name.

## Response

### 201

The document was uploaded to the request.

- `_links` (DocumentLinks, optional) — Hypermedia links for a document resource: a PageLinks superset (paging controls, if any) plus the DMS download link.
- `response_metadata` (ResponseMetadata, optional) — Control information and metadata for the response.
- `metadata` (ResourceMetadata, optional) — Audit and provenance metadata for a resource.
- `id` (string, optional) — The unique identifier of the document.
- `name` (string, optional) — The file name of the document.
- `content_type` (string, optional) — The MIME type of the document content.
- `current_version` (integer, optional) — The current version number of the document.
- `label` (DocumentLabel, optional) — A label assigned to a document.
- `_actions` (UploadDocumentResponseActions, optional) — Available actions on the document (HATEOAS). Left empty for now; reserved for future use.

## Errors

### 400 Bad Request Error

The request was malformed.

- `status` (integer, required) — The HTTP status code generated for this occurrence of the problem.
- `title` (string, required) — A short, human-readable summary of the problem type.
- `type` (string, required) — A URI reference that identifies the problem type.
- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ValidationError, optional) — Field-level validation errors when multiple issues exist.
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `request_id` (string, optional) — Unique identifier for the request, useful for tracing with support.
- `timestamp` (datetime, optional) — The timestamp when the error occurred.

### 401 Unauthorized Error

The request was not authenticated.

- `status` (integer, required) — The HTTP status code generated for this occurrence of the problem.
- `title` (string, required) — A short, human-readable summary of the problem type.
- `type` (string, required) — A URI reference that identifies the problem type.
- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ValidationError, optional) — Field-level validation errors when multiple issues exist.
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `request_id` (string, optional) — Unique identifier for the request, useful for tracing with support.
- `timestamp` (datetime, optional) — The timestamp when the error occurred.

### 404 Not Found Error

The specified request was not found.

- `status` (integer, required) — The HTTP status code generated for this occurrence of the problem.
- `title` (string, required) — A short, human-readable summary of the problem type.
- `type` (string, required) — A URI reference that identifies the problem type.
- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ValidationError, optional) — Field-level validation errors when multiple issues exist.
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `request_id` (string, optional) — Unique identifier for the request, useful for tracing with support.
- `timestamp` (datetime, optional) — The timestamp when the error occurred.

### 413 Content Too Large Error

The document exceeds the maximum allowed size.

- `status` (integer, required) — The HTTP status code generated for this occurrence of the problem.
- `title` (string, required) — A short, human-readable summary of the problem type.
- `type` (string, required) — A URI reference that identifies the problem type.
- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ValidationError, optional) — Field-level validation errors when multiple issues exist.
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `request_id` (string, optional) — Unique identifier for the request, useful for tracing with support.
- `timestamp` (datetime, optional) — The timestamp when the error occurred.

### 415 Unsupported Media Type Error

The document content type is not supported.

- `status` (integer, required) — The HTTP status code generated for this occurrence of the problem.
- `title` (string, required) — A short, human-readable summary of the problem type.
- `type` (string, required) — A URI reference that identifies the problem type.
- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ValidationError, optional) — Field-level validation errors when multiple issues exist.
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `request_id` (string, optional) — Unique identifier for the request, useful for tracing with support.
- `timestamp` (datetime, optional) — The timestamp when the error occurred.

## Types

### DocumentLinks

Hypermedia links for a document resource: a PageLinks superset (paging controls, if any) plus the DMS download link.

- `collection` (PageLink, optional) — A URL that references a specific page in the pagination process.
- `next` (PageLink, optional) — A URL that references a specific page in the pagination process.
- `self` (PageLink, optional) — A URL that references a specific page in the pagination process.
- `document` (PageLink, optional) — A URL that references a specific page in the pagination process.

### ResponseMetadata

Control information and metadata for the response.

- `request_id` (string, required, nullable) — Unique identifier for the request, useful for tracking and debugging.
- `response_timestamp` (datetime, required, nullable) — The timestamp indicating when the response was generated.
- `page_limit` (integer, optional, nullable, default: 25) — The maximum number of items that can be returned in a single page.

### ResourceMetadata

Audit and provenance metadata for a resource.

- `created_at` (datetime, optional, nullable) — Timestamp when the resource was created.
- `created_by` (string, optional, nullable) — User ID of the person who created the resource.
- `modified_at` (datetime, optional, nullable) — Timestamp when the resource was last modified.
- `modified_by` (string, optional, nullable) — User ID of the person who last modified the resource.

### DocumentLabel

A label assigned to a document.

- `id` (string, required) — The unique identifier of the label.
- `name` (string, optional) — The display name of the label.

### UploadDocumentResponseActions

Available actions on the document (HATEOAS). Left empty for now; reserved for future use.

### ValidationError

A single field-level or parameter-level validation error.

- `code` (string, required) — A machine-readable error code identifying the specific validation failure.
- `message` (string, required) — A human-readable description of the validation error.
- `target` (string, optional) — The name of the field, parameter, or path segment that caused the error.

### PageLink

A URL that references a specific page in the pagination process.

- `href` (string, required) — The URL for the referenced page.

## Examples

**Request**

```json
{
  "file": "<file: string>"
}
```

**Response**

```json
{
  "_links": {
    "document": {
      "href": "https://apps.docusign.com/document-public-dms/v1/accounts/aaaa1111-bbbb-2222-cccc-ddddeeee0001/api/proxy-bbbb2222-cccc-4ddd-8eee-ffff33334444"
    }
  },
  "response_metadata": {
    "request_id": "3f7c9e4b-851c-4f9b-89e7-123456789abc",
    "response_timestamp": "2026-08-26T14:30:00Z",
    "page_limit": 25
  },
  "metadata": {
    "created_at": "2026-08-26T14:30:00Z",
    "created_by": "bbbb2222-cccc-4ddd-8eee-ffff33334444",
    "modified_at": "2026-08-26T14:30:00Z",
    "modified_by": "bbbb2222-cccc-4ddd-8eee-ffff33334444"
  },
  "id": "5d4c3b2a-1f0e-4d3c-9b8a-7f6e5d4c3b2a",
  "name": "Sample Document.pdf",
  "content_type": "application/pdf",
  "current_version": 1,
  "_actions": {}
}
```