Skip to main content
POST
/
agents
/
documents
cURL
curl -X POST "https://api.cartesia.ai/agents/documents" \
  -H "X-API-Key: your-api-key" \
  -H "Cartesia-Version: 2025-04-16" \
  -H "Content-Type: application/json" \
  -d '{
    "folder_id": "folder_abc",
    "name": "Return Policy",
    "content": "Customers may return any unopened item within 30 days...",
    "metadata": {"category": "policy", "audience": "customer"}
  }'
{
  "id": "<string>",
  "name": "<string>",
  "content": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "metadata": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Cartesia API key (sk_car_...). Get one at play.cartesia.ai/keys.

Headers

Cartesia-Version
enum<string>
required

API version header.

Available options:
2026-03-01
Example:

"2026-03-01"

Body

application/json
folder_id
string
required

The folder to upload the document into.

content
string
required

The document text. Maximum 1 MB.

Minimum string length: 1
name
string | null

An optional display name for the document.

metadata
object

User-defined string-keyed metadata. Used to filter retrieval at query time.

Response

Document created.

id
string
required

The ID of the document.

name
string | null
required

The document's display name, or null if unnamed.

content
string
required

The full document text.

created_at
string<date-time>
required

When the document was uploaded.

metadata
object
required

User-defined string-keyed metadata.