---
title: "V1 Upload Document"
method: POST
path: "/api/v1/documents"
tags: ["public-api"]
---

# V1 Upload Document

`POST /api/v1/documents`

## Request

- Base URL: `https://api.general.legal`
- URL: `https://api.general.legal/api/v1/documents`
- Auth: HTTP bearer

Upload a document in one multipart request (20 MiB max). Most
non-executable file types are accepted; encrypted, malformed, or unsafe files
are rejected. Pass deal_id to attach to a matter, contract_id for a new version
of an existing document, or neither to open a fresh matter.

## Headers

- `authorization` string, nullable

## Request body `multipart/form-data`

- BodyV1UploadDocumentApiV1DocumentsPost
  - `file` string, binary, required
  - `deal_id` string, uuid, nullable
  - `contract_id` string, uuid, nullable
  - `context_for_legal` string, nullable
  - `last_edit_by` string

## Response `200`

Successful Response

- DocumentUploaded
  - `deal_id` union
    - string, uuid
    - string
  - `contract_id` union
    - string, uuid
    - string
  - `version_id` union
    - string, uuid
    - string
  - `contracts` object[], nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/general/apis/general-legal-api.md) - [All operations](https://skmtc.dev/general/apis/general-legal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/general/apis/general-legal-api/revisions/4a9709568945?raw)
