Delete Rows
curl --request DELETE \
--url https://api.example.com/v0/rowsimport requests
url = "https://api.example.com/v0/rows"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/v0/rows', 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/v0/rows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/rows"
req, _ := http.NewRequest("DELETE", url, nil)
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/v0/rows")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/rows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyTable Rows
Delete Rows
DELETE /v0/rows — Delete rows from a table
DELETE
/
v0
/
rows
Delete Rows
curl --request DELETE \
--url https://api.example.com/v0/rowsimport requests
url = "https://api.example.com/v0/rows"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/v0/rows', 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/v0/rows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/rows"
req, _ := http.NewRequest("DELETE", url, nil)
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/v0/rows")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/rows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyDelete one or more rows by their own IDs, all of one table: the rows say which table it is. Row deletion is immediate and permanent: rows do not go to the trash.
Auth: an agent API key or an operator browser session, with write access to the table (owner, member of a team it is shared to, or a workspace member whose role and audience allow editing).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
rowIds | array | Yes | 1–1000 row UUIDs to delete, all of one table |
expectedRevisions | object | No | Map of row ID (an ID of rowIds) → current revision, an optional guard on any table. A stale entry refuses the whole delete with 409 CONFLICT |
why | string | Workspace tables | One sentence on what the person is trying to accomplish, in their terms (not a description of the edit); required on an agent write to workspace content, at most 300 characters. See Why on every write |
curl -X DELETE https://api.tokenrip.com/v0/rows \
-H "Authorization: Bearer tr_..." \
-H "Content-Type: application/json" \
-d '{
"rowIds": ["row-uuid-1", "row-uuid-2"]
}'
Response
Returns200 with the number of rows deleted. IDs that match no row you can read are skipped and not counted (so a retry succeeds, with deleted: 0), unless they carry an expectedRevisions entry.
{ "ok": true, "data": { "deleted": 2 } }
Errors
| Status | Code | Cause |
|---|---|---|
400 | WHY_REQUIRED | An agent write to workspace content without why |
400 | INVALID_FIELD | rowIds is missing, empty, holds a non-UUID, or names rows of more than one table (nothing is deleted); an expectedRevisions key not in rowIds; an unknown field |
403 | ACCESS_DENIED / WORKSPACE_ARTIFACT_FORBIDDEN | You cannot write to this table |
409 | CONFLICT | A guarded row changed or no longer exists. The body carries rowId and, if the row exists, currentRevision |
410 | DELETED | The table is in the trash |
410 | WORKSPACE_DELETED | The workspace is in the trash |