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

# Unassign Agent

> Removes an existing knowledge base association from one or more agents.



## OpenAPI

````yaml /api-reference/openapi.json post /api/agents/knowledge-bases/{kb_id}/unassign
openapi: 3.1.0
info:
  title: Ello.AI API
  description: API for managing agents and calls in Ello.AI
  version: 1.0.0
servers:
  - url: https://api.getello.ai/
security: []
paths:
  /api/agents/knowledge-bases/{kb_id}/unassign:
    post:
      tags:
        - Agents
      summary: Unassign Agent
      description: Removes an existing knowledge base association from one or more agents.
      operationId: unassignKnowledgeBaseFromAgent
      parameters:
        - name: kb_id
          in: path
          required: true
          description: Unique identifier of the knowledge base to unassign.
          schema:
            type: string
            example: kb_12345
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              example: {}
              properties:
                agent_ids:
                  type: array
                  items:
                    type: string
                  example:
                    - 68dce5202fc07b92042493b1
              required:
                - agent_ids
      responses:
        '200':
          description: Knowledge base unassigned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Knowledge base unassigned successfully
                  data:
                    type: array
                    items:
                      type: string
                    description: >-
                      List of agent IDs from which the knowledge base was
                      unassigned
                    example:
                      - 6960a6a1f89b3cdd196544cb
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Invalid request parameters
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized access
                  details:
                    type: string
                    example: Authentication token is missing or invalid
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 403
                  message:
                    type: string
                    example: This route requires a user token without scope
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Knowledge base or agent not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Something went wrong. Please try again later.
      security:
        - apiKey: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````