For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Go to app
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
    • Introduction
    • Users
    • Taskflow
    • AI Task Builder
    • Studies
    • Representative sample studies
    • study-collections
    • Filter Sets
      • GETList all filter sets
      • POSTCreate filter set
      • GETGet filter set
      • DELDelete filter set
      • PATCHUpdate filter set
      • POSTClone filter set
      • POSTLock filter set for editing
      • POSTUnlock filter set for editing
    • Participant Groups
    • Custom Groups
    • Study Distribution
    • Submissions
    • Bonuses
    • Messages
    • Workspaces
    • Projects
    • Surveys
    • Webhooks
    • Invitations
    • Reward Recommendations
    • Testing
    • Well Known Endpoints
Go to app
LogoLogo
API ReferenceFilter Sets

Update filter set

|View as Markdown|Open in Claude|
PATCH
https://api.prolific.com/api/v1/filter-sets/:id/
PATCH
/api/v1/filter-sets/:id/
$curl -X PATCH https://api.prolific.com/api/v1/filter-sets/id/ \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "0": {
> "name": "Left-handed 30-somethings",
> "filters": [
> {
> "id": "handedness",
> "selected_values": [
> "1"
> ]
> },
> {
> "id": "age",
> "selected_range": {
> "lower": 30,
> "upper": 39
> }
> }
> ]
> }
>}'
1{
2 "id": "644ab312af6bbc363b9d47c7",
3 "workspace_id": "644aaabfaf6bbc363b9d47c6",
4 "name": "Left-handed 30-somethings",
5 "filters": [
6 {
7 "filter_id": "handedness",
8 "selected_values": [
9 "1"
10 ]
11 },
12 {
13 "filter_id": "age",
14 "selected_range": {
15 "lower": 30,
16 "upper": 39
17 }
18 }
19 ],
20 "eligible_participant_count": 123
21}
Update the details of a filter set.
Was this page helpful?
Previous

Delete filter set

Next

Clone filter set

Authentication

AuthorizationToken
The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings. Your API token does not have an expiry date and carries full permission, so be sure to keep them secure. If your token is leaked, delete it and create a new one directly in the app. In your requests add `Authorization` header with the value `Token <your token>`.

Path parameters

idstringRequired
ID of the filter set.

Request

This endpoint expects an object.
namestringOptional
Name of the filter set.
filterslist of objectsOptional
List of all filters contained in the filter set.

Response

Filter set updated
idstring
ID of the filter set.
versioninteger
An incrementing integer indicating the version of the filter set.
is_deletedboolean
Whether the filter set has been deleted.
is_lockedboolean
Whether the filter set has been locked.
workspace_idstring or null
ID of the workspace where the filter set can be used.
organisation_idstring or null
ID of the workspace where the filter set can be used.
namestring
Name of the filter set.
filterslist of objects
List of all filters contained in the filter set.
eligible_participant_countinteger
The number of participants who match the filter sets filters. Please note that if the number is lower than 25 the count will be obscured to prevent identification of participants.

Errors

4XX
Client Request Error

The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings.

Your API token does not have an expiry date and carries full permission, so be sure to keep them secure.

If your token is leaked, delete it and create a new one directly in the app.

In your requests add Authorization header with the value Token <your token>.