Skip to main content
DELETE
/
upload
/
delete_source
Delete Memory
curl --request DELETE \
  --url https://api.usecortex.ai/upload/delete_source \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "tenant_id": "tenant_1234",
  "source_ids": [
    "CortexDoc1234",
    "CortexDoc4567"
  ],
  "sub_tenant_id": "sub_tenant_4567"
}'
"<any>"
Hit the Try it button to try this API now in our playground. It’s the best way to check the full request and response in one place, customize your parameters, and generate ready-to-use code snippets.

Sample Request

curl --request DELETE \
  --url https://api.usecortex.ai/upload/delete_source \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "sub_tenant_id": ""
}'

Error Responses

All endpoints return consistent error responses following the standard format. For detailed error information, see our Error Responses documentation.

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body containing the source IDs to delete and tenant information

tenant_id
string
required

Unique identifier for the tenant/organization

Example:

"tenant_1234"

source_ids
string[]
required

List of source IDs to delete

Example:
["CortexDoc1234", "CortexDoc4567"]
sub_tenant_id
string
default:""

Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.

Example:

"sub_tenant_4567"

Response

Successful Response

The response is of type any.

I