> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.eyelevel.ai/reference/api-reference/documents/delete/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eyelevel.ai/_mcp/server. # delete (multiple) DELETE https://api.groundx.ai/api/v1/ingest/documents Delete multiple documents hosted on GroundX Reference: https://docs.eyelevel.ai/reference/api-reference/documents/delete ## Authentication - `X-API-Key` header (required) — API Key authentication via header ## Request ### Query parameters - `documentIds` (list of string, required) — A list of documentIds which correspond to documents ingested by GroundX ## Response ### 200 Documents are queued to be deleted - `ingest` (IngestStatus, required) ## Errors ### 400 Bad Request Error Invalid document ID - `any` ### 401 Unauthorized Error Unauthorized to delete document with given ID - `any` ## Types ### IngestStatus - `processId` (string, required) - `status` (enum, required) - Allowed values: `queued`, `training`, `generating`, `processing`, `error`, `complete`, `cancelled`, `active`, `inactive` - `id` (integer, optional) - `progress` (IngestStatusProgress, optional) - `statusMessage` (string, optional) ### IngestStatusProgress - `cancelled` (IngestStatusProgressCancelled, optional) - `complete` (IngestStatusProgressComplete, optional) - `errors` (IngestStatusProgressErrors, optional) - `processing` (IngestStatusProgressProcessing, optional) - `queued` (IngestStatusProgressQueued, optional) ### IngestStatusProgressCancelled - `documents` (list of DocumentDetail, optional) - `total` (integer, optional) ### IngestStatusProgressComplete - `documents` (list of DocumentDetail, optional) - `total` (integer, optional) ### IngestStatusProgressErrors - `documents` (list of DocumentDetail, optional) - `total` (integer, optional) ### IngestStatusProgressProcessing - `documents` (list of DocumentDetail, optional) - `total` (integer, optional) ### IngestStatusProgressQueued - `documents` (list of DocumentDetail, optional) - `total` (integer, optional) ### DocumentDetail - `documentId` (string, required) — Unique system generated ID for the document - `bucketId` (integer, optional) - `created` (string, optional) — Document creation time in RFC 3339 format, when available. - `deliveryStatus` (enum, optional) — Current-run required customer delivery confirmation. Failed confirmation does not prove nonreceipt; unknown means saved evidence is insufficient. - Allowed values: `not_configured`, `pending`, `succeeded`, `failed`, `unknown` - `extractionProvenance` (ExtractionProvenance, optional) — Workflow and runtime builds associated with the document's current extraction result. - `extractionReady` (boolean, optional, nullable) — Whether the current run's final extraction is published after required review and transformations. Null means saved evidence is insufficient. - `fileName` (string, optional) - `fileSize` (string, optional) — The file size of the file stored in GroundX - `fileType` (enum, optional) — The type of document (one of the currently supported file types) - Allowed values: `bmp`, `csv`, `docx`, `gif`, `heif`, `hwp`, `ico`, `jpg`, `json`, `pdf`, `png`, `pptx`, `svg`, `tiff`, `tsv`, `txt`, `xlsx`, `webp` - `filter` (DocumentDetailFilter, optional) — A dictionary of key-value pairs that can be used to pre-filter documents prior to a search. - `processId` (string, optional) — Unique system generated ID for the ingest request - `processLevel` (enum, optional) — The amount of processing of document chunks to perform. 'none' specifies the document to go through only text extraction and chunking. Documents uploaded with 'full' go through text extraction, chunking, and an agentic process that creates robust metadata for each chunk. (default 'full'). - Allowed values: `none`, `full` - `searchData` (DocumentDetailSearchData, optional) - `sourceUrl` (string, optional) — Source document URL - `hostedSourceUrl` (string, optional) — GroundX-hosted stored source URL, when available. Returned by document detail only; access still requires normal document authorization. - `status` (enum, optional) - Allowed values: `queued`, `training`, `generating`, `processing`, `error`, `complete`, `cancelled`, `active`, `inactive` - `statusMessage` (string, optional) - `textUrl` (string, optional) — Extracted text URL, if using the extract agent - `xrayUrl` (string, optional) — Document X-Ray results ### ExtractionProvenance Workflow and runtime builds associated with the document's current extraction result. - `artifactRevision` (string, optional) — Revision of the complete deployed workflow artifact, including prompts. - `runtimeBuildIds` (list of string, optional) — Unique extraction container build IDs observed while producing the current result. Each ID maps to one immutable image digest. - `schemaHash` (string, optional) — Hash of the workflow output schema and routing metadata. - `workflowId` (string, optional) — Unique system generated ID for the extraction workflow. - `workflowVersion` (string, optional) — Exact workflow version selected when extraction was dispatched. ### DocumentDetailFilter A dictionary of key-value pairs that can be used to pre-filter documents prior to a search. ### DocumentDetailSearchData ## Examples **Response** ```json { "ingest": { "processId": "uuid", "status": "queued" } } ``` **SDK Code** ```python from groundx import GroundX client = GroundX(api_key="YOUR_API_KEY") client.documents.delete( document_ids=[ "123e4567-e89b-12d3-a456-426614174000", "9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49", ] ) ``` ```typescript import { GroundXClient } from "groundx"; const client = new GroundXClient({ apiKey: "YOUR_API_KEY" }); await client.documents.delete( { documentIds: [ "123e4567-e89b-12d3-a456-426614174000", "9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49", ] } ); ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.groundx.ai/api/v1/ingest/documents?documentIds=123e4567-e89b-12d3-a456-426614174000%2C9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("X-API-Key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.groundx.ai/api/v1/ingest/documents?documentIds=123e4567-e89b-12d3-a456-426614174000%2C9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["X-API-Key"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://api.groundx.ai/api/v1/ingest/documents?documentIds=123e4567-e89b-12d3-a456-426614174000%2C9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49") .header("X-API-Key", "") .asString(); ``` ```php request('DELETE', 'https://api.groundx.ai/api/v1/ingest/documents?documentIds=123e4567-e89b-12d3-a456-426614174000%2C9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49', [ 'headers' => [ 'X-API-Key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.groundx.ai/api/v1/ingest/documents?documentIds=123e4567-e89b-12d3-a456-426614174000%2C9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49"); var request = new RestRequest(Method.DELETE); request.AddHeader("X-API-Key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-API-Key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.groundx.ai/api/v1/ingest/documents?documentIds=123e4567-e89b-12d3-a456-426614174000%2C9f7c11a6-24b8-4d52-a9f3-90a7e70a9e49")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```