Skip to main content
POST
Bulk delete table rows

Authorizations

X-API-Key
string
header
required

Path Parameters

table_id
string<uuid>
required

Query Parameters

dry_run
boolean
default:false

Answer exactly as the real call would, changing nothing.

Body

application/json

Request body for the bulk row delete: two scopes, one body.

Send record_ids to delete a checkbox selection. Send all: true to delete every row the current listing matches, optionally narrowed by where/row_status, exactly the predicate vocabulary of the rows query, so "delete everything matching my filters" and "show me everything matching my filters" can never disagree about what matches. The explicit flag exists so an accidentally empty body deletes nothing.

all
boolean
default:false

Delete every matching row rather than a named set. Required (and only honoured) when record_ids is absent.

duplicates
boolean
default:false

Under a where that keeps one row per value (unique_by, or its within's), delete the duplicates it hides instead of the rows it keeps: every other row the where's other conditions let through whose value in that column a selected row holds. The selected rows stay, so the view shows the same rows afterwards: with all, every row the where keeps less except_record_ids; with record_ids, those of them the where still shows, and none of the rows named is deleted (they then take where too). A row blank in the column is never a duplicate. The answer says how many rows stay (kept_count). Takes no row_status.

except_record_ids
string<uuid>[] | null

Leave these rows out of a selection of every matching row: the rows unticked after Select all. At most 1000.

Required array length: 1 - 1000 elements
keep
enum<string>
default:first

With duplicates: which copy of each value stays. first is the row the view shows; newest the copy changed last (its newest cell edit, else when it was added); most_complete the copy with the most filled cells. Ties go to the first in the table. A copy other than the one shown stays where it is, and the shown row goes with the rest. With record_ids the rows named stay whatever it says.

Available options:
first,
newest,
most_complete
merge
boolean
default:false

With duplicates: before the copies go, fill each kept copy's blank cells in manual columns from them, in the order keep ranks them. Computed columns are left to their runs.

record_ids
string<uuid>[] | null

Record IDs of the rows to delete.

Required array length: 1 - 1000 elements
row_status
enum<string> | null

Narrow an all delete to errored or fully computed rows.

Available options:
errored,
fully_computed
where
TableRowsWhereSchema · object | null

Narrow an all delete to rows matching this predicate tree.

Response

Successful Response

Result of a bulk row delete; missing record IDs are simply absent.

A predicate (all: true) delete reports only the count. Echoing ten thousand UUIDs would say nothing the count does not.

detail
string
required

The detail of why the resource was deleted.

count
integer
default:1

The number of resources that were deleted.

deleted_record_ids
string<uuid>[]

The rows deleted, for a delete by record_ids. Empty for an all delete, which reports only the count, and for a duplicates delete.

kept_count
integer | null

For a duplicates delete: the rows that stay, one per value and every row blank in the column. Null for any other delete.

merged_cells
integer
default:0

For a duplicates delete with merge: the blank cells filled from copies.

paid_credits
number
default:0

For a delete by record_ids: what that data cost when it was bought, in credits.

rows_with_paid_data
integer
default:0

For a delete by record_ids: how many of the rows hold data paid for with credits (an enrichment or agent cell). It is deleted with them. 0 on any other kind.

sample
DuplicateGroupSchema · object[]

For a duplicates delete: the first few values with copies, and what happened to each, for a confirm to show before the delete.

swapped_count
integer
default:0

For a duplicates delete: the values whose copy that stays is not the row the view showed, under keep.