PATCH
/
upload
/
update_document
cURL
curl --request PATCH \
  --url https://api.usecortex.ai/upload/update_document \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'accept: <accept>' \
  --form 'tenant_metadata={}' \
  --form 'document_metadata={}' \
  --form file=@example-file
{
  "success": true,
  "message": "Update message pushed to SQS.",
  "file_id": "CortexDoc123"
}

Sample Request

curl --location --request PATCH 'https://api.usecortex.ai/upload/update_document?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}&source_id={SOURCE_ID}' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {API_KEY}' \
--form 'file=@"{FILE}"' \
--form 'tenant_metadata="{\"department\":\"Finance\",\"compliance_tag\":\"GDPR\"}"' \
--form 'document_metadata="{\"title\":\"Q1 Report.pdf\",\"author\":\"Alice Smith\"}"'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token (your API key)

accept
string
default:application/json
required

Response content type

Query Parameters

tenant_id
string

Tenant identifier

sub_tenant_id
string

Sub-tenant identifier

source_id
string
required

The ID of the source to update

Body

multipart/form-data

Response

200
application/json

Update accepted

The response is of type object.