For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
      • POSTUpload Document
      • GETRetrieve Document
      • GETList Documents
      • PATCHUpdate Document
      • DELDestroy
LogoLogo
BlogLog InRequest Demo
Client SDKDocuments

Update Document

Beta
PATCH
https://api.vellum.ai/v1/documents/:id
PATCH
/v1/documents/:id
1import requests
2
3url = "https://api.vellum.ai/v1/documents/id"
4
5payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"label\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"status\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywords\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"metadata\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
6headers = {
7 "X-API-KEY": "<apiKey>",
8 "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
9}
10
11response = requests.patch(url, data=payload, headers=headers)
12
13print(response.json())
200Updated
1{
2 "id": "string",
3 "last_uploaded_at": "2024-01-15T09:30:00Z",
4 "label": "string",
5 "processing_state": "QUEUED",
6 "original_file_url": "string",
7 "document_to_document_indexes": [
8 {
9 "id": "string",
10 "environment_document_index_id": "string",
11 "document_index_id": "string",
12 "extracted_text_file_url": "string",
13 "processing_state": "string",
14 "indexing_state": "AWAITING_PROCESSING"
15 }
16 ],
17 "external_id": "string",
18 "status": "ACTIVE",
19 "keywords": [
20 "string"
21 ],
22 "metadata": {}
23}

Update a Document, keying off of either its Vellum-generated ID or its external ID. Particularly useful for updating its metadata.

Was this page helpful?
Previous

Destroy

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

idstringRequiredformat: "^[^/]+$"

Headers

X-API-VersionstringOptional

Request

This endpoint expects a multipart form.
labelstringOptional1-1000 characters

A human-readable label for the document. Defaults to the originally uploaded file’s file name.

statusenumOptional
The current status of the document * `ACTIVE` - Active
Allowed values:
keywordslist of stringsOptional
A list of keywords that'll be associated with the document. Used as part of keyword search.
metadatamap from strings to any or nullOptional
A JSON object containing any metadata associated with the document that you'd like to filter upon later.

Response

idstringformat: "uuid"
last_uploaded_atstringformat: "date-time"
labelstring<=1000 characters

A human-readable label for the document. Defaults to the originally uploaded file’s file name.

processing_stateenum
  • QUEUED - Queued
  • PROCESSING - Processing
  • PROCESSED - Processed
  • FAILED - Failed
  • UNKNOWN - Unknown
Allowed values:
original_file_urlstring or null
document_to_document_indexeslist of objects
external_idstring or null<=1000 characters
The unique id of this document as it exists in the user's system.
statusenum

The current status of the document

  • ACTIVE - Active
Allowed values:
keywordslist of strings
A list of keywords that'll be associated with the document. Used as part of keyword search.
metadatamap from strings to any or null
A previously supplied JSON object containing metadata that can be filtered on when searching.

The current status of the document

  • ACTIVE - Active