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 /agents/{agentId}/datasets/user/{userIdentifier}/{filename}

Delete a file for a specific user.


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.


Request
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);
Response
{
"file": "sales_report_q4.csv",
"success": true
}
curl -X DELETE "https://app.inconvo.ai/api/v1/agents/agt_123/datasets/user/user_123/sales_report_q4.csv" \
-H "Authorization: Bearer $INCONVO_API_KEY"
Response
{
"file": "sales_report_q4.csv",
"success": true
}

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

Delete a file shared with users matching a context value.


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.


Request
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);
Response
{
"file": "shared_pricing.csv",
"success": true
}
curl -X DELETE "https://app.inconvo.ai/api/v1/agents/agt_123/datasets/context/organisationId/1/shared_pricing.csv" \
-H "Authorization: Bearer $INCONVO_API_KEY"
Response
{
"file": "shared_pricing.csv",
"success": true
}