Skip to content

Tables

Bulk delete tables and folders

Archive up to 100 selected tables and folders, including folder contents. Items succeed or fail independently, with `skipped`, `notFound`, and `failed` outcomes. `deletedItems` includes all descendants. Use Restore table or Restore folder to recover archived items. OAuth scope: `api:write`.

POST/api/v2/tables/bulk-delete

Archive up to 100 selected tables and folders, including folder contents. Items succeed or fail independently, with skipped, notFound, and failed outcomes. deletedItems includes all descendants. Use Restore table or Restore folder to recover archived items.

OAuth scope: api:write.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:write

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:write.

Request body

Required

Workspace scope, and the tables and folder paths to delete.

object

Workspace scope, and the tables and folder paths to delete.

3 fields
workspaceIdstringRequired

Workspace that owns every selected item.

minLength
1
maxLength
128
tableIdsarray

Tables to archive, by identifier.

default
[]
maxItems
100
Schema details
Array itemstring
minLength
1
folderPathsarray

Table folders to delete, by canonical path. Each cascades to everything inside it.

maxItems
100
Schema details
Array itemstring

Folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as "New folder" is /New%20folder: everything outside A-Z a-z 0-9 - _ . ~ is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal . or .. segment are rejected. At most 64 segments and 4096 encoded bytes.

maxLength
4096

Additional properties are not allowed.

Request example 1

json
{
  "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
  "tableIds": [
    "tbl_7c9e6679742540de944be07fc1f90ae7"
  ],
  "folderPaths": [
    "/Sales/Archive"
  ]
}

Responses

200

Per-item outcome of the bulk delete.

object

Per-item outcome of a bulk table and folder delete.

1 field
dataobjectRequired

Response data.

5 fields
deletedarrayRequired

Items the batch archived or deleted.

Schema details
Array itemobject
3 fields
kindstringRequired

Which kind of item this entry names.

enum
["table","folder"]
idstringRequired

Table identifier, or the folder path for a folder.

namestringRequired

Table name, or the folder path for a folder.

Additional properties are not allowed.

skippedarrayRequired

Items dropped because a selected folder already carries them.

Schema details
Array itemobject
3 fields
kindstringRequired

Which kind of item this entry names.

enum
["table","folder"]
idstringRequired

Table identifier, or the folder path for a folder.

namestringRequired

Table name, or the folder path for a folder.

Additional properties are not allowed.

notFoundarrayRequired

Entries nothing active resolved to.

Schema details
Array itemobject
2 fields
kindstringRequired

Which kind of item this entry names.

enum
["table","folder"]
idstringRequired

Table identifier, or the folder path for a folder.

Additional properties are not allowed.

failedarrayRequired

Items the batch could not delete.

Schema details
Array itemobject
4 fields
kindstringRequired

Which kind of item this entry names.

enum
["table","folder"]
idstringRequired

Table identifier, or the folder path for a folder.

namestringRequired

Table name, or the folder path for a folder.

reasonstringRequired

Why this item could not be acted on.

Additional properties are not allowed.

deletedItemsobjectRequired

Totals across the explicit archives and every folder cascade they triggered.

2 fields
tablesintegerRequired

Tables archived, including folder cascades.

minimum
-9007199254740991
maximum
9007199254740991
foldersintegerRequired

Folders deleted, including nested folders.

minimum
-9007199254740991
maximum
9007199254740991

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "deleted": [
      {
        "kind": "table",
        "id": "tbl_7c9e6679742540de944be07fc1f90ae7",
        "name": "Leads"
      },
      {
        "kind": "folder",
        "id": "/Sales/Archive",
        "name": "/Sales/Archive"
      }
    ],
    "skipped": [],
    "notFound": [],
    "failed": [],
    "deletedItems": {
      "tables": 1,
      "folders": 1
    }
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit