Skip to main content
PATCH
/
api
/
documents
/
{id}
Update Document
curl --request PATCH \
  --url https://api.orchata.ai/api/documents/{id} \
  --header 'Content-Type: application/json' \
  --header 'Oai-Api-Key: <api-key>' \
  --data '
{
  "spaceId": "space_123",
  "status": "PENDING",
  "errorMessage": "<string>",
  "metadata": {},
  "content": "<string>"
}
'
{
  "document": {
    "id": "<string>",
    "orgId": "<string>",
    "spaceId": "<string>",
    "filename": "<string>",
    "mimeType": "<string>",
    "fileSize": "<string>",
    "storageUrl": "<string>",
    "status": "<string>",
    "errorMessage": "<string>",
    "embeddingModel": "<string>",
    "indexingType": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "metadata": "<unknown>"
  }
}

Authorizations

Oai-Api-Key
string
header
required

Path Parameters

id
string
required
Example:

"document_123"

Body

application/json

Document update data

spaceId
string
required

The ID of the space containing the document

Example:

"space_123"

status
enum<string>
Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
errorMessage
string | null
metadata
object
content
string
Required string length: 1 - 10000000

Response

Document updated successfully

document
object
required