> ## 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.

# Process Document From Url

> Process a document from URL to create knowledge entries using Docling



## OpenAPI

````yaml /api-reference/openapi/EvoAI-Knowledge-Service/knowledge.yaml post /api/v1/knowledge/process-url
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/process-url:
    post:
      summary: Process Document From Url
      description: Process a document from URL to create knowledge entries using Docling
      operationId: process_document_from_url_api_v1_knowledge_process_url_post
      parameters:
        - 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/DocumentUrlRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse_DocumentProcessResponse_'
        '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/process-url
                  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/process-url
                  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/process-url
                  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 or document URL not found
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/knowledge/process-url
                  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/process-url
                  method: POST
components:
  schemas:
    DocumentUrlRequest:
      properties:
        client_id:
          type: string
          format: uuid
          title: Client Id
          description: Client ID that will own the knowledge
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: URL of the document to process
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Custom title for the document
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Custom description for the document
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
          description: Custom tags for the document
        include_sub_pages:
          type: boolean
          title: Include Sub Pages
          description: Whether to crawl and process sub-pages found in the main page
          default: false
        max_pages:
          type: integer
          maximum: 50
          minimum: 1
          title: Max Pages
          description: Maximum number of pages to process (including main page)
          default: 1
      type: object
      required:
        - client_id
        - url
      title: DocumentUrlRequest
      description: Schema for processing document from URL
    SuccessResponse_DocumentProcessResponse_:
      properties:
        success:
          type: boolean
          title: Success
          description: Success indicator
          default: true
        data:
          $ref: f66c8524-c773-4662-950c-4674f2b2c2c2
          description: Response payload
        meta:
          $ref: 39662c72-c96e-4dc1-a63a-ba5d2a02e7b7
          description: Metadata
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: Optional success message
      type: object
      required:
        - data
        - meta
      title: SuccessResponse[DocumentProcessResponse]
    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.