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

# Add Website

> Add a website to an agent knowledge base.



## OpenAPI

````yaml POST /agent-websites
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-websites:
    post:
      summary: Add websites to agent knowledge base
      description: >-
        Crawl and add websites to an agent's knowledge base. Supports
        customizable crawling parameters including depth limit, URL filtering,
        and page limits.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uid
                - agentId
                - url
              properties:
                uid:
                  type: string
                  description: User ID
                agentId:
                  type: string
                  description: Agent ID
                url:
                  type: string
                  format: uri
                  description: Base URL to crawl
                limit:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 5
                  description: Maximum number of pages to crawl (max 10)
                maxDepth:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 1
                  description: Maximum crawling depth (max 10)
                excludePaths:
                  type: array
                  items:
                    type: string
                  description: Array of URL paths to exclude from crawling
                includePaths:
                  type: array
                  items:
                    type: string
                  description: >-
                    Array of URL paths to include in crawling (if specified,
                    only these paths will be crawled)
      responses:
        '200':
          description: Websites added successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error crawling or adding websites
          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

````