---
title: "Add Document"
method: POST
path: "/v1/documents"
tags: ["agent-protocol"]
---

# Add Document

`POST /v1/documents`

## Request

- Base URL: `https://api.app.membase.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.app.membase.ai/v1/documents`
- Auth: none declared

Hand a document (text or url) to a container. Lands at once; learned in the
background — poll `GET /v1/documents/{id}` for `learned`.

## Request body

- AddDocumentRequest
  - `container` string, required: Which container reads it.
  - `content` string, nullable: The document's full text.
  - `url` string, nullable: A public web address to fetch instead.
  - `title` string
  - `metadata` object, nullable: Your own tags, as an object.
  - `custom_id` string: Your own id; adding the same custom_id again is a no-op.

## Response `202`

Successful Response

- object

## Other responses

- `422`: Validation Error
- `default`: Error envelope (ADR 0027)

---

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