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

# ConfigureDatasetRefreshAPI mirrors the erdo_configure_dataset_refresh MCP


> tool: it installs or replaces the configuration that keeps a dataset current. Deterministic strategies are test-run once before the call returns, and the outcome comes back on test\_run.




## OpenAPI

````yaml /api/openapi.json put /v1/datasets/{datasetSlug}/refresh
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-09-09'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/datasets/{datasetSlug}/refresh:
    put:
      summary: >
        ConfigureDatasetRefreshAPI mirrors the erdo_configure_dataset_refresh
        MCP
      description: >
        tool: it installs or replaces the configuration that keeps a dataset
        current. Deterministic strategies are test-run once before the call
        returns, and the outcome comes back on test\_run.
      operationId: PUT:mcp.ConfigureDatasetRefreshAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: datasetSlug
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                agent_prompt:
                  type: string
                context_dataset_slugs:
                  items:
                    type: string
                  type: array
                key_column:
                  type: string
                live_write_mode:
                  type: string
                parameters:
                  type: object
                payload_schema:
                  type: object
                refresh_mode:
                  type: string
                refresh_on_view_debounce_seconds:
                  format: int32
                  maximum: 2147483647
                  minimum: -2147483648
                  type: integer
                refresh_on_view_enabled:
                  type: boolean
                refresh_on_view_stale_after_seconds:
                  format: int32
                  maximum: 2147483647
                  minimum: -2147483648
                  type: integer
                sample_payload:
                  type: object
                schedule:
                  type: string
                script:
                  type: string
                script_entrypoint:
                  type: string
                strategy:
                  type: string
                timezone:
                  type: string
                transform_js:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  dataset_id:
                    format: uuid
                    type: string
                  dataset_slug:
                    type: string
                  job_id:
                    format: uuid
                    type: string
                  previous_strategy:
                    description: |
                      configure.
                    title: >
                      PreviousStrategy is the strategy this call replaced, empty
                      on a first
                    type: string
                  refresh_config_id:
                    format: uuid
                    type: string
                  refresh_mode:
                    type: string
                  schedule:
                    type: string
                  strategy:
                    type: string
                  test_run:
                    $ref: '#/components/schemas/job.DatasetRefreshTestRun'
                  webhook_secret:
                    type: string
                  webhook_url:
                    description: |
                      secret only ever here — the read path never returns it.
                    title: >
                      WebhookURL / WebhookSecret are returned for live_webhook
                      only, and the
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    job.DatasetRefreshTestRun:
      description: >
        immediately after a deterministic refresh is installed. A configuration
        that saves cleanly and fails on its first real run is the failure mode
        this exists to catch, so the result travels back with the configure
        rather than waiting for the schedule to discover it.
      properties:
        duration_ms:
          format: int64
          type: integer
        error:
          type: string
        success:
          type: boolean
      title: >
        DatasetRefreshTestRun reports the outcome of the one-off execution that
        runs
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````