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

# AskDataQuestionAPI mirrors the erdo_ask_data_question MCP tool as a REST
endpoint.
A question is read-only unless allow_writes is true. A saved shortcut runs its stored configuration.




## OpenAPI

````yaml /api/openapi.json post /v1/ask
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/ask:
    post:
      summary: >
        AskDataQuestionAPI mirrors the erdo_ask_data_question MCP tool as a REST

        endpoint.

        A question is read-only unless allow_writes is true. A saved shortcut
        runs its stored configuration.
      operationId: POST:mcp.AskDataQuestionAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                allow_writes:
                  description: >-
                    when true, this question may create datasets, write
                    declarations, schedule syncs, and persist other changes.
                    Default false: the question only reads existing datasets and
                    sources, and describes anything it would need to create.
                  type: boolean
                async:
                  description: >
                    answer — use it for long operations (e.g. building a landing
                    page) that would otherwise exceed the HTTP/edge timeout.
                    Poll erdo\_list\_agent\_runs / GET
                    /v1/runs?thread\_id=\<thread\_id> until the run is
                    completed, then read its output.
                  title: >
                    Async returns as soon as the run is kicked off instead of
                    waiting for the
                  type: boolean
                dataset_slugs:
                  items:
                    type: string
                  type: array
                images:
                  items:
                    $ref: '#/components/schemas/mcp.MCPImageRef'
                  type: array
                parameters:
                  type: object
                  additionalProperties:
                    oneOf:
                      - type: string
                        nullable: true
                      - type: number
                      - type: boolean
                question:
                  type: string
                saved_ask_id:
                  type: string
                timezone:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  answer:
                    type: string
                  error:
                    description: >
                      agent ran but its answer could not be read back; ThreadID
                      and MessageID still identify the committed turn so the
                      caller can recover it.
                    title: >
                      Error is set, with Status "error", when the turn was
                      committed and the
                    type: string
                  message:
                    type: string
                  message_id:
                    type: string
                  status:
                    type: string
                  thread:
                    $ref: '#/components/schemas/db.Thread'
                  thread_id:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.MCPImageRef:
      properties:
        bucket_key:
          type: string
        height:
          format: int64
          type: integer
        media_type:
          type: string
        width:
          format: int64
          type: integer
      title: >
        MCPImageRef is a reference to an image already uploaded via
        erdo_upload_image.
      type: object
    db.Thread:
      properties:
        created_at:
          format: date-time
          type: string
        created_by_persona_id:
          format: uuid
          type: string
          nullable: true
        created_by_user_id:
          format: uuid
          type: string
        direct_organization_id:
          format: uuid
          type: string
          nullable: true
        direct_persona_id:
          format: uuid
          type: string
          nullable: true
        id:
          format: uuid
          type: string
        interaction_state:
          $ref: '#/components/schemas/db.ThreadInteractionState'
        listing:
          type: string
        name:
          $ref: '#/components/schemas/sql.NullString'
        parent_thread_id:
          format: uuid
          type: string
          nullable: true
        persona_id:
          format: uuid
          type: string
          nullable: true
        source:
          $ref: '#/components/schemas/sql.NullString'
        source_metadata:
          $ref: '#/components/schemas/pqtype.NullRawMessage'
        updated_at:
          format: date-time
          type: string
        visibility:
          $ref: '#/components/schemas/db.ThreadVisibility'
      type: object
    db.ThreadInteractionState:
      type: string
    sql.NullString:
      description: "NullString implements the \\[Scanner] interface so it can be used as a scan destination:\n\n\tvar s NullString\n\terr := db.QueryRow(\"SELECT name FROM foo WHERE id=?\", id).Scan(&s)\n\t...\n\tif s.Valid {\n\t   // use s.String\n\t} else {\n\t   // NULL value\n\t}\n"
      properties:
        String:
          type: string
        Valid:
          title: |
            Valid is true if String is not NULL
          type: boolean
      title: |
        NullString represents a string that may be null.
      type: object
    pqtype.NullRawMessage:
      description: >
        NullRawMessage implements the Scanner interface so it can be used as a
        scan destination, similar to NullString.
      properties:
        RawMessage:
          type: object
        Valid:
          title: |
            Valid is true if RawMessage is not NULL
          type: boolean
      title: |
        NullRawMessage represents a json.RawMessage that may be null.
      type: object
    db.ThreadVisibility:
      type: string
  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.