PATCH
/
v2
/
documents
/
{document_id}
Update Document
curl --request PATCH \
  --url https://tavusapi.com/v2/documents/{document_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "document_name": "Updated Document Name",
  "tags": [
    "important",
    "meeting",
    "updated"
  ]
}'
{
  "uuid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "document_name": "Updated Document Name",
  "document_url": "https://example.com/document.pdf",
  "status": "ready",
  "created_at": "2024-01-01T12:00:00Z",
  "updated_at": "2024-01-01T13:00:00Z",
  "callback_url": "https://your-server.com/webhook",
  "tags": [
    "important",
    "meeting",
    "updated"
  ],
  "properties": {
    "department": "sales",
    "priority": "high"
  }
}
Update metadata for a specific document. This endpoint allows you to modify the document name and its tags.

Authorizations

x-api-key
string
header
required

Path Parameters

document_id
string
required

The unique identifier of the document to update

Body

application/json
document_name
string

New name for the document

Example:

"Updated Document Name"

tags
string[]

New array of tags for the document. This will overwrite the existing tags for the document.

Example:
["important", "meeting", "updated"]

Response

Document updated successfully

uuid
string

Unique identifier for the document

Example:

"d290f1ee-6c54-4b01-90e6-d701748f0851"

document_name
string

Updated name of the document

Example:

"Updated Document Name"

document_url
string

URL of the document

Example:

"https://example.com/document.pdf"

status
string

Current status of the document processing

Example:

"ready"

created_at
string

ISO 8601 timestamp of when the document was created

Example:

"2024-01-01T12:00:00Z"

updated_at
string

ISO 8601 timestamp of when the document was last updated

Example:

"2024-01-01T13:00:00Z"

callback_url
string

URL that receives status updates

Example:

"https://your-server.com/webhook"

tags
string[]

Updated array of document tags

Example:
["important", "meeting", "updated"]
properties
object

Additional document properties

Example:
{ "department": "sales", "priority": "high" }