---
title: "Create filter set"
method: POST
path: "/api/v1/filter-sets/"
tags: ["filterSets"]
---

# Create filter set

`POST /api/v1/filter-sets/`

Create a filter set from a list of filters

## Headers

- `Authorization` string, required

## Request body

- CreateFilterSet
  - `workspace_id` string — ID of the workspace where the filter set can be used.
  - `organisation_id` string — ID of the organisation where the filter set can be used.
  - `name` string — Name of the filter set.
  - `description` string, nullable — Description of the filter set.
  - `filters` CreateFilterSetFiltersItems[] — List of all filters contained in the filter set.
    - union
      - SelectFilter
        - `filter_id` string, required — ID of the "select" type filter.
        - `selected_values` string[], required — This schema applies for filters of the `select` type, as defined in the [filter list response](\#tag/Filters/paths/~1api~1v1~1filters~1/get). Array of IDs matching the response IDs, from the `select` filter's `choices` (see response linked above). String format should match the `data_type` of the `select` filter's `choices` (see response linked above).
        - `weightings` object — Ratios to control the distribution of participants across the selected values. Integer percentages, floats, and exact quantities are valid inputs.
      - RangeFilter
        - `filter_id` string, required — ID of the "range" type filter.
        - `selected_range` RangeFilterSelectedRange, required — This schema applies for filters of the `range` type, as defined in the [filter list response](\#tag/Filters/paths/~1api~1v1~1filters~1/get). A dictionary with two possible objects, 'lower' and 'upper'. At least one must be present and a non-null value. The expected data type for these values is defined by the `range` filter's `data_type` (see response linked above). If the data_type is a date, string format should be a parseable ISO8601 date string. Date values should be provided as a string in ISO 8601 format. Leaving a value as null will result in that bound being set to the lowest or highest possible value, depending on whether it is the upper or lower bound.
          - `lower` union — Your selected lower bound for the range.
            - integer
            - string
            - number, double
          - `upper` union — Your selected upper bound for the range.
            - integer
            - string
            - number, double
        - `weightings` object — Ratios to control the distribution of participants across the selected values. Integers and exact quantities are valid inputs.
      - CompositeFilter
        - `filter_id` 'and' | 'or', required — Composite filter group operator. Use `and` when every child filter must match, or `or` when at least one child filter must match.
        - `selected_filters` CompositeFilterSelectedFiltersItems[], required — Child filters in this group. Children can be select filters, range filters, or supported nested composite groups.
          - union
            - SelectFilter
              - …
            - RangeFilter
              - …
            - CompositeFilter — recursive

## Response `201`

Filter set created

- FilterSetsCreateFilterSetResponse201
  - `id` string — ID of the filter set.
  - `version` integer — An incrementing integer indicating the version of the filter set.
  - `is_deleted` boolean — Whether the filter set has been deleted.
  - `is_locked` boolean — Whether the filter set has been locked.
  - `workspace_id` string, nullable — ID of the workspace where the filter set can be used.
  - `organisation_id` string, nullable — ID of the workspace where the filter set can be used.
  - `name` string — Name of the filter set.
  - `description` string, nullable — Description of the filter set.
  - `filters` ApiV1FilterSetsPostResponsesContentApplicationJsonSchemaFiltersItems[] — List of all filters contained in the filter set.
    - union
      - SelectFilter
        - `filter_id` string, required — ID of the "select" type filter.
        - `selected_values` string[], required — This schema applies for filters of the `select` type, as defined in the [filter list response](\#tag/Filters/paths/~1api~1v1~1filters~1/get). Array of IDs matching the response IDs, from the `select` filter's `choices` (see response linked above). String format should match the `data_type` of the `select` filter's `choices` (see response linked above).
        - `weightings` object — Ratios to control the distribution of participants across the selected values. Integer percentages, floats, and exact quantities are valid inputs.
      - RangeFilter
        - `filter_id` string, required — ID of the "range" type filter.
        - `selected_range` RangeFilterSelectedRange, required — This schema applies for filters of the `range` type, as defined in the [filter list response](\#tag/Filters/paths/~1api~1v1~1filters~1/get). A dictionary with two possible objects, 'lower' and 'upper'. At least one must be present and a non-null value. The expected data type for these values is defined by the `range` filter's `data_type` (see response linked above). If the data_type is a date, string format should be a parseable ISO8601 date string. Date values should be provided as a string in ISO 8601 format. Leaving a value as null will result in that bound being set to the lowest or highest possible value, depending on whether it is the upper or lower bound.
          - `lower` union — Your selected lower bound for the range.
            - integer
            - string
            - number, double
          - `upper` union — Your selected upper bound for the range.
            - integer
            - string
            - number, double
        - `weightings` object — Ratios to control the distribution of participants across the selected values. Integers and exact quantities are valid inputs.
      - CompositeFilter
        - `filter_id` 'and' | 'or', required — Composite filter group operator. Use `and` when every child filter must match, or `or` when at least one child filter must match.
        - `selected_filters` CompositeFilterSelectedFiltersItems[], required — Child filters in this group. Children can be select filters, range filters, or supported nested composite groups.
          - union
            - SelectFilter
              - …
            - RangeFilter
              - …
            - CompositeFilter — recursive
  - `eligible_participant_count` integer — The number of participants who match the filter sets filters. Please note that if the number is lower than 5 the count will be obscured to prevent identification of participants.

## Other responses

- `400` — Error

## Changes

> 11 revisions in range; 8 could not be searched.

- **2026-07-26** `421c6aa415ef` — 2 info
  - added the new optional request property `description`
  - added the optional property `description` to the response with the `201` status

[Change history](https://skmtc.dev/prolific/apis/api-reference/changes/api/v1/filter-sets/post.md)

---

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