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

# Embed URLs

> Creates a knowledge base by scraping website pages — the Website Scrape tab in the application.

Each URL in `urls` is scraped, chunked and embedded directly.

* `title` is optional and defaults to `Website KB`.
* To discover URLs from a sitemap first, call `POST /knowledgeBase/list-sitemap` and let the user select pages.
* Embeddings are built in the background; poll `GET /knowledgeBase/build-status` until the build is `ready`.


## OpenAPI

````yaml POST /knowledgeBase/embed-urls
openapi: 3.0.1
info:
  title: QCall Ai API
  description: >-
    A sample API that uses a campaign store as an example to demonstrate
    features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.qcall.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /knowledgeBase/embed-urls:
    post:
      description: >-
        Creates a knowledge base by scraping website pages (the **Website
        Scrape** tab in the application). Each URL is scraped, chunked and
        embedded directly. URLs can be added manually or discovered from a
        sitemap with `POST /knowledgeBase/list-sitemap`. The title is optional
        and defaults to `Website KB`. Embeddings are built in the background;
        poll `GET /knowledgeBase/build-status` to track progress.
      requestBody:
        description: Website URLs to scrape and embed (Website Scrape)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedUrlsRequest'
        required: true
      responses:
        '200':
          description: URLs scraped; embedding is building in the background
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the request succeeded
                  message:
                    type: string
                    description: Response message
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EmbedUrlsRequest:
      required:
        - urls
      type: object
      properties:
        urls:
          description: The website page URLs to scrape, chunk and embed
          type: array
          items:
            type: string
        title:
          description: Optional title, defaults to `Website KB`
          type: string
        language:
          description: Optional language code (e.g. `en`)
          type: string
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````