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 /agents/{agentId}/datasets/user/{userIdentifier}/{filename}
Delete a file for a specific user.
Path Parameters
Section titled “Path Parameters”agentId string Required
The agent id
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.agents.datasets.user.delete( "sales_report_q4.csv", { agentId: "agt_123", userIdentifier: "user_123" });
console.log(result);{ "file": "sales_report_q4.csv", "success": true}Context-Scoped Delete
Section titled “Context-Scoped Delete”DELETE /agents/{agentId}/datasets/context/{contextKey}/{contextValue}/{filename}
Delete a file shared with users matching a context value.
Path Parameters
Section titled “Path Parameters”agentId string Required
The agent id
contextKey string Required
The context key used for scoping (e.g., organisationId, teamId).
contextValue string | number Required
The context value to match (e.g., 1, 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.agents.datasets.context.delete( "shared_pricing.csv", { agentId: "agt_123", contextKey: "organisationId", contextValue: 1 });
console.log(result);{ "file": "shared_pricing.csv", "success": true}