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

# Create Crawl Job

> Create a crawl job to crawl the given URL with specified depth and page limits.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/knowledge-base/crawl
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/knowledge-base/crawl:
    post:
      tags:
        - Conversational AI
      summary: Create Crawl Job
      description: >-
        Create a crawl job to crawl the given URL with specified depth and page
        limits.
      operationId: create_crawl_job_route
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_Create_crawl_job_v1_convai_knowledge_base_crawl_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCrawlJobResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Create_crawl_job_v1_convai_knowledge_base_crawl_post:
      properties:
        url:
          type: string
          title: Url
          description: >-
            URL to a page of documentation that the agent will have access to in
            order to interact with users.
        max_depth:
          type: integer
          maximum: 5
          minimum: 1
          title: Max Depth
          description: Maximum depth for crawling (1-5), defaults to 3.
          default: 3
        max_pages:
          type: integer
          maximum: 10000
          minimum: 1
          title: Max Pages
          description: Maximum number of pages to crawl (1-10,000), defaults to 1000.
          default: 1000
        pattern:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Pattern
          description: If set, only URLs that match this pattern are included.
        sitemap_urls:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Sitemap Urls
          description: >-
            List of URLs to crawl from sitemap (optional, overrides automatic
            URL discovery).
        parent_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Folder Id
          description: >-
            If set, the created document or folder will be placed inside the
            given folder.
        enable_auto_sync:
          type: boolean
          title: Enable Auto Sync
          description: Whether to enable auto-sync for this URL document.
          default: false
        auto_remove:
          type: boolean
          title: Auto Remove
          description: >-
            Whether to automatically remove the document if the URL becomes
            unavailable. Only applicable when auto-sync is enabled.
          default: false
        minimum_frequency_days:
          anyOf:
            - type: integer
              maximum: 180
              minimum: 1
            - type: 'null'
          title: Minimum Frequency Days
          description: >-
            Minimum frequency (in days) at which the underlying eligible
            documents are refreshed. The actual interval may be shorter, never
            longer. Defaults to 7, tightened to the parent folder's frequency if
            that is stricter. Only applicable when auto-sync is enabled.
      type: object
      required:
        - url
      title: Body_Create_crawl_job_v1_convai_knowledge_base_crawl_post
    CreateCrawlJobResponseModel:
      properties:
        id:
          type: string
          title: Id
        type:
          $ref: '#/components/schemas/CrawlType'
        root_folder_id:
          type: string
          title: Root Folder Id
        status:
          type: string
          title: Status
        created_at:
          type: integer
          title: Created At
        folder_path:
          items:
            $ref: >-
              #/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to the root folder, from root to
            parent folder.
      type: object
      required:
        - id
        - type
        - root_folder_id
        - status
        - created_at
      title: CreateCrawlJobResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CrawlType:
      type: string
      enum:
        - discovery
        - sitemap
      title: CrawlType
      default: discovery
    KnowledgeBaseFolderPathSegmentSummaryResponseModel:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
        - id
      title: KnowledgeBaseFolderPathSegmentSummaryResponseModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````