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

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

Response

Document updated successfully

document
object
required