# 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.1
info:
  title: Reindex Website
  version: endpoint_website.reindex_website
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 of the form `Bearer <token>`, where token is
            your auth token.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReindexWebsiteResponse'
        '422':
          description: Validation Error
          content: {}
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReindexWebsiteRequest'
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
    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

```