---
title: "Create New Custom Filter"
method: POST
path: "/workspaces/filters"
tags: ["CustomFilter"]
---

# Create New Custom Filter

`POST /workspaces/filters`

Creates a new custom filter

## Request body

- CustomFilter
  - `id` string — Unique identifier
  - `workspace_id` string — Associated workspace
  - `name` string — Name of the filter
  - `filter_target` string — The target the filter should be applied to
  - `filter` string — The JSON serialized filter used to apply the appropriate filters
  - `active` boolean — Indicates whether or not the filter is currently active
  - `created_time` integer — Time at which the custom filter was created
  - `created_by_id` string — The ID of the user who created this custom filter
  - `last_updated_time` integer — Time the custom filter was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this custom filter

## Response `201`

Created Custom Filter

- CustomFilter
  - `id` string — Unique identifier
  - `workspace_id` string — Associated workspace
  - `name` string — Name of the filter
  - `filter_target` string — The target the filter should be applied to
  - `filter` string — The JSON serialized filter used to apply the appropriate filters
  - `active` boolean — Indicates whether or not the filter is currently active
  - `created_time` integer — Time at which the custom filter was created
  - `created_by_id` string — The ID of the user who created this custom filter
  - `last_updated_time` integer — Time the custom filter was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this custom filter

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
