Skip to main content

Bulk Delete Records

PATCH

https://app.smartsuite.com/api/v1/applications/[tableId]/records/bulk_delete/?fields=id

Deletes multiple records. Your request body should include an array (items) of up to 25 record ids as strings.

Notice

Including more than 25 records will result in the server returning a 422 error.

Example Request
curl -X PATCH https://app.smartsuite.com/api/v1/applications/6451093119bcf22befaed847/records/bulk_delete/?fields=id \
-H "Authorization: Token YOUR_API_KEY" \
-H "ACCOUNT-ID: WORKSPACE_ID" \
-H "Content-Type: application/json" \
--data '{
"items": [
"6418b7a1f2f4056dd0279a54",
"6418b7a2fe6b4a731195c245",
"6418b7a2db77680b279fd3f8"
]
}'

Path Parameters​

ParamTypeDescription
tableIdstringThe Id of the Table (App) that contains the record.

Request Body​

ParamTypeOptionalDescription
itemsArray of stringsNoAn array of strings containing the Ids of the records to delete. Send bare Id strings, not objects such as {"id": "..."}.
caution

If items holds objects such as [{"id": "..."}], the request returns 200 OK but deletes nothing. There is no DELETE route for bulk deletes: DELETE .../records/bulk/ returns 405.

Query Parameters​

ParamTypeOptionalDescription
fieldsstringYesLimits which fields each returned record includes. The example uses ?fields=id. Without it, each item in the response is the full deleted record object.

Response​

200 Response - Example

[
{
"application_id": "65f194001c0091a8180f8b2b",
"id": "66be7b5fb8b730607ea959f4",
"application_slug": "sbwchxhv",
"deleted_date": {
"date": "2024-08-15T22:11:57.259000Z",
"include_time": true
}
},
{
"application_id": "65f194001c0091a8180f8b2b",
"id": "66be7b5fb8b730607ea959f5",
"application_slug": "sbwchxhv",
"deleted_date": {
"date": "2024-08-15T22:11:57.259000Z",
"include_time": true
}
},
{
"application_id": "65f194001c0091a8180f8b2b",
"id": "66be7b5fb8b730607ea959f6",
"application_slug": "sbwchxhv",
"deleted_date": {
"date": "2024-08-15T22:11:57.259000Z",
"include_time": true
}
}
]