Skip to main content
POST
Delete Entities By Filter

Authentication and permissions

Token requirements: User-based token (OAuth) or Organization-scoped API key or Workspace-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
Permissions joined by + are all required; or separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Workspace keys must allow every workspace checked by the request. OAuth access depends on the user’s roles and resource access.
  • Delete matching records in a workspace’s database: Owner-only: the permission is checked on the table’s owning workspace. Worker tokens are refused. The background job re-checks the API key or user’s DELETE_ENTITY permission before every batch and stops if it was revoked.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamId
string
required

The ID of the workspace that owns the table.

entityTypeId
string
required
filterGroups
EntityFilterGroup · object[]
required

The same filter groups SearchEntities takes. At least one filter is required; a request without one is refused with INVALID_ARGUMENT.

expectedCount

Omit to only count the matching records. Set it to the matched_count of a previous call to start the delete; if the count has changed since, the call fails with FAILED_PRECONDITION and nothing is deleted.

Response

200 - application/json

Success

matchedCount
jobId
string | null

Set when the delete started. Poll GetEntityDeletionJob with it.