メインコンテンツへスキップ
PATCH
/
agents
/
documents
/
{document_id}
Update Document
curl --request PATCH \
  --url https://api.cartesia.ai/agents/documents/{document_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Cartesia-Version: <cartesia-version>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "name": "<string>",
  "metadata": {},
  "folder_id": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "content": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "metadata": {}
}

承認

Authorization
string
header
必須

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

ヘッダー

Cartesia-Version
enum<string>
必須

API version header.

利用可能なオプション:
2026-03-01
:

"2026-03-01"

パスパラメータ

document_id
string
必須

The ID of the document.

ボディ

application/json

Fields to update on a document

content
string

New document text. Maximum 1 MB. Updating this property triggers re-indexing of the document.

Minimum string length: 1
name
string | null

New display name. Pass null to clear.

metadata
object

Replacement metadata map. Updating this property triggers re-indexing of the document.

folder_id
string

Move the document to a different folder.

レスポンス

Document updated.

id
string
必須

The ID of the document.

name
string | null
必須

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

content
string
必須

The full document text.

created_at
string<date-time>
必須

When the document was uploaded.

metadata
object
必須

User-defined string-keyed metadata.