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

# Agent knowledge base documents

> Delete a document from an agent's knowledge base



## OpenAPI

````yaml DELETE /agent-documents
openapi: 3.0.1
info:
  title: Phonely API
  description: API for Phonely services including agent management and call summaries
  version: 1.0.0
servers:
  - url: https://app.phonely.ai/api
security: []
paths:
  /agent-documents:
    delete:
      summary: Delete document
      description: Delete a document from an agent's knowledge base
      parameters:
        - name: uid
          in: query
          required: true
          schema:
            type: string
          description: User ID
        - name: agentId
          in: query
          required: true
          schema:
            type: string
          description: Agent ID
        - name: documentId
          in: query
          required: true
          schema:
            type: string
          description: Document ID to delete
      responses:
        '200':
          description: Document deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Document not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error code or identifier
        message:
          type: string
          description: Detailed error message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Authorization

````