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)
User-Scoped Delete
Section titled “User-Scoped Delete”DELETE /datasets/user/{userIdentifier}/{filename}
Delete a file for a specific user.
Path Parameters
Section titled “Path Parameters”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.
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);{ "file": "sales_report_q4.csv", "success": true}Context-Scoped Delete
Section titled “Context-Scoped Delete”DELETE /datasets/context/{contextKey}/{contextValue}/{filename}
Delete a file shared with users matching a context value.
Path Parameters
Section titled “Path Parameters”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.
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);{ "file": "shared_pricing.csv", "success": true}