Batch Delete Files From Index
curl --request DELETE \
--url https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"file_ids": [
"<string>"
]
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files"
payload = { "file_ids": ["<string>"] }
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-api-key': '<api-key>',
'x-selected-account-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({file_ids: ['<string>']})
};
fetch('https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'file_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files"
payload := strings.NewReader("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"operation": "parse",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"object": "job",
"source_id": "<string>",
"correlation_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"result": {},
"progress": {
"total": 123,
"succeeded": 123,
"failed": 123,
"cancelled": 123,
"pending": 123,
"child_jobs": [
{
"source_document_id": "<string>",
"job_id": "<string>",
"status": "pending",
"parse_result_id": "<string>",
"error": "<string>"
}
]
},
"error": "<string>",
"history": [
{
"step": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"status": "<string>",
"details": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Indexes
Batch Delete Files From Index
Delete a batch of files from an existing index. Async via Temporal.
DELETE
/
v1
/
projects
/
{project_id}
/
indexes
/
{index_id}
/
files
Batch Delete Files From Index
curl --request DELETE \
--url https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"file_ids": [
"<string>"
]
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files"
payload = { "file_ids": ["<string>"] }
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-api-key': '<api-key>',
'x-selected-account-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({file_ids: ['<string>']})
};
fetch('https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'file_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files"
payload := strings.NewReader("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/indexes/{index_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"operation": "parse",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"object": "job",
"source_id": "<string>",
"correlation_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"result": {},
"progress": {
"total": 123,
"succeeded": 123,
"failed": 123,
"cancelled": 123,
"pending": 123,
"child_jobs": [
{
"source_document_id": "<string>",
"job_id": "<string>",
"status": "pending",
"parse_result_id": "<string>",
"error": "<string>"
}
]
},
"error": "<string>",
"history": [
{
"step": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"status": "<string>",
"details": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key for authentication
Selected Account ID
Body
application/json
Request body for DELETE /indexes/{index_id}/files.
Required array length:
1 - 1000 elementsResponse
Successful Response
Job response model representing an asynchronous operation.
ID of the entity
ID of the project
Operation type (e.g., 'parse')
Available options:
parse, batch_parse, extract, research, vector_store, chunk, summarization, create_index, update_index Current job status
Available options:
pending, running, succeeded, partially_succeeded, failed, cancelled When the job was created
Allowed value:
"job"Source document/file ID
Request correlation ID for tracing
When the job started processing
When the job completed
Job result payload when completed
Live progress payload (used by batch jobs)
Show child attributes
Show child attributes
Error message if job failed
Timeline of job execution events
Show child attributes
Show child attributes

