> ## Documentation Index
> Fetch the complete documentation index at: https://developers.zite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Delete Records

> Permanently delete up to 100 records in a single request using either table ID or table name.

<Warning>
  This action cannot be undone.
</Warning>

<Note>
  Record IDs that do not exist are skipped rather than causing the request to fail, so `deletedCount` in the response can be lower than the number of IDs you sent.
</Note>

```json theme={null}
{
  "recordIds": [
    "d4b3c2a3-c46b-46a1-a8ec-81b664bb41cb",
    "5f0895cb-8f2b-4a2a-9d15-3f3a3f6f0f1e"
  ]
}
```


## OpenAPI

````yaml api/openapi.json DELETE /bases/{databaseId}/tables/{tableId}/records/bulk
openapi: 3.0.1
info:
  title: Zite DB REST API
  description: >-
    A REST API for managing Zite databases, tables, fields, and records. Build
    database-driven applications with programmatic access to your structured
    data.


    ## What is REST API


    A **REST API** simplifies interaction with your database data, allowing for
    automation and integration. Following RESTful principles, it seamlessly
    connects to retrieve, create, and modify database data.


    ## Getting Started


    ### Authentication

    All API requests require authentication using your Zite API key in the
    Authorization header:

    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    ### Base URL

    https://tables.zite.com/api/v1


    ### Rate Limits

    API requests are rate limited to ensure service quality. Standard rate
    limits apply to all endpoints.


    ### Error Handling

    The API returns standard HTTP status codes and JSON error responses with
    detailed error messages.
  version: 1.0.0
servers:
  - url: https://tables.zite.com/api/v1
    description: Zite DB API
security:
  - bearerAuth: []
tags:
  - name: Databases
    description: Operations for managing databases
  - name: Tables
    description: Operations for managing tables within databases
  - name: Fields
    description: Operations for managing fields within tables
  - name: Records
    description: Operations for managing records within tables
  - name: Webhooks
    description: >-
      Operations for managing webhook subscriptions to receive real-time
      notifications when database events occur
  - name: SQL
    description: Run read-only SQL queries against a database and inspect its SQL schema
paths:
  /bases/{databaseId}/tables/{tableId}/records/bulk:
    delete:
      tags:
        - Records
      summary: Bulk delete records
      description: >-
        Permanently deletes up to 100 records in a single request. Record IDs
        that do not exist are skipped, so `deletedCount` can be lower than the
        number of IDs sent.
      operationId: bulkDeleteRecords
      parameters:
        - name: databaseId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the database
        - name: tableId
          in: path
          required: true
          schema:
            type: string
          description: >-
            The unique identifier of the table. You can also use the table name
            instead of the ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteRecordsRequest'
      responses:
        '200':
          description: Records deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteRecordsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    BulkDeleteRecordsRequest:
      type: object
      properties:
        recordIds:
          type: array
          minItems: 1
          maxItems: 100
          description: The UUIDs of the records to delete.
          items:
            type: string
            format: uuid
      required:
        - recordIds
      example:
        recordIds:
          - d4b3c2a3-c46b-46a1-a8ec-81b664bb41cb
          - 5f0895cb-8f2b-4a2a-9d15-3f3a3f6f0f1e
    BulkDeleteRecordsResponse:
      type: object
      properties:
        success:
          type: boolean
        deletedCount:
          type: number
          description: The number of records that were actually deleted.
      required:
        - success
        - deletedCount
      example:
        success: true
        deletedCount: 2
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
            message:
              type: string
              description: Human-readable error message
          required:
            - code
            - message
      required:
        - error
  responses:
    BadRequest:
      description: Invalid request data or validation failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidRecordId:
              value:
                error:
                  code: INVALID_RECORD_ID
                  message: Record ID is not in valid UUID format
            validationError:
              value:
                error:
                  code: BAD_REQUEST
                  message: Invalid request data or validation failure
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key
    NotFound:
      description: Requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Requested resource does not exist
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Enter your Zite API key. Format: Bearer <api_key>'

````