Skip to content

Delete Dataset File

Delete a single file from the dataset by filename.

DELETE /datasets/:filename


filename string Required

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



userContext[<key>] string | number Required

User context parameters that must match the context used when the file was uploaded. Files can only be deleted by providing the exact same context parameters.
For example: ?userContext[userId]=123 will delete the file only if it belongs to that specific user.


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