---
title: "Add a document"
method: POST
path: "/documents"
tags: ["document"]
---

# Add a document

`POST /documents`

## Request

- Base URL: `https://localhost:4410/api/v1`
- URL: `https://localhost:4410/api/v1/documents`
- Auth: HTTP bearer

Adds a PDF, up to 25 MB: a file attached in the chat, or content_base64 (up to 2 MB from an agent). For anything else, call document_upload_start and let the person drop the file. Share it with link_create.

## Request body

- object
  - `title` string: What to call it in Binderwork; the file name when left out.
  - `file_name` string: The file's name, such as "Seed deck.pdf".
  - `content_base64` string: The PDF or Word file, base64. Up to 2 MB from you; larger: document_upload_start.
  - `file` object: A file the person attached in the chat.
    - `download_url` string, uri, required
    - `file_id` string

## Response `200`

The result.

- object
  - `id` string, required
  - `title` string, required
  - `version` integer, required
  - `pages` integer, required
  - `page_sizes` object[], required
    - `width` number, required
    - `height` number, required
  - `file_name` string, required
  - `sha256` string, required
  - `links` integer, required
  - `views` integer, required
  - `last_viewed_at` string, date-time, nullable, required
  - `envelopes` integer, required
  - `templates` object[], required
    - `id` string, required
    - `name` string, required
    - `roles` string[], required
  - `created_at` string, date-time, required

## Other responses

- `default`: An RFC 9457 problem.

---

[API](https://skmtc.dev/binderwork/apis/binderwork-api.md) · [All operations](https://skmtc.dev/binderwork/apis/binderwork-api/llms.txt) · [OpenAPI document](https://skmtc.dev/binderwork/apis/binderwork-api/revisions/f8fab0ebee53?raw)
