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

# Refresh a source

> Required permission: sources:write and runs:write.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/sources/{sourceId}/recrawl
openapi: 3.0.3
info:
  title: Bulkgrid API
  version: 0.1.0
  description: >-
    Search indexed content, create crawl and extraction runs, and retrieve
    results. API keys require the scopes listed for each operation. OAuth
    connections grant MCP and search access only.
servers:
  - url: https://bulkgrid.com
    description: Bulkgrid
security:
  - apiKeyAuth: []
  - bearerAuth: []
tags:
  - name: Sources
    description: Source discovery, subscriptions, and indexing
  - name: Collections
    description: Collections and content selection rules
  - name: Search
    description: Search endpoints
  - name: Runs
    description: Run creation and lifecycle endpoints
  - name: Results
    description: Run result retrieval endpoints
paths:
  /api/v1/sources/{sourceId}/recrawl:
    post:
      tags:
        - Sources
      summary: Refresh a source
      description: 'Required permission: sources:write and runs:write.'
      operationId: sourcesRecrawl
      parameters:
        - name: sourceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  source:
                    type: object
                    properties:
                      crawl_config:
                        nullable: true
                      crawl_interval:
                        nullable: true
                        type: string
                        enum:
                          - hourly
                          - daily
                          - weekly
                          - monthly
                          - custom
                      created_at:
                        type: string
                      created_by_user_id:
                        nullable: true
                        type: string
                      created_by_workspace_id:
                        nullable: true
                        type: string
                      custom_interval_minutes:
                        nullable: true
                        type: number
                      icon_url:
                        nullable: true
                        type: string
                      id:
                        type: string
                      identifier:
                        type: string
                      integration_type:
                        type: string
                        enum:
                          - web
                          - upload
                          - github
                      is_active:
                        nullable: true
                        type: boolean
                      label:
                        nullable: true
                        type: string
                      last_crawled_at:
                        nullable: true
                        type: string
                      max_depth:
                        nullable: true
                        type: number
                      max_items:
                        nullable: true
                        type: number
                      metadata:
                        nullable: true
                      next_crawl_at:
                        nullable: true
                        type: string
                      public_source_id:
                        nullable: true
                        type: string
                      source_mode:
                        type: string
                        enum:
                          - discover
                          - selected_pages
                      total_items_found:
                        nullable: true
                        type: number
                      type:
                        type: string
                        enum:
                          - domain
                          - document
                          - repository
                      updated_at:
                        type: string
                      visibility:
                        type: string
                        enum:
                          - public
                          - private
                      workspace_id:
                        nullable: true
                        type: string
                    required:
                      - crawl_config
                      - crawl_interval
                      - created_at
                      - created_by_user_id
                      - created_by_workspace_id
                      - custom_interval_minutes
                      - icon_url
                      - id
                      - identifier
                      - integration_type
                      - is_active
                      - label
                      - last_crawled_at
                      - max_depth
                      - max_items
                      - metadata
                      - next_crawl_at
                      - public_source_id
                      - source_mode
                      - total_items_found
                      - type
                      - updated_at
                      - visibility
                      - workspace_id
                    additionalProperties: {}
                  run:
                    type: object
                    properties:
                      indexed_pages:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_done:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_failed:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_failed_pages:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_in_progress:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_queued:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      deletion_requested_at:
                        nullable: true
                        type: string
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      completed_at:
                        nullable: true
                        type: string
                      config:
                        $ref: '#/components/schemas/Schema20___schema0'
                      created_at:
                        type: string
                      credential_id:
                        nullable: true
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      done:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      error_code:
                        nullable: true
                        type: string
                      error_count:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      error_details:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema20___schema0'
                      extraction_query:
                        nullable: true
                        type: string
                      extraction_schema:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema20___schema0'
                      failed:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      in_progress:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      inline_credentials:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema20___schema0'
                      indexing_completed_at:
                        nullable: true
                        type: string
                      indexing_started_at:
                        nullable: true
                        type: string
                      indexing_time_ms:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      last_error:
                        nullable: true
                        type: string
                      last_error_at:
                        nullable: true
                        type: string
                      last_heartbeat:
                        nullable: true
                        type: string
                      max_retries:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      message_ids:
                        type: array
                        items:
                          type: string
                      metadata:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema20___schema0'
                      needs_dispatch:
                        type: boolean
                      priority:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      processing_time_ms:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      query:
                        nullable: true
                        type: string
                      queued:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requested_by_user_id:
                        nullable: true
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      retry_count:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      started_at:
                        nullable: true
                        type: string
                      status:
                        type: string
                        enum:
                          - pending
                          - processing
                          - completed
                          - failed
                          - cancelled
                      workspace_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      type:
                        type: string
                        enum:
                          - crawl
                          - deep_crawl
                          - extract
                          - source_sync
                      updated_at:
                        type: string
                      urls:
                        type: array
                        items:
                          type: string
                          format: uri
                    required:
                      - id
                      - completed_at
                      - config
                      - created_at
                      - credential_id
                      - done
                      - error_code
                      - error_count
                      - error_details
                      - extraction_query
                      - extraction_schema
                      - failed
                      - in_progress
                      - inline_credentials
                      - indexing_completed_at
                      - indexing_started_at
                      - indexing_time_ms
                      - last_error
                      - last_error_at
                      - last_heartbeat
                      - max_retries
                      - message_ids
                      - metadata
                      - needs_dispatch
                      - priority
                      - processing_time_ms
                      - query
                      - queued
                      - requested_by_user_id
                      - retry_count
                      - started_at
                      - status
                      - workspace_id
                      - type
                      - updated_at
                      - urls
                    additionalProperties: false
                  dispatchDeferred:
                    type: boolean
                  previewRunId:
                    nullable: true
                    type: string
                required:
                  - source
                  - run
                additionalProperties: false
        '202':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  source:
                    type: object
                    properties:
                      crawl_config:
                        nullable: true
                      crawl_interval:
                        nullable: true
                        type: string
                        enum:
                          - hourly
                          - daily
                          - weekly
                          - monthly
                          - custom
                      created_at:
                        type: string
                      created_by_user_id:
                        nullable: true
                        type: string
                      created_by_workspace_id:
                        nullable: true
                        type: string
                      custom_interval_minutes:
                        nullable: true
                        type: number
                      icon_url:
                        nullable: true
                        type: string
                      id:
                        type: string
                      identifier:
                        type: string
                      integration_type:
                        type: string
                        enum:
                          - web
                          - upload
                          - github
                      is_active:
                        nullable: true
                        type: boolean
                      label:
                        nullable: true
                        type: string
                      last_crawled_at:
                        nullable: true
                        type: string
                      max_depth:
                        nullable: true
                        type: number
                      max_items:
                        nullable: true
                        type: number
                      metadata:
                        nullable: true
                      next_crawl_at:
                        nullable: true
                        type: string
                      public_source_id:
                        nullable: true
                        type: string
                      source_mode:
                        type: string
                        enum:
                          - discover
                          - selected_pages
                      total_items_found:
                        nullable: true
                        type: number
                      type:
                        type: string
                        enum:
                          - domain
                          - document
                          - repository
                      updated_at:
                        type: string
                      visibility:
                        type: string
                        enum:
                          - public
                          - private
                      workspace_id:
                        nullable: true
                        type: string
                    required:
                      - crawl_config
                      - crawl_interval
                      - created_at
                      - created_by_user_id
                      - created_by_workspace_id
                      - custom_interval_minutes
                      - icon_url
                      - id
                      - identifier
                      - integration_type
                      - is_active
                      - label
                      - last_crawled_at
                      - max_depth
                      - max_items
                      - metadata
                      - next_crawl_at
                      - public_source_id
                      - source_mode
                      - total_items_found
                      - type
                      - updated_at
                      - visibility
                      - workspace_id
                    additionalProperties: {}
                  run:
                    type: object
                    properties:
                      indexed_pages:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_done:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_failed:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_failed_pages:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_in_progress:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      indexing_queued:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      deletion_requested_at:
                        nullable: true
                        type: string
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      completed_at:
                        nullable: true
                        type: string
                      config:
                        $ref: '#/components/schemas/Schema21___schema0'
                      created_at:
                        type: string
                      credential_id:
                        nullable: true
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      done:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      error_code:
                        nullable: true
                        type: string
                      error_count:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      error_details:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema21___schema0'
                      extraction_query:
                        nullable: true
                        type: string
                      extraction_schema:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema21___schema0'
                      failed:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      in_progress:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      inline_credentials:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema21___schema0'
                      indexing_completed_at:
                        nullable: true
                        type: string
                      indexing_started_at:
                        nullable: true
                        type: string
                      indexing_time_ms:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      last_error:
                        nullable: true
                        type: string
                      last_error_at:
                        nullable: true
                        type: string
                      last_heartbeat:
                        nullable: true
                        type: string
                      max_retries:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      message_ids:
                        type: array
                        items:
                          type: string
                      metadata:
                        nullable: true
                        allOf:
                          - $ref: '#/components/schemas/Schema21___schema0'
                      needs_dispatch:
                        type: boolean
                      priority:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      processing_time_ms:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      query:
                        nullable: true
                        type: string
                      queued:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      requested_by_user_id:
                        nullable: true
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      retry_count:
                        nullable: true
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      started_at:
                        nullable: true
                        type: string
                      status:
                        type: string
                        enum:
                          - pending
                          - processing
                          - completed
                          - failed
                          - cancelled
                      workspace_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      type:
                        type: string
                        enum:
                          - crawl
                          - deep_crawl
                          - extract
                          - source_sync
                      updated_at:
                        type: string
                      urls:
                        type: array
                        items:
                          type: string
                          format: uri
                    required:
                      - id
                      - completed_at
                      - config
                      - created_at
                      - credential_id
                      - done
                      - error_code
                      - error_count
                      - error_details
                      - extraction_query
                      - extraction_schema
                      - failed
                      - in_progress
                      - inline_credentials
                      - indexing_completed_at
                      - indexing_started_at
                      - indexing_time_ms
                      - last_error
                      - last_error_at
                      - last_heartbeat
                      - max_retries
                      - message_ids
                      - metadata
                      - needs_dispatch
                      - priority
                      - processing_time_ms
                      - query
                      - queued
                      - requested_by_user_id
                      - retry_count
                      - started_at
                      - status
                      - workspace_id
                      - type
                      - updated_at
                      - urls
                    additionalProperties: false
                  dispatchDeferred:
                    type: boolean
                  previewRunId:
                    nullable: true
                    type: string
                required:
                  - source
                  - run
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details: {}
                required:
                  - error
                additionalProperties: false
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    Schema20___schema0:
      anyOf:
        - type: string
          nullable: true
          enum:
            - null
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/Schema20___schema0'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/Schema20___schema0'
    Schema21___schema0:
      anyOf:
        - type: string
          nullable: true
          enum:
            - null
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/Schema21___schema0'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/Schema21___schema0'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Bulkgrid API key
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bulkgrid API key or OAuth access token. OAuth grants currently allow
        search:query and mcp:use only.

````