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

# Delete Knowledge Base File

> Removes a file from the knowledge base of the published version of the Pearl. The other files are kept.

If a new version of the Pearl was already being edited on the platform before this call, that version still has the old file list, and publishing it brings the deleted file back. To avoid this, delete files before you start editing the Pearl on the platform, or delete them again once the new version is published.



## OpenAPI

````yaml delete /v2/Pearl/{pearlId}/KnowledgeBase/{fileId}
openapi: 3.0.1
info:
  title: NLPearl Client API
  description: A sample API that demonstrates features in the OpenAPI specification
  version: v2
servers:
  - url: https://api.nlpearl.ai
    description: Production Environement
security:
  - bearer_auth: []
  - oauth2_client_credentials: []
tags:
  - name: Pearl
    description: >-
      Manage your Pearls, the AI agents that handle your inbound and outbound
      calls. Create and configure Pearls, retrieve their details and settings,
      run or pause them, list and bulk-export their calls, monitor calls in
      progress, get analytics, and reset a customer's conversation memory.
  - name: Speech
    description: >-
      Turn text into speech with your voices, as a single clip or as a stream,
      and clone new voices from a recording.
paths:
  /v2/Pearl/{pearlId}/KnowledgeBase/{fileId}:
    delete:
      tags:
        - Pearl
      summary: Delete Knowledge Base File
      description: >-
        Removes a file from the knowledge base of the published version of the
        Pearl. The other files are kept.


        If a new version of the Pearl was already being edited on the platform
        before this call, that version still has the old file list, and
        publishing it brings the deleted file back. To avoid this, delete files
        before you start editing the Pearl on the platform, or delete them again
        once the new version is published.
      parameters:
        - name: pearlId
          in: path
          description: The unique identifier of the Pearl.
          required: true
          schema:
            type: string
        - name: fileId
          in: path
          description: >-
            The id of the knowledge base file, as listed in `knowledgeBaseFiles`
            of Get Pearl Settings.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '`true` when the file was removed.'
          content:
            text/plain:
              schema:
                type: boolean
            application/json:
              schema:
                type: boolean
            text/json:
              schema:
                type: boolean
        '400':
          description: The Pearl or the file was not found.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
components:
  schemas:
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    bearer_auth:
      type: http
      description: >-
        Specify the authorization token.


        For more information, check out the [Authorization
        Guide](/api-reference/authorization).
      scheme: bearer
    oauth2_client_credentials:
      type: oauth2
      description: >-
        OAuth2 client_credentials grant. Use the Id of an OAuth API key as
        `client_id` and its one-time secret as `client_secret`.
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            pearls:read: List and view Pearls
            pearls:write: >-
              Create and update Pearls (settings, conversation flows, voices);
              implies pearls:read
            pearls:moderate: Run/pause Pearls and reset customer memory; implies pearls:read
            pearls:analytics: Read Pearl analytics; implies pearls:read
            pearls:leads: Manage and read outbound leads; implies pearls:read
            pearls:calls: >-
              Read calls and recordings, make and delete calls; implies
              pearls:read
            pearls:stream: >-
              Create stream tokens and run calls over a WebSocket; implies
              pearls:read
            account:phone_numbers: >-
              Read account phone numbers and text channels, manage custom VoIP
              numbers, import Twilio numbers and delete phone numbers
            account:users: Read account users
            account:advanced: Manage advanced account settings (blacklist)
            account:billing: Read account information and credit balance
            account:audit_log: Read the audit log
            tts: Synthesise speech and clone voices

````

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