---
title: "Create Crawl Job"
method: POST
path: "/v1/convai/knowledge-base/crawl"
tags: ["Conversational AI"]
---

# Create Crawl Job

`POST /v1/convai/knowledge-base/crawl`

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

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- BodyCreateCrawlJobV1ConvaiKnowledgeBaseCrawlPost
  - `url` string, required — URL to a page of documentation that the agent will have access to in order to interact with users.
  - `max_depth` integer — Maximum depth for crawling (1-5), defaults to 3.
  - `max_pages` integer — Maximum number of pages to crawl (1-10,000), defaults to 1000.
  - `pattern` string, nullable — If set, only URLs that match this pattern are included.
  - `sitemap_urls` string[], nullable — List of URLs to crawl from sitemap (optional, overrides automatic URL discovery).
  - `parent_folder_id` string, nullable — If set, the created document or folder will be placed inside the given folder.
  - `enable_auto_sync` boolean — Whether to enable auto-sync for this URL document.
  - `auto_remove` boolean — Whether to automatically remove the document if the URL becomes unavailable. Only applicable when auto-sync is enabled.
  - `minimum_frequency_days` integer, nullable — 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.

## Response `200`

Successful Response

- CreateCrawlJobResponseModel
  - `id` string, required
  - `type` 'discovery' | 'sitemap', required
  - `root_folder_id` string, required
  - `status` string, required
  - `created_at` integer, required
  - `folder_path` KnowledgeBaseFolderPathSegmentSummaryResponseModel[] — The folder path segments leading to the root folder, from root to parent folder.
    - `id` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elevenlabs/elevenlabs-api-documentation/revisions/db6eec599cbe/schema)
