> ## 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.

# RunQueriesAPI mirrors the erdo_run_queries MCP tool: several dataset reads


> in one request, each answered as POST /v1/datasets/:slug/query would answer it, results in request order.




## OpenAPI

````yaml /api/openapi.json post /v1/queries
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-11-05'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/queries:
    post:
      summary: >
        RunQueriesAPI mirrors the erdo_run_queries MCP tool: several dataset
        reads
      description: >
        in one request, each answered as POST /v1/datasets/:slug/query would
        answer it, results in request order.
      operationId: POST:mcp.RunQueriesAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                queries:
                  items:
                    $ref: '#/components/schemas/mcp.RunQueryInput'
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  results:
                    items:
                      $ref: '#/components/schemas/mcp.RunQueriesResult'
                    type: array
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.RunQueryInput:
      properties:
        apply_default_filters:
          description: >
            which has always supported this and which every internal admin/debug
            read already uses. External callers had no way to reach it, and that
            turned a default filter into something nobody outside Erdo could see
            past — including the person who created it.


            That matters because default filters are how rows get hidden on
            purpose: test submissions, and now a lead somebody marked as never
            having been an enquiry. Hiding a row from the numbers is right;
            making it unreadable is not. Reviewing what you excluded, and
            deciding whether you were wrong, needs the row itself.


            It is not an access bypass: RBAC decides who may read the dataset at
            all, and this only chooses whether a presentation default is applied
            to a read the caller is already entitled to make. Absent means true,
            so every existing caller is unaffected.
          title: >
            ApplyDefaultFilters mirrors
            dataset.QueryDatasetParams.ApplyDefaultFilters,
          type: boolean
        create_snapshot:
          description: >
            object and the already-resolved default/named filter view. Later
            pages pass the returned SnapshotID and omit filter/resource
            arguments.
          title: >
            CreateSnapshot pins the first query page to the current immutable
            file
          type: boolean
        dataset_slug:
          type: string
        filter_names:
          items:
            type: string
          type: array
        limit:
          format: int64
          type: integer
        query:
          type: string
        resource_key:
          type: string
        snapshot_id:
          type: string
      title: |
        RunQueryInput is the input for running a SQL query against a dataset.
      type: object
    mcp.RunQueriesResult:
      description: >
        Exactly one of Result and Error is set: one read failing does not fail
        the others, so the caller can render what answered and say what did not.
      properties:
        error:
          $ref: '#/components/schemas/mcp.BatchQueryError'
        result:
          $ref: '#/components/schemas/mcp.RunQueryResponse'
      title: |
        RunQueriesResult is one read's outcome, at the same index as its query.
      type: object
    mcp.BatchQueryError:
      description: >
        have answered with (e.g. "not\_found", "permission\_denied",
        "invalid\_argument").
      properties:
        code:
          type: string
        message:
          type: string
      title: |
        BatchQueryError carries the same code and message a single query would
      type: object
    mcp.RunQueryResponse:
      properties:
        columns:
          items:
            type: string
          type: array
        row_count:
          format: int64
          type: integer
        rows:
          items:
            items:
              type: string
            type: array
          type: array
        snapshot_id:
          type: string
      title: |
        RunQueryResponse wraps the query result with JSON tags.
      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_...).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.