> ## 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 Multiple Objects

> Deletes up to 1000 objects from a bucket for the authenticated caller. Object row deletion is authorized through storage RLS, and the response reports per-key outcomes for rows deleted from the database, keys not visible or missing, and provider-level failures.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/storage.yaml delete /api/storage/buckets/{bucketName}/objects
openapi: 3.0.3
info:
  title: Insforge Storage API
  version: 2.0.0
  description: Bucket-based storage system similar to S3
servers: []
security: []
paths:
  /api/storage/buckets/{bucketName}/objects:
    delete:
      tags:
        - Client
      summary: Delete Multiple Objects
      description: >-
        Deletes up to 1000 objects from a bucket for the authenticated caller.
        Object row deletion is authorized through storage RLS, and the response
        reports per-key outcomes for rows deleted from the database, keys not
        visible or missing, and provider-level failures.
      parameters:
        - name: bucketName
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9_-]+$
          example: avatars
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - keys
              properties:
                keys:
                  type: array
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: string
                    minLength: 1
            example:
              keys:
                - users/user123.jpg
                - users/user456.png
      responses:
        '200':
          description: Batch delete result
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      required:
                        - key
                        - status
                      properties:
                        key:
                          type: string
                        status:
                          type: string
                          enum:
                            - deleted
                            - notFound
                            - failed
                        message:
                          type: string
                          description: Present when status is failed.
              example:
                results:
                  - key: users/user123.jpg
                    status: deleted
                  - key: users/missing.png
                    status: notFound
                  - key: users/locked.png
                    status: failed
                    message: Failed to delete object
        '400':
          description: Invalid bucket name or object keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
          example: VALIDATION_ERROR
        message:
          type: string
          description: Human-readable error message
          example: Invalid request
        statusCode:
          type: integer
          description: HTTP status code
          example: 400
        nextActions:
          type: string
          description: Suggested action to resolve the error
          example: Check your request parameters
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````