Skip to content

Delete Dataset File

Delete a file from the dataset for a specific user or context scope.

Datasets can be scoped in two ways:

  • User-scoped: Files accessible only to a specific user (identified by userIdentifier)
  • Context-scoped: Files shared with all users matching a context value (e.g., all users in orgId=123)

DELETE /datasets/user/{userIdentifier}/{filename}

Delete a file for a specific user.


userIdentifier string Required

The unique identifier for the end-user.
Examples: user_123, john.doe@example.com

filename string Required

The name of the file to delete. This should be the exact filename as returned from the list or upload endpoints.


Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({
apiKey: process.env.INCONVO_API_KEY
});
const result = await inconvo.datasets.user.delete({
userIdentifier: "user_123",
filename: "sales_report_q4.csv"
});
console.log(result);
Response
{
"file": "sales_report_q4.csv",
"success": true
}
curl -X DELETE "https://app.inconvo.ai/api/v1/datasets/user/user_123/sales_report_q4.csv" \
-H "Authorization: Bearer $INCONVO_API_KEY"
Response
{
"file": "sales_report_q4.csv",
"success": true
}

DELETE /datasets/context/{contextKey}/{contextValue}/{filename}

Delete a file shared with users matching a context value.


contextKey string Required

The context key used for scoping (e.g., orgId, teamId).

contextValue string Required

The context value to match (e.g., org_456, team_789).

filename string Required

The name of the file to delete. This should be the exact filename as returned from the list or upload endpoints.


Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({
apiKey: process.env.INCONVO_API_KEY
});
const result = await inconvo.datasets.context.delete({
contextKey: "orgId",
contextValue: "org_456",
filename: "shared_pricing.csv"
});
console.log(result);
Response
{
"file": "shared_pricing.csv",
"success": true
}
curl -X DELETE "https://app.inconvo.ai/api/v1/datasets/context/orgId/org_456/shared_pricing.csv" \
-H "Authorization: Bearer $INCONVO_API_KEY"
Response
{
"file": "shared_pricing.csv",
"success": true
}