PATCH
/
upload
/
update_text
cURL
curl --request PATCH \
  --url https://api.usecortex.ai/upload/update_text \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'accept: <accept>' \
  --data '{
  "content": "<string>",
  "tenant_metadata": {},
  "document_metadata": {}
}'
{
  "success": true,
  "message": "Markdown update message pushed to SQS.",
  "file_id": "CortexDoc123"
}

Sample Request

curl --location --request PATCH 'https://api.usecortex.ai/upload/update_text?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}&source_id={SOURCE_ID}' \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "content": "This is updated markdown content.",
    "tenant_metadata": {
      "department": "Finance",
      "compliance_tag": "GDPR"
    },
    "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)

Content-Type
string
default:application/json
required

Request content type

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

application/json

Response

200
application/json

Update accepted

The response is of type object.