> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiIzNjU3ODZmMC0zZjFmLTQ5MWQtODY1Ni0wYTcxMWIyZjA4OGIiLCJleHAiOjE3NzgzMzUyMjMsImlhdCI6MTc3ODMzNDkyM30.LLY06x3qtH8HdMVLPvf3nEBtyfq36SIMceIrglZ0ylY
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# Reindex Website

POST https://fai.buildwithfern.com/sources/website/{domain}/reindex
Content-Type: application/json

Re-crawl a website by starting a new crawl job. The job will delete old pages before indexing.
Uses the configuration from the original index request.

Reference: https://buildwithfern.com/learn/docs/ai-features/ask-fern/api-reference/website/reindex-website

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: fai
  version: 1.0.0
paths:
  /sources/website/{domain}/reindex:
    post:
      operationId: reindex-website
      summary: Reindex Website
      description: >-
        Re-crawl a website by starting a new crawl job. The job will delete old
        pages before indexing.

        Uses the configuration from the original index request.
      tags:
        - subpackage_website
      parameters:
        - name: domain
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReindexWebsiteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReindexWebsiteRequest'
servers:
  - url: https://fai.buildwithfern.com
  - url: https://fai-dev.buildwithfern.com
  - url: http://localhost:8080
components:
  schemas:
    ReindexWebsiteRequest:
      type: object
      properties:
        base_url:
          type: string
          description: The base URL to re-crawl (will delete old pages and re-index)
        domain_filter:
          type:
            - string
            - 'null'
          description: >-
            Domain to filter crawling (e.g., 'docs.example.com'). If not
            provided, uses previous config.
        path_filter:
          type:
            - string
            - 'null'
          description: >-
            Path prefix to restrict crawling (e.g., '/docs'). If not provided,
            uses previous config.
        url_pattern:
          type:
            - string
            - 'null'
          description: >-
            Regex pattern to filter URLs (e.g.,
            `https://example\.com/(docs|api)/.*`). If not provided, uses
            previous config.
        chunk_size:
          type:
            - integer
            - 'null'
          description: >-
            Size of text chunks for splitting documents. If not provided, uses
            previous config.
        chunk_overlap:
          type:
            - integer
            - 'null'
          description: >-
            Overlap between consecutive chunks. If not provided, uses previous
            config.
        min_content_length:
          type:
            - integer
            - 'null'
          description: >-
            Minimum content length to index a page. If not provided, uses
            previous config.
        max_pages:
          type:
            - integer
            - 'null'
          description: >-
            Maximum number of pages to crawl. If not provided, uses previous
            config.
        delay:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Delay in seconds between requests. If not provided, uses previous
            config.
        version:
          type:
            - string
            - 'null'
          description: >-
            Version to tag all indexed pages with. If not provided, uses
            previous config.
        product:
          type:
            - string
            - 'null'
          description: >-
            Product to tag all indexed pages with. If not provided, uses
            previous config.
        authed:
          type:
            - boolean
            - 'null'
          description: >-
            Whether indexed pages should be auth-gated. If not provided, uses
            previous config.
      required:
        - base_url
      title: ReindexWebsiteRequest
    ReindexWebsiteResponse:
      type: object
      properties:
        job_id:
          type: string
          description: ID to track the re-crawling job status
        base_url:
          type: string
          description: The base URL being re-crawled
      required:
        - job_id
        - base_url
      title: ReindexWebsiteResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```