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

# Update a filter definition



## OpenAPI

````yaml /openapi.json post /filter_definitions/{id}
openapi: 3.0.3
info:
  title: Pocketflows API
  version: 0.0.4
servers:
  - url: https://api.pocketflows.com
    description: Production server
security:
  - HttpBasicAuth: []
paths:
  /filter_definitions/{id}:
    post:
      tags:
        - Filter definitions
      summary: Update a filter definition
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: The ID of the filter definition
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                variable_name:
                  type: string
                  description: >-
                    The updated variable name of the filter definition. Can be
                    omitted
                label:
                  type: string
                  description: The updated label of the filter definition. Can be omitted
                type:
                  type: string
                  enum:
                    - select
                    - text
                    - number
                    - boolean
                    - date
                    - datetime
                    - currency
                    - array_of_known
                  description: The updated type of the filter definition. Can be omitted
                options:
                  type: array
                  items:
                    $ref: '#/components/schemas/FilterDefinitionOption'
                  description: >-
                    The updated options of the filter definition. Can be
                    omitted. Will wholly replace the existing options
      responses:
        '200':
          description: The updated `FilterDefinition` object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterDefinition'
components:
  schemas:
    FilterDefinitionOption:
      type: object
      properties:
        label:
          type: string
          description: The label of the option
        value:
          type: string
          description: The value of the option
      required:
        - label
        - value
      title: The Filter Definition Option object
    FilterDefinition:
      type: object
      properties:
        id:
          type: string
          description: The ID of the filter definition
        label:
          type: string
          description: The label of the filter definition
        variable_name:
          type: string
          description: The variable name of the filter definition
        type:
          type: string
          enum:
            - select
            - text
            - number
            - boolean
            - datetime
            - currency
            - array_of_known
          description: The type of the filter definition
        enabled:
          type: boolean
          description: Whether the filter definition is enabled
        options:
          type: array
          items:
            $ref: '#/components/schemas/FilterDefinitionOption'
          description: The options for the select dropdown
      required:
        - id
        - label
        - variable_name
        - type
        - enabled
      title: The Filter Definition object
  securitySchemes:
    HttpBasicAuth:
      type: http
      scheme: basic

````