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

# Delete files

> Deletes one or more files by their IDs.



## OpenAPI

````yaml /api/files/openapi.yaml delete /files/delete
openapi: 3.1.0
info:
  title: Unified CDN API | Files
  description: Interact with files on the Unified CDN system.
  version: 0.1.0
servers:
  - url: https://{Unified_CDN_domain}/api
    description: Production server where your Unified CDN is hosted.
    variables:
      Unified_CDN_domain:
        default: api.example.com
        description: >-
          The domain where your Unified CDN is hosted. Change this to your
          custom domain if you have one.
security: []
paths:
  /files/delete:
    delete:
      summary: Delete files
      description: Deletes one or more files by their IDs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - files
              properties:
                files:
                  type: array
                  minItems: 1
                  description: Array of file IDs to be deleted.
                  items:
                    type: string
      responses:
        '200':
          description: Successfully deleted the file(s).
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: array
                    description: The list of successfully deleted file IDs.
                    items:
                      type: string
                  failed:
                    type: array
                    description: >-
                      The list of file IDs that failed to delete, along with the
                      reasons.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        reason:
                          type: string
        '400':
          description: Bad request due to invalid configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                timezone_not_set:
                  value:
                    error: InvalidConfigurationError
                    message: The site's timezone is not set.
                provider_failed:
                  value:
                    error: InvalidConfigurationError
                    message: >-
                      Could not connect to database provider. Please check your
                      database key configurations.
                provider_unsupported:
                  value:
                    error: InvalidConfigurationError
                    message: The configured database provider is not supported.
        '401':
          $ref: '#/components/responses/UnauthorisedError'
      security:
        - ApiKeyAuth: []
        - CodeAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        error:
          type: string
        message:
          type: string
  responses:
    UnauthorisedError:
      description: The request lacks valid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorised:
              value:
                error: UnauthorisedError
                message: You are unauthorised to perform this action.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Enter your API key using the format `Bearer <your-api-key>`.
    CodeAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Enter your code using the format `Code <your-code>`.

````

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