Skip to content
Browse all functions

RAG – Delete Documents by Filter

rag/deletedocuments

deletedocuments (RAG – Delete Documents by Filter) is a 1001fx API function in the group Knowledge bases (RAG): POST https://api.1001fx.com/rag/deletedocuments, 0 credits per call. It works as a ready-made module in Make or as a plain HTTP call.

0 credits per callHTTP APIMake

Removes every document of a knowledge base whose metadata match the filter, e.g. all documents of a Drive folder. Needs a filter and confirm true; dryRun only counts. At most 1,000 per call – call again while remaining is above 0. Free.

Endpoint

POSThttps://api.1001fx.com/rag/deletedocuments
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json

Parameters

  • knowledgeBasestringrequired

    Name or ID of the knowledge base, e.g. "Support FAQ" or support-faq (same knowledge base). rag/adddocument creates it if it does not exist.

    Example:
    Support FAQ
  • filteranyoptional

    Only documents whose metadata match. Object {"department": "billing", "lastModified": {"$gte": "2026-01-01"}} (operators $eq $ne $in $nin $gt $gte $lt $lte $exists $contains, $and $or $not) or array [{"key", "operator", "value", "type"}] (all must match).

  • filterJsonstringoptional

    The filter as JSON text, e.g. for OR conditions from Make: {"$or": [{"department": "billing"}, {"department": "sales"}]}.

  • confirmbooleanoptional

    Must be true to delete.

    Default:
    false
  • dryRunbooleanoptional

    Only count and list the matching documents.

    Default:
    false

Examples

RAG – Delete Documents by Filter

Needs an API key of an account (not a test key).

Input

Expects a json body
{
  "knowledgeBase": "Support FAQ",
  "filter": {
    "driveFolder": "abc"
  },
  "dryRun": true
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/rag/deletedocuments' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"knowledgeBase":"Support FAQ","filter":{"driveFolder":"abc"},"dryRun":true}'

Try deletedocuments now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.002.11.2026created