curl --request POST \
--url https://api.withsplendor.com/v1/records/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"dataset_id": "<string>",
"record_ids": [
"<string>"
],
"reason": "<string>"
}
'import requests
url = "https://api.withsplendor.com/v1/records/delete"
payload = {
"dataset_id": "<string>",
"record_ids": ["<string>"],
"reason": "<string>"
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({dataset_id: '<string>', record_ids: ['<string>'], reason: '<string>'})
};
fetch('https://api.withsplendor.com/v1/records/delete', 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.withsplendor.com/v1/records/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_id' => '<string>',
'record_ids' => [
'<string>'
],
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$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.withsplendor.com/v1/records/delete"
payload := strings.NewReader("{\n \"dataset_id\": \"<string>\",\n \"record_ids\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.withsplendor.com/v1/records/delete")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"<string>\",\n \"record_ids\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/records/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_id\": \"<string>\",\n \"record_ids\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"completed_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"error_message": null,
"item_failed_count": 0,
"item_pending_count": 0,
"item_running_count": 0,
"item_succeeded_count": 1,
"item_total_count": 1,
"items": [
{
"attempt_count": 1,
"completed_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"error_message": null,
"item_id": 1,
"item_type": "object_document",
"next_attempt_at": null,
"result": {
"deleted_documents": 1240000
},
"started_at": "2026-01-15T09:30:00Z",
"status": "succeeded",
"target": {
"dataset_id": "app-logs"
},
"updated_at": "2026-01-15T09:30:00Z"
}
],
"job_id": "ddl_01H8Z3",
"requested_by": "user_01H8Z3",
"scope": "dataset",
"started_at": "2026-01-15T09:30:00Z",
"status": "succeeded",
"target_dataset_id": "app-logs",
"target_source_id": null,
"target_upload_session_id": null,
"tenant_id": "acme",
"updated_at": "2026-01-15T09:30:00Z"
}{
"detail": "Dataset not found"
}{
"detail": "Dataset not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Delete records
Deletes a specific set of records (by record_id) from a dataset and enqueues a managed data-deletion job that purges their indexed and semantic data. The delete is durable: the records are tombstoned so a later reindex cannot bring them back. Up to 1024 record_ids per request. Returns the deletion job so you can track it to completion. Requires an admin role.
curl --request POST \
--url https://api.withsplendor.com/v1/records/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"dataset_id": "<string>",
"record_ids": [
"<string>"
],
"reason": "<string>"
}
'import requests
url = "https://api.withsplendor.com/v1/records/delete"
payload = {
"dataset_id": "<string>",
"record_ids": ["<string>"],
"reason": "<string>"
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({dataset_id: '<string>', record_ids: ['<string>'], reason: '<string>'})
};
fetch('https://api.withsplendor.com/v1/records/delete', 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.withsplendor.com/v1/records/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_id' => '<string>',
'record_ids' => [
'<string>'
],
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$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.withsplendor.com/v1/records/delete"
payload := strings.NewReader("{\n \"dataset_id\": \"<string>\",\n \"record_ids\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.withsplendor.com/v1/records/delete")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"<string>\",\n \"record_ids\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/records/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_id\": \"<string>\",\n \"record_ids\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"completed_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"error_message": null,
"item_failed_count": 0,
"item_pending_count": 0,
"item_running_count": 0,
"item_succeeded_count": 1,
"item_total_count": 1,
"items": [
{
"attempt_count": 1,
"completed_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"error_message": null,
"item_id": 1,
"item_type": "object_document",
"next_attempt_at": null,
"result": {
"deleted_documents": 1240000
},
"started_at": "2026-01-15T09:30:00Z",
"status": "succeeded",
"target": {
"dataset_id": "app-logs"
},
"updated_at": "2026-01-15T09:30:00Z"
}
],
"job_id": "ddl_01H8Z3",
"requested_by": "user_01H8Z3",
"scope": "dataset",
"started_at": "2026-01-15T09:30:00Z",
"status": "succeeded",
"target_dataset_id": "app-logs",
"target_source_id": null,
"target_upload_session_id": null,
"tenant_id": "acme",
"updated_at": "2026-01-15T09:30:00Z"
}{
"detail": "Dataset not found"
}{
"detail": "Dataset not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
API token issued from the Splendor console.
Headers
Selects the tenant (workspace) the request acts within.
Body
Delete a specific set of records (by record_id) from a dataset.
Capped at 1024 record_ids per request: the deletion worker issues one delete-by-query for the whole set (it does not chunk), so an unbounded set would produce an oversized query. Send larger deletes in batches.
Response
Successful Response
Show child attributes
Show child attributes
hosted_upload, source, dataset, object, record, tenant pending, running, succeeded, failed