---
title: "Update a filter definition"
method: POST
path: "/filter_definitions/{id}"
tags: ["Filter definitions"]
---

# Update a filter definition

`POST /filter_definitions/{id}`

## Path parameters

- `id` string, required

## Request body

- object
  - `variable_name` string — The updated variable name of the filter definition. Can be omitted
  - `label` string — The updated label of the filter definition. Can be omitted
  - `type` 'select' | 'text' | 'number' | 'boolean' | 'date' | 'datetime' | 'currency' | 'array_of_known' — The updated type of the filter definition. Can be omitted
  - `options` FilterDefinitionOption[] — The updated options of the filter definition. Can be omitted. Will wholly replace the existing options
    - `label` string, required — The label of the option
    - `value` string, required — The value of the option

## Response `200`

The updated `FilterDefinition` object

- FilterDefinition
  - `id` string, required — The ID of the filter definition
  - `label` string, required — The label of the filter definition
  - `variable_name` string, required — The variable name of the filter definition
  - `type` 'select' | 'text' | 'number' | 'boolean' | 'datetime' | 'currency' | 'array_of_known', required — The type of the filter definition
  - `enabled` boolean, required — Whether the filter definition is enabled
  - `options` FilterDefinitionOption[] — The options for the select dropdown
    - `label` string, required — The label of the option
    - `value` string, required — The value of the option

---

[API](https://skmtc.dev/pocketflows/apis/pocketflows-api.md) · [All operations](https://skmtc.dev/pocketflows/apis/pocketflows-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pocketflows/pocketflows-api/revisions/26723490b96f/schema)
