factqlDocs
Get an API key
API · Delete a file

Delete a file

DELETE/clients/{client_id}/workspaces/{workspace_id}/files/{file_id}

Remove a file and the tables built from it. Questions stop seeing that data straight away. This can't be undone.

curl -X DELETE "https://api.factql.ai/clients/$CLIENT_ID/workspaces/$WORKSPACE_ID/files/42" \
  -H "X-API-Key: $FACTQL_API_KEY"
Path
client_idstring · required
Your tenant, from GET /whoami.
workspace_idstring · required
The workspace, from GET /whoami.
file_idinteger · required
The file's id from List files.

Response

200
{ "deleted": "orders_2026.csv", "files_remaining": 0 }

Deleting the last file leaves the workspace empty. Questions then return 422 until you add data again.

Errors
401The key is missing, invalid or revoked.
403The key belongs to a different tenant, or it's the read-only sample key.
404No file with that file_id in this workspace.