POST
/
upload
/
batch_upload
curl --request POST \
  --url https://api.usecortex.ai/upload/batch_upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'files=[
  "document1.pdf",
  "document2.docx",
  "document3.txt"
]' \
  --form 'custom_metadata=[{"author":"John Doe","department":"Sales"},{"author":"Jane Smith","department":"Marketing"}]'
{
  "message": "Batch upload successful",
  "document_ids": [
    "doc_123",
    "doc_456",
    "doc_789"
  ]
}

Uploads multiple documents in a single request for processing and indexing.

Recommended: For optimal performance, limit each batch to a maximum of 20 sources per request. Send multiple batch requests with an interval of 1 second between each request.

Sample Request

curl --location 'https://api.usecortex.ai/upload/batch_upload?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {API_KEY}' \
--form 'files=@{FILE1}' \
--form 'files=@{FILE2}' \
--form 'files=@{FILE3}' \
--form 'custom_metadata="{CUSTOM_METADATA}"'

🔐 Headers

  • Authorization: Bearer token
  • accept: application/json

🧾 Parameters

  • tenant_id (string, required): Tenant identifier (query parameter)
  • sub_tenant_id (string, optional): Sub-tenant identifier (query parameter)
  • files (List of UploadFile, required): Document files (form data)
  • custom_metadata (string, optional): Metadata string (form data)

Authorizations

Authorization
string
header
required

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

Query Parameters

tenant_id
string
required

Tenant identifier

sub_tenant_id
string

Sub-tenant identifier

Body

multipart/form-data

Response

200 - application/json

Batch upload successful

The response is of type object.

POST
/
upload
/
batch_upload
curl --request POST \
  --url https://api.usecortex.ai/upload/batch_upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'files=[
  "document1.pdf",
  "document2.docx",
  "document3.txt"
]' \
  --form 'custom_metadata=[{"author":"John Doe","department":"Sales"},{"author":"Jane Smith","department":"Marketing"}]'
{
  "message": "Batch upload successful",
  "document_ids": [
    "doc_123",
    "doc_456",
    "doc_789"
  ]
}

Uploads multiple documents in a single request for processing and indexing.

Recommended: For optimal performance, limit each batch to a maximum of 20 sources per request. Send multiple batch requests with an interval of 1 second between each request.

Sample Request

curl --location 'https://api.usecortex.ai/upload/batch_upload?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {API_KEY}' \
--form 'files=@{FILE1}' \
--form 'files=@{FILE2}' \
--form 'files=@{FILE3}' \
--form 'custom_metadata="{CUSTOM_METADATA}"'

🔐 Headers

  • Authorization: Bearer token
  • accept: application/json

🧾 Parameters

  • tenant_id (string, required): Tenant identifier (query parameter)
  • sub_tenant_id (string, optional): Sub-tenant identifier (query parameter)
  • files (List of UploadFile, required): Document files (form data)
  • custom_metadata (string, optional): Metadata string (form data)

Authorizations

Authorization
string
header
required

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

Query Parameters

tenant_id
string
required

Tenant identifier

sub_tenant_id
string

Sub-tenant identifier

Body

multipart/form-data

Response

200 - application/json

Batch upload successful

The response is of type object.