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

# Delete file

> Remove a file from the source and from search.



## OpenAPI

````yaml delete /brain/sources/{source_id}/files/{file_id}
openapi: 3.0.0
info:
  title: Public API
  version: 1.0.0
servers:
  - url: https://api.gumloop.com/api/v1
security: []
paths:
  /brain/sources/{source_id}/files/{file_id}:
    delete:
      tags:
        - Brain
      summary: Delete file
      description: Remove a file from the source and from search.
      operationId: deleteBrainFile
      parameters:
        - $ref: '#/components/parameters/BrainSourceId'
        - name: file_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: File deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: boolean
                    example: true
        '401':
          description: Unauthorized — missing or invalid Gumloop API credentials.
        '403':
          description: Forbidden — the caller cannot manage this source.
        '404':
          description: Source or file not found.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl -X DELETE
            'https://api.gumloop.com/api/v1/brain/sources/PFqdAMir8PA2Xc6qcszSN9/files/f2bf0108-1650-47cd-a20d-15268a3cc5cc'
            \
              -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
        - lang: python
          label: Python
          source: >
            from gumloop import Gumloop


            client = Gumloop(access_token="YOUR_ACCESS_TOKEN")

            client.brain.delete_file("PFqdAMir8PA2Xc6qcszSN9",
            "f2bf0108-1650-47cd-a20d-15268a3cc5cc")
components:
  parameters:
    BrainSourceId:
      name: source_id
      in: path
      required: true
      schema:
        type: string
      description: The source id.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal API key or an [OAuth 2.0](/api-reference/oauth) access token.
        Personal API keys also require the `x-auth-key` header with your user
        ID.

````