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

# Search Knowledge

> Search knowledge entries

If x-knowledge-base-config-id header is provided, uses that specific configuration.
Otherwise, uses the default active configuration for the account.



## OpenAPI

````yaml /api-reference/openapi/EvoAI-Knowledge-Service/knowledge.yaml post /api/v1/knowledge/search
openapi: 3.1.0
info:
  title: Evolution Foundation - Knowledge Service - Knowledge
  description: Knowledge base and memory management
  version: 1.0.0
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:3005
    description: Development server
    variables:
      port:
        default: '3005'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/knowledge/search:
    post:
      summary: Search Knowledge
      description: >-
        Search knowledge entries


        If x-knowledge-base-config-id header is provided, uses that specific
        configuration.

        Otherwise, uses the default active configuration for the account.
      operationId: search_knowledge_api_v1_knowledge_search_post
      parameters:
        - name: x-client-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: X-Client-Id
        - name: x-knowledge-base-config-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: X-Knowledge-Base-Config-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeSearch'
      responses:
        '200':
          description: Knowledge search completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse_KnowledgeSearchResponse_'
        '400':
          description: Bad Request (invalid data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: BAD_REQUEST
                  message: Invalid input data
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/knowledge/search
                  method: POST
        '401':
          description: Unauthorized (invalid or missing token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: UNAUTHORIZED
                  message: Invalid or missing authentication token
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/knowledge/search
                  method: POST
        '403':
          description: Forbidden (insufficient permissions)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/knowledge/search
                  method: POST
        '404':
          description: Not Found (resource not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: NOT_FOUND
                  message: Knowledge base configuration not found
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/knowledge/search
                  method: POST
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error (server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: INTERNAL_SERVER_ERROR
                  message: An unexpected error occurred
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/knowledge/search
                  method: POST
components:
  schemas:
    KnowledgeSearch:
      properties:
        query:
          type: string
          title: Query
          description: Search query
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
          description: Filter by tags
        max_results:
          type: integer
          title: Max Results
          description: Maximum number of results
          default: 10
      type: object
      required:
        - query
      title: KnowledgeSearch
      description: Schema for knowledge search requests
    SuccessResponse_KnowledgeSearchResponse_:
      properties:
        success:
          type: boolean
          title: Success
          description: Success indicator
          default: true
        data:
          $ref: f7403f0a-23de-4b11-9db3-1b126aa98af6
          description: Response payload
        meta:
          $ref: 47f49c2b-e156-48b0-af85-15e874091686
          description: Metadata
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: Optional success message
      type: object
      required:
        - data
        - meta
      title: SuccessResponse[KnowledgeSearchResponse]
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Success indicator
          default: false
        error: 44fed242-ed8c-42cc-a258-fde42f1bc71d
        meta:
          $ref: 48ef82b8-8963-4261-ab68-ad7060264785
          description: Metadata
      type: object
      required:
        - error
        - meta
      title: ErrorResponse
      description: |-
        Standard error response schema matching error_response() return format.

        This schema matches the structure returned by error_response() function,
        which always uses ErrorInfo for the error field.
    HTTPValidationError:
      properties:
        detail:
          items: 913403a9-6f2a-44b1-a051-78abecca0208
          type: array
          title: Detail
      type: object
      title: HTTPValidationError

````

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