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

# CreateDatasetFilterAPI mirrors the erdo_add_dataset_filter MCP tool.




## OpenAPI

````yaml /api/openapi.json post /v1/datasets/{datasetSlug}/filters
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, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-07-25'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/datasets/{datasetSlug}/filters:
    post:
      summary: |
        CreateDatasetFilterAPI mirrors the erdo_add_dataset_filter MCP tool.
      operationId: POST:mcp.CreateDatasetFilterAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: datasetSlug
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                conditions:
                  items:
                    $ref: '#/components/schemas/mcp.FilterConditionInput'
                  type: array
                is_default:
                  description: |
                    view opted into via filter\_names on the query/fetch reads.
                  title: >
                    IsDefault: apply to every read automatically (default true);
                    false saves a named
                  type: boolean
                name:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  conditions:
                    items:
                      $ref: '#/components/schemas/dataset.FilterCondition'
                    type: array
                  created_at:
                    format: date-time
                    type: string
                  id:
                    type: string
                  is_default:
                    type: boolean
                  name:
                    type: string
                  resource_id:
                    type: string
                  resource_type:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.FilterConditionInput:
      description: >
        dataset.FilterCondition; kept local so it can carry MCP jsonschema
        hints.
      properties:
        column:
          type: string
        operator:
          type: string
        value:
          type: string
      title: |
        FilterConditionInput is one declared WHERE condition. Mirrors
      type: object
    dataset.FilterCondition:
      description: >
        entity query\_constraints, so the existing constraint compiler applies
        it unchanged.
      properties:
        column:
          type: string
        operator:
          type: string
        value:
          type: string
      title: >
        FilterCondition is one declared WHERE condition. Same shape as
        default_filters /
      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_...).

````