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

# Delete Records

> Delete records matching query filters



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/records.yaml delete /api/database/records/{tableName}
openapi: 3.0.3
info:
  title: Insforge Records API
  version: 2.0.0
  description: PostgREST-style database record operations
servers: []
security:
  - bearerAuth: []
  - apiKey: []
paths:
  /api/database/records/{tableName}:
    delete:
      tags:
        - Client
      summary: Delete Records
      description: Delete records matching query filters
      parameters:
        - name: tableName
          in: path
          required: true
          schema:
            type: string
          description: Name of the table
          example: posts
        - name: id
          in: query
          schema:
            type: string
          description: >-
            Filter records by ID (e.g.,
            "?id=eq.123e4567-e89b-12d3-a456-426614174000")
          example: eq.123e4567-e89b-12d3-a456-426614174000
        - name: Prefer
          in: header
          schema:
            type: string
            enum:
              - return=representation
          description: Include to return deleted records in response
      responses:
        '200':
          description: Records deleted (with Prefer header)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
              examples:
                records_deleted:
                  summary: Records were deleted
                  value:
                    - id: 123e4567-e89b-12d3-a456-426614174000
                      title: Deleted Post
                      createdAt: '2025-01-01T00:00:00Z'
                      updatedAt: '2025-01-21T11:00:00Z'
                no_records:
                  summary: No records found to delete
                  value: []
        '204':
          description: Records deleted (without Prefer header)
      security:
        - bearerAuth: []
        - apiKey: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````