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

# Delete multiple CDN files

> Deletes up to 30 files in one request. Each file is handled independently: the response lists which files were deleted and which failed, so one missing file does not stop the rest. A large upload that has not been finalized yet is discarded and its reserved quota released, like a single delete. To delete a whole folder instead, use `DELETE /cdn/folder`.




## OpenAPI

````yaml /cdn/openapi.json post /cdn/files/delete
openapi: 3.0.3
info:
  title: Shard Cloud CDN API
  version: 1.0.0
servers:
  - url: https://shardcloud.app/api
security:
  - BearerAuth: []
paths:
  /cdn/files/delete:
    post:
      tags:
        - CDN
      summary: Delete multiple CDN files
      description: >
        Deletes up to 30 files in one request. Each file is handled
        independently: the response lists which files were deleted and which
        failed, so one missing file does not stop the rest. A large upload that
        has not been finalized yet is discarded and its reserved quota released,
        like a single delete. To delete a whole folder instead, use `DELETE
        /cdn/folder`.
      operationId: deleteFiles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteFilesRequest'
      responses:
        '200':
          description: Result per file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFilesResponse'
              example:
                deleted:
                  - avatars/logo.png
                failed:
                  - filename: notes.txt
                    error: file not found
        '400':
          description: >-
            Invalid body, no filenames, more than 30 filenames, or an invalid
            file path (nothing is deleted)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
components:
  schemas:
    DeleteFilesRequest:
      type: object
      required:
        - filenames
      properties:
        filenames:
          type: array
          minItems: 1
          maxItems: 30
          items:
            type: string
          description: >-
            Full file paths to delete (e.g. `folder/file.png` or `file.png`),
            1–30 per request. Repeated names are only processed once.
          example:
            - avatars/logo.png
            - notes.txt
    DeleteFilesResponse:
      type: object
      properties:
        deleted:
          type: array
          items:
            type: string
          description: Files that were deleted.
        failed:
          type: array
          description: >-
            Files that could not be deleted (for example because they do not
            exist). The other files are still deleted.
          items:
            type: object
            properties:
              filename:
                type: string
              error:
                type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.