Prolific

Research participant recruitment platform

docs.prolific.com ↗
Version
1.0
OpenAPI
3.0.1
Endpoints
78
Schemas
115
Updated
3 days ago
Research research surveys participants
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.prolific.com

Authentication

apiKey

Endpoints

Bonuses 2 endpoints

POST /api/v1/bulk-bonus-payments/{id}/pay

Bonus payments are made asynchronously. The payment will be done in the following minutes and your balance will be updated accordingly.

operationId: Bonuses_makePayment

Parameters

Name In Required Type Description
id path required string Bulk bonus payment id

Responses

4XX Error
202 Successfully recieved bonus payments request. The bonuses will be paid asynchronously.
POST /api/v1/bulk-bonus-payments/{id}/pay
POST /api/v1/submissions/bonus-payments

Set up bonus payments to one or more participants/submissions in a study. You need the study id, the participant|submission ids and the request in CSV format. The csv_bonuses field needs to be structured in the format of either: - `<participant_id>,<amount>\n`. - `<submission_id>,<amount>\n`. Setting up a bonus payment does not actually pay them, to do so check [/api/v1/bulk-bonus-payments/{id}/pay/](https://docs.prolific.com) The submission and participant IDs need to have taken part in the study in order for this call to be successful. If not, you will get a "400" HTTP response back, which explains which IDs are incorrect.

operationId: Bonuses_setUpPayments

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/BonusesSetUpPaymentsRequest"
      }
    }
  },
  "required": false
}

Responses

4XX Error
201 Bonus created
POST /api/v1/submissions/bonus-payments

Filter sets 8 endpoints

GET /api/v1/filter-sets

List of all filter sets in the specified workspace.

operationId: FilterSets_listAll

Parameters

Name In Required Type Description
workspace_id query optional string ID of the workspace to get filter sets for.
organisation_id query optional string ID of the organisation to get filter sets for.

Responses

4XX Error
200 List of filter sets
GET /api/v1/filter-sets
POST /api/v1/filter-sets

Create a filter set from a list of filters

operationId: FilterSets_createFromFilters

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateFilterSet"
      },
      "examples": {
        "ambidextrous_teenagers": {
          "value": {
            "name": "Ambidextrous teenagers",
            "filters": [
              {
                "filter_id": "handedness",
                "selected_values": [
                  "1"
                ]
              },
              {
                "filter_id": "age",
                "selected_range": {
                  "lower": 19,
                  "upper": 22
                }
              }
            ],
            "workspace_id": "644aaabfaf6bbc363b9d47c6"
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Filter set created
POST /api/v1/filter-sets
DELETE /api/v1/filter-sets/{id}

Delete a filter set.

operationId: FilterSets_deleteSet

Parameters

Name In Required Type Description
id path required string ID of the filter set.

Responses

4XX Error
204 Deleted the filter set
DELETE /api/v1/filter-sets/{id}
GET /api/v1/filter-sets/{id}

Get details of a filter set.

operationId: FilterSets_getDetails

Parameters

Name In Required Type Description
id path required string ID of the filter set.
version_number query optional integer Allows you to specify a specific version of the filter set to retrieve.

Responses

4XX Error
200 Filter set details
GET /api/v1/filter-sets/{id}
PATCH /api/v1/filter-sets/{id}

Update the details of a filter set.

operationId: FilterSets_updateDetails

Parameters

Name In Required Type Description
id path required string ID of the filter set.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UpdateFilterSet"
      }
    }
  }
}

Responses

4XX Error
200 Filter set updated
PATCH /api/v1/filter-sets/{id}
POST /api/v1/filter-sets/{id}/clone

Create a copy of a filter set.

operationId: FilterSets_cloneFilterSet

Parameters

Name In Required Type Description
id path required string ID of the filter set.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/FilterSetsCloneFilterSetRequest"
      }
    }
  }
}

Responses

4XX Error
201 Filter set cloned
POST /api/v1/filter-sets/{id}/clone
POST /api/v1/filter-sets/{id}/lock

Lock the filter set for editing.

operationId: FilterSets_lockForEditing

Parameters

Name In Required Type Description
id path required string ID of the filter set.

Responses

4XX Error
200 Filter set locked
POST /api/v1/filter-sets/{id}/lock
POST /api/v1/filter-sets/{id}/unlock

Unlock the filter set for editing.

operationId: FilterSets_unlockForEditing

Parameters

Name In Required Type Description
id path required string ID of the filter set.

Responses

4XX Error
200 Filter set locked
POST /api/v1/filter-sets/{id}/unlock

Filters 2 endpoints

POST /api/v1/eligibility-count

Count how many participants meet all the given filters. Only participants that pass **every one** of the filters are counted. Zero means that there are less than 25 participants. We do not show lower numbers to protect the privacy of the participants. To see a list of filters that may be passed to this endpoint, see the documentation for filters.

operationId: Filters_countParticipantsMeetingFilters

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/RequirementsCountRequest"
      },
      "examples": {
        "empty_requirements": {
          "value": {
            "filters": [],
            "workspace_id": "645e4403bdd06d5f66d8fbd8"
          }
        },
        "filters_requirements_request": {
          "value": {
            "filters": [
              {
                "filter_id": "favourite_colour",
                "selected_values": [
                  "0",
                  "1"
                ]
              },
              {
                "filter_id": "previous_studies_allowlist",
                "selected_values": [
                  "645e4403bdd06d5f66d8fbde",
                  "645e4403bdd06d5f66d8fbdf"
                ]
              },
              {
                "filter_id": "approval_rate",
                "selected_range": {
                  "lower": 10,
                  "upper": 80
                }
              }
            ],
            "workspace_id": "645e4403bdd06d5f66d8fbd8"
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
200 Count
POST /api/v1/eligibility-count
GET /api/v1/filters

List all filters that can be applied to your filter sets or studies.

operationId: Filters_listAll

Parameters

Name In Required Type Description
detailed query optional string Include extra information required to sort and categorise filters in the Prolific app. This is not required for API use. Default false.
workspace_id query optional string The workspace ID for the workspace you are creating a study or filterset in. This is used to get contextual data such as previous studies and participant groups.

Responses

4XX Error
200 List of filters
GET /api/v1/filters

Hooks 10 endpoints

GET /api/v1/hooks/event-types

You can subscribe to any of the event types defined in this response.

operationId: Hooks_listEventTypes

Responses

4XX Error
200 List of event types that can be subscribed to.
GET /api/v1/hooks/event-types
GET /api/v1/hooks/secrets

A view of all the secrets for the workspaces you belong to.

operationId: Hooks_listSecrets

Parameters

Name In Required Type Description
workspace_id query required string

Responses

4XX Error
200 Retrieved
GET /api/v1/hooks/secrets
POST /api/v1/hooks/secrets

Generate a secret for verifying the request signature header of the subscription payload. If a secret already exists, this call will delete the old secret and create a new one.

operationId: Hooks_createSecret

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateSecret"
      },
      "examples": {
        "create_secret": {
          "value": {
            "workspace_id": "63519c1d5b139662f8cde482"
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Generated
POST /api/v1/hooks/secrets
GET /api/v1/hooks/subscriptions

A view of all subscriptions you have created.

operationId: Hooks_getAllSubscriptions

Parameters

Name In Required Type Description
is_enabled query optional boolean A filter to only pull back enabled subscriptions. Default true.
workspace_id query optional string The Workspace ID we want to get the subscriptions for. If not given, the subscriptions for all of your workspaces will be returned.

Responses

4XX Error
200 List of subscriptions
GET /api/v1/hooks/subscriptions
POST /api/v1/hooks/subscriptions

Create a subscription for an event type. When an event is triggered in the Prolific system, the hook will automatically notify the specified target URL. Before creating a subscription, you must ensure that you have created a secret for your workspace.

operationId: Hooks_createSubscription

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubscriptionDetail"
      },
      "examples": {
        "subscription_for_study_publish": {
          "value": {
            "event_type": "study.status.change",
            "target_url": "https://example.com/api/v1/studies/",
            "workspace_id": "63722982f9cc073ecc730f6b"
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Created
POST /api/v1/hooks/subscriptions
DELETE /api/v1/hooks/subscriptions/{subscription_id}

If you no longer require to be notified of a certain event type, you can delete a subscription. If you want to temporarily pause notifications, you can use the PATCH request documented.

operationId: Hooks_deleteSubscription

Parameters

Name In Required Type Description
subscription_id path required string Subscription id

Responses

4XX Error
204 Deleted
DELETE /api/v1/hooks/subscriptions/{subscription_id}
GET /api/v1/hooks/subscriptions/{subscription_id}

Get a single subscription

operationId: Hooks_getSubscription

Parameters

Name In Required Type Description
subscription_id path required string Subscription id

Responses

4XX Error
200 Retrieved
GET /api/v1/hooks/subscriptions/{subscription_id}
PATCH /api/v1/hooks/subscriptions/{subscription_id}

This allows you to update a subscription. For example you can temporarily disable a subscription if you wish.

operationId: Hooks_updateSubscription

Parameters

Name In Required Type Description
subscription_id path required string Subscription id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubscriptionUpdateDetail"
      },
      "examples": {
        "subscription_disable": {
          "value": {
            "event_type": "study.status.change",
            "is_enabled": false,
            "target_url": "https://example.com/api/v1/studies/"
          }
        },
        "subscription_update_target": {
          "value": {
            "event_type": "study.status.change",
            "is_enabled": false,
            "target_url": "https://anotherexample.com/api/v1/"
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Updated
PATCH /api/v1/hooks/subscriptions/{subscription_id}
POST /api/v1/hooks/subscriptions/{subscription_id}

Confirm a subscription to an event type

operationId: Hooks_confirmSubscription

Parameters

Name In Required Type Description
subscription_id path required string Subscription id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubscriptionDetail"
      },
      "examples": {
        "hook_update_target": {
          "value": {
            "event_type": "study.status.change",
            "is_enabled": false,
            "target_url": "https://anotherexample.com/api/v1/",
            "workspace_id": "63722982f9cc073ecc730f6b"
          }
        },
        "subscription_disable": {
          "value": {
            "event_type": "study.status.change",
            "is_enabled": false,
            "target_url": "https://example.com/api/v1/studies/",
            "workspace_id": "63722982f9cc073ecc730f6b"
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Confirmed
POST /api/v1/hooks/subscriptions/{subscription_id}
GET /api/v1/hooks/subscriptions/{subscription_id}/events

Get all of the events that have triggered for the given subscription.

operationId: Hooks_getSubscriptionEvents

Parameters

Name In Required Type Description
subscription_id path required string Subscription id
offset query optional integer
limit query optional integer
status query optional string Filter events by status. Accepts a single status or a JSON array of statuses as a string.
resource_id query optional string Filter events by the ID of the resource for which the event was sent.

Responses

4XX Error
200 Retrieved
GET /api/v1/hooks/subscriptions/{subscription_id}/events

Invitations 1 endpoints

POST /api/v1/invitations

Initiate a new invitation process for adding users to a Workspace or Project. This operation can be performed only by authenticated users who are admins for the specified workspace. Invitations will be sent to the email addresses provided in the request.

operationId: Invitations_initiateProcess

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateInvitationRequest"
      }
    }
  },
  "required": true
}

Responses

4XX Error
201 Invitation created successfully
POST /api/v1/invitations

Messages 4 endpoints

GET /api/v1/messages

Get messages between you and another user or your messages with all users.

operationId: Messages_getMessages

Parameters

Name In Required Type Description
user_id query optional string Another user ID, must be provided if no created_after date is provided.
created_after query optional string Only fetch messages created after timestamp. Datetime in ISO8601 format. Must be provided if no user_id is provided. You can only fetch up to the last 30 days of messages.

Responses

4XX Error
200 Messages
GET /api/v1/messages
POST /api/v1/messages

Send a message to a participant or another researcher

operationId: Messages_sendNewMessage

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SendMessage"
      },
      "examples": {
        "message_one_participant": {
          "value": {
            "body": "Thanks for participating in my study",
            "study_id": "719e049f7648a4e1f8f3645a",
            "recipient_id": "619e049f7648a4e1f8f3645b"
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
204 The message has been sent
POST /api/v1/messages
POST /api/v1/messages/bulk

Send a message to multiple participants.

operationId: Messages_sendToMultipleParticipants

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SendBulkMessage"
      },
      "examples": {
        "message_multiple_participants": {
          "value": {
            "ids": [
              "619e049f7648a4e1f8f3645b",
              "619e049f7648a4e1f8f3645c",
              "619e049f7648a4e1f8f3645d"
            ],
            "body": "Thanks for participating in my study",
            "study_id": "6569ece7ca177d19117b1b95"
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
204 The message has been sent
POST /api/v1/messages/bulk
GET /api/v1/messages/unread

Get all unread messages. The messages you have sent are never returned, only messages you have received and not read. It does not mark those messages as read.

operationId: Messages_getUnread

Responses

4XX Error
200 Messages
GET /api/v1/messages/unread

Participant groups 8 endpoints

GET /api/v1/participant-groups
operationId: ParticipantGroups_listAll

Parameters

Name In Required Type Description
active query optional string Filter by the active (not deleted) status of the participant group.
filter query required

Responses

4XX Error
200 Request successful.
GET /api/v1/participant-groups
POST /api/v1/participant-groups
operationId: ParticipantGroups_createNewGroup

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ParticipantGroupsCreateNewGroupRequest"
      },
      "examples": {
        "create_a_participant_group": {
          "value": {
            "name": "Group 1",
            "description": "Participants with confirmed special dietary requirements.",
            "workspace_id": "5e9b9c9b0f9c9a0001b1ca2f"
          },
          "summary": "Create a participant group"
        },
        "create_a_participant_group_with_participants": {
          "value": {
            "name": "Group 1",
            "description": "Participants with confirmed special dietary requirements.",
            "workspace_id": "5e9b9c9b0f9c9a0001b1ca2f",
            "participant_ids": [
              "5e9b9c9b0f9c9a0001b0b1f4",
              "5e9b9c9b0f9c9a0001b0b1f5",
              "5e9b9c9b0f9c9a0001b0b1f6"
            ]
          },
          "summary": "Create a participant group with participants"
        }
      }
    }
  },
  "required": true
}

Responses

4XX Error
201 Participant group created
POST /api/v1/participant-groups
DELETE /api/v1/participant-groups/{id}
operationId: ParticipantGroups_removeGroup

Parameters

Name In Required Type Description
id path required string The id of the participant group

Responses

4XX Error
204 Deleted
DELETE /api/v1/participant-groups/{id}
GET /api/v1/participant-groups/{id}
operationId: ParticipantGroups_getById

Parameters

Name In Required Type Description
id path required string The id of the participant group

Responses

4XX Error
200 Request successful.
GET /api/v1/participant-groups/{id}
PATCH /api/v1/participant-groups/{id}
operationId: ParticipantGroups_updateGroupById

Parameters

Name In Required Type Description
id path required string The id of the participant group

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ParticipantGroupUpdate"
      },
      "examples": {
        "update_participant_group_name": {
          "value": {
            "name": "Passed all attention checks"
          }
        },
        "update_participant_group_description": {
          "value": {
            "description": "Participants who passed all attention checks"
          }
        },
        "overwrite_participant_group_participants": {
          "value": {
            "participant_ids": [
              "5e9b9c9b0f9c9a0001b0b1f4",
              "5e9b9c9b0f9c9a0001b0b1f5",
              "5e9b9c9b0f9c9a0001b0b1f6"
            ]
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Request successful.
PATCH /api/v1/participant-groups/{id}
DELETE /api/v1/participant-groups/{id}/participants

Remove specified participants from a participant group if they are members. If a participant is not a member of the group, they will be ignored.

operationId: ParticipantGroups_removeParticipants

Parameters

Name In Required Type Description
id path required string The id of the participant group to remove the participant(s) from

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ParticipantIDList"
      },
      "examples": {
        "remove_multiple_participants_from_a_participant_group": {
          "value": {
            "participant_ids": [
              "5e9b9c9b0f9c9a0001b0b1f4",
              "5e9b9c9b0f9c9a0001b0b1f5",
              "5e9b9c9b0f9c9a0001b0b1f6"
            ]
          },
          "summary": "Remove multiple participants from a participant group"
        }
      }
    }
  },
  "required": true
}

Responses

4XX Error
200 All participant(s) now in participant group
DELETE /api/v1/participant-groups/{id}/participants
GET /api/v1/participant-groups/{id}/participants
operationId: ParticipantGroups_getAllParticipants

Parameters

Name In Required Type Description
id path required string The id of the participant group to get participants for

Responses

4XX Error
200 Request successful.
GET /api/v1/participant-groups/{id}/participants
POST /api/v1/participant-groups/{id}/participants

Append participants to a participant group if they are not already members. If a participant is already a member of the group, they will be ignored.

operationId: ParticipantGroups_addParticipantsToGroup

Parameters

Name In Required Type Description
id path required string The id of the participant group to add the participant to

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ParticipantIDList"
      },
      "examples": {
        "add_multiple_participants_to_a_participant_group": {
          "value": {
            "participant_ids": [
              "5e9b9c9b0f9c9a0001b0b1f4",
              "5e9b9c9b0f9c9a0001b0b1f5",
              "5e9b9c9b0f9c9a0001b0b1f6"
            ]
          },
          "summary": "Add multiple participants to a participant group"
        }
      }
    }
  },
  "required": true
}

Responses

4XX Error
200 All participant(s) now in participant group
POST /api/v1/participant-groups/{id}/participants

Projects 4 endpoints

GET /api/v1/projects/{project_id}

Gets a project's details

operationId: Projects_getDetails

Parameters

Name In Required Type Description
project_id path required string Project id

Responses

4XX Error
200 Success
GET /api/v1/projects/{project_id}
PATCH /api/v1/projects/{project_id}

Update a project's details

operationId: Projects_updateDetails

Parameters

Name In Required Type Description
project_id path required string Project id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Project"
      },
      "examples": {
        "update_project_title": {
          "value": {
            "id": "63722982f9cc073ecc730f6bX",
            "title": "My new project"
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Updated project redirect link
PATCH /api/v1/projects/{project_id}
GET /api/v1/workspaces/{workspace_id}/projects

Gets a list of all the projects within the workspace.

operationId: Projects_getWorkspaceProjects

Parameters

Name In Required Type Description
workspace_id path required string Workspace id

Responses

4XX Error
200 Success
GET /api/v1/workspaces/{workspace_id}/projects
POST /api/v1/workspaces/{workspace_id}/projects

Creates a new project within the workspace. When this project is created, it adds the user as a Project Editor.

operationId: Projects_createNewProject

Parameters

Name In Required Type Description
workspace_id path required string Workspace id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateProject"
      },
      "examples": {
        "simple_project_post": {
          "value": {
            "title": "My new project"
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Successfully created project.
POST /api/v1/workspaces/{workspace_id}/projects

Studies 11 endpoints

GET /api/v1/projects/{project_id}/studies

List all of your studies in a project.

operationId: Studies_listInProject

Parameters

Name In Required Type Description
project_id path required string Project id

Responses

4XX Error
200 List of studies for the given project
GET /api/v1/projects/{project_id}/studies
GET /api/v1/studies

List all studies, with the option to filter by study status.

operationId: Studies_listAll

Parameters

Name In Required Type Description
state query optional string Filter studies by status. Accepts a string in the format "(active|published|...)", where "active" and "published" are example statuses.

Responses

4XX Error
200 List of studies
GET /api/v1/studies
POST /api/v1/studies

Create a draft study. Publishing a study is a two step process, first create a draft study then publish it.

operationId: Studies_createDraftStudy

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateStudy"
      },
      "examples": {
        "minimal_study": {
          "value": {
            "name": "Test",
            "reward": 100,
            "filters": [],
            "description": "test",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "MANUALLY_REVIEW"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_in_project": {
          "value": {
            "name": "Study in project",
            "reward": 100,
            "filters": [],
            "project": "619e049f7648a4e1f8f3645b",
            "description": "study in project",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              },
              {
                "code": "DEF234",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  },
                  {
                    "action": "ADD_TO_PARTICIPANT_GROUP",
                    "participant_group": "619e049f7648a4e1f8f3645b"
                  }
                ],
                "code_type": "FOLLOW_UP_STUDY"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_for_everybody": {
          "value": {
            "name": "Study about API's",
            "reward": 100,
            "filters": [],
            "description": "This study aims to determine how to make a good public API",
            "internal_name": "WIT-2021 Study about API's version 2",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              },
              {
                "code": "DEF234",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  },
                  {
                    "action": "ADD_TO_PARTICIPANT_GROUP",
                    "participant_group": "619e049f7648a4e1f8f3645b"
                  }
                ],
                "code_type": "FOLLOW_UP_STUDY"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
            "prolific_id_option": "url_parameters",
            "device_compatibility": [
              "desktop"
            ],
            "total_available_places": 30,
            "peripheral_requirements": [],
            "estimated_completion_time": 5
          }
        },
        "study_with_allow_list": {
          "value": {
            "name": "Study about API's for selected participants",
            "reward": 13,
            "filters": [
              {
                "filter_id": "custom_allowlist",
                "selected_values": [
                  "619e049f7648a4e1f8f3645b"
                ]
              }
            ],
            "description": "This study aims to determine how to make a good public API",
            "internal_name": "WIT-2022 Study about API's version 2",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              },
              {
                "code": "DEF234",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  },
                  {
                    "action": "ADD_TO_PARTICIPANT_GROUP",
                    "participant_group": "619e049f7648a4e1f8f3645b"
                  }
                ],
                "code_type": "FOLLOW_UP_STUDY"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 30,
            "peripheral_requirements": [],
            "estimated_completion_time": 5
          }
        },
        "study_with_filter_set": {
          "value": {
            "name": "Test",
            "reward": 13,
            "description": "test",
            "filter_set_id": "644b9cace850cb37684f0892",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "MANUALLY_REVIEW"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "multi_submission_study": {
          "value": {
            "name": "A multiple submission study",
            "reward": 13,
            "filters": [],
            "description": "Allow a participant to have multiple submissions up to 10 on the study",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "submissions_config": {
              "max_submissions_per_participant": 10
            },
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_with_range_filters": {
          "value": {
            "name": "Test",
            "reward": 13,
            "filters": [
              {
                "filter_id": "age",
                "selected_range": {
                  "lower": 18,
                  "upper": 19
                }
              }
            ],
            "description": "test",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "MANUALLY_REVIEW"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_with_select_filters": {
          "value": {
            "name": "Test",
            "reward": 13,
            "filters": [
              {
                "filter_id": "handedness",
                "selected_values": [
                  "2"
                ]
              }
            ],
            "description": "test",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "MANUALLY_REVIEW"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_with_blocked_studies": {
          "value": {
            "name": "Study about APIs with blocked studies",
            "reward": 100,
            "filters": [
              {
                "filter_id": "previous_studies_blocklist",
                "selected_values": [
                  "619e049f7648a4e1f8f3645b"
                ]
              }
            ],
            "description": "This study is not accessible to participants of studies 319e049f7648a4e1f8f3645a and 919e049f7648a4e1f8f3645d",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              },
              {
                "code": "DEF234",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  },
                  {
                    "action": "ADD_TO_PARTICIPANT_GROUP",
                    "participant_group": "619e049f7648a4e1f8f3645b"
                  }
                ],
                "code_type": "FOLLOW_UP_STUDY"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 30,
            "peripheral_requirements": [],
            "estimated_completion_time": 5
          }
        },
        "study_labelled_as_interview": {
          "value": {
            "name": "Video Interview",
            "reward": 100,
            "filters": [],
            "description": "In this study you will join a video call where we'll ask you some questions.",
            "study_labels": [
              "interview"
            ],
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "MANUALLY_REVIEW"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_with_weighted_filters": {
          "value": {
            "name": "Test",
            "reward": 13,
            "filters": [
              {
                "filter_id": "handedness",
                "weightings": {
                  "0": 0.5,
                  "1": 0.5
                },
                "selected_values": [
                  "1",
                  "2"
                ]
              }
            ],
            "description": "test",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "MANUALLY_REVIEW"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://google.com",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 500,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "multiple_participant_groups_either_or": {
          "value": {
            "name": "Example where a participant can be in either participant group",
            "reward": 100,
            "filters": [
              {
                "filter_id": "participant_group_allowlist",
                "selected_values": [
                  "64514609c0265e1da4a74127",
                  "64660e2e0ce5307750bf5c99"
                ]
              }
            ],
            "description": "A participant can be in either of these groups to gain study access",
            "internal_name": "Study with multiple participant groups",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 30,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        },
        "study_with_participant_group_allow_list": {
          "value": {
            "name": "Study about API's for participants in my participant group",
            "reward": 13,
            "filters": [
              {
                "filter_id": "participant_group_allowlist",
                "selected_values": [
                  "619e049f7648a4e1f8f3645b"
                ]
              }
            ],
            "description": "This study aims to determine how to make a good public API",
            "internal_name": "WIT-2022 Study about API's version 2",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              },
              {
                "code": "DEF234",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  },
                  {
                    "action": "ADD_TO_PARTICIPANT_GROUP",
                    "participant_group": "619e049f7648a4e1f8f3645b"
                  }
                ],
                "code_type": "FOLLOW_UP_STUDY"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 30,
            "peripheral_requirements": [],
            "estimated_completion_time": 5
          }
        },
        "multiple_participant_groups_exclusive_to_both": {
          "value": {
            "name": "Example where a participant has to be in both participant groups",
            "reward": 100,
            "filters": [
              {
                "filter_id": "participant_group_allowlist",
                "selected_values": [
                  "64514609c0265e1da4a74127"
                ]
              },
              {
                "filter_id": "participant_group_allowlist",
                "selected_values": [
                  "64660e2e0ce5307750bf5c99"
                ]
              }
            ],
            "description": "A participant has to be in both groups to gain study access",
            "internal_name": "Study with multiple participant groups",
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              }
            ],
            "completion_option": "url",
            "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
            "prolific_id_option": "question",
            "device_compatibility": [
              "mobile",
              "desktop",
              "tablet"
            ],
            "total_available_places": 30,
            "peripheral_requirements": [],
            "estimated_completion_time": 1
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Created
POST /api/v1/studies
DELETE /api/v1/studies/{id}

Published studies cannot be deleted, but you can delete draft studies.

operationId: Studies_deleteStudy

Parameters

Name In Required Type Description
id path required string Study id

Responses

4XX Error
200 Deleted
DELETE /api/v1/studies/{id}
GET /api/v1/studies/{id}

Retrieve a study by id. If you are polling the API for updates to a study, consider using a [Hook](https://docs.prolific.com). We will call your endpoint when certain events occur on your study, such as new completed submissions or changes in status.

operationId: Studies_getById

Parameters

Name In Required Type Description
id path required string Study id

Responses

4XX Error
200 Found
GET /api/v1/studies/{id}
PATCH /api/v1/studies/{id}

You can update any field for a draft study. Once the study has been published only the following fields can be updated with some restrictions: - internal_name: Internal name of the study, not shown to participants - total_available_places: Only increasing is allowed. A completed study will become active again and resume recruiting of participants. For more information, check the [guide](https://researcher-help.prolific.com/hc/en-gb/articles/360009222553)

operationId: Studies_updateStudyDetails

Parameters

Name In Required Type Description
id path required string Study id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/BaseStudy"
      },
      "examples": {
        "increase_places": {
          "value": {
            "total_available_places": 200
          }
        },
        "update_internal_name": {
          "value": {
            "internal_name": "new_internal_name"
          }
        },
        "update_completion_codes": {
          "value": {
            "completion_codes": [
              {
                "code": "ABC123",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  }
                ],
                "code_type": "COMPLETED"
              },
              {
                "code": "DEF234",
                "actions": [
                  {
                    "action": "AUTOMATICALLY_APPROVE"
                  },
                  {
                    "action": "ADD_TO_PARTICIPANT_GROUP",
                    "participant_group": "619e049f7648a4e1f8f3645b"
                  }
                ],
                "code_type": "FOLLOW_UP_STUDY"
              }
            ]
          }
        },
        "label_study_as_interview": {
          "value": {
            "study_labels": [
              "interview"
            ]
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
200 Updated
PATCH /api/v1/studies/{id}
POST /api/v1/studies/{id}/clone

Duplicating a study can save a lot of time and effort compared to creating a new study from scratch, since all of the information and data from the original study will be carried over to the new study. Additionally, duplicating a study can help ensure that the new study is set up consistently with the original, reducing the risk of errors or inconsistencies. To prevent repeat participation, a block list containing the original study will be added to the duplicated study's filters unless `block_previous_participants` is set to `false` in the request body.

operationId: Studies_duplicateStudy

Parameters

Name In Required Type Description
id path required string Study id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StudiesDuplicateStudyRequest"
      }
    }
  }
}

Responses

4XX Error
200 Duplicated
POST /api/v1/studies/{id}/clone
GET /api/v1/studies/{id}/export

__This is an evolving feature and the exact content of such exports is subject to change, so use at your own risk.__ Download a snapshot of the participants' prescreening responses at the time that they took your study. Specify the optional `?method=EMAIL` query parameter if you want this to be sent to your email. In addition to the responses to all prescreeners applied to the study (subject to change), you'll also have access to the following data: * Submission id * Participant id * Submission status * Started date-time * Expressed in UTC * ISO 8601 formatted * Completed date-time * Expressed in UTC * ISO 8601 formatted * Time taken (in seconds) * Age * Sex * Participants were asked the following question: What is your sex, as recorded on legal/official documents? * First language * Current country of residence * Nationality * Country of birth * Student status * Employment status * Reviewed at date-time * Expressed in UTC * ISO 8601 formatted * Completion code ('entered code') Learn more on [Exporting Prolific demographic data](https://researcher-help.prolific.com/hc/en-gb/articles/360009391633-Exporting-Prolific-demographic-data).

operationId: Studies_downloadDemographicData

Parameters

Name In Required Type Description
id path required string Study id
method query optional string Method

Responses

4XX Error
200 Downloaded
GET /api/v1/studies/{id}/export
GET /api/v1/studies/{id}/submissions

Returns basic information of the submissions, including the study id, participant id, status and start timestamp

operationId: Studies_listSubmissions

Parameters

Name In Required Type Description
id path required string Study id

Responses

4XX Error
200 List submissions
GET /api/v1/studies/{id}/submissions
POST /api/v1/studies/{id}/transition

Once the study is published, participants can partake in your experiment or survey. There are other status transitions available once the study is published: - PAUSE: Pause the study - START: Start a paused study - STOP: Stop a study completely, to make it active again you will need to increase the number of places To learn more about it check out [help center](https://researcher-help.prolific.com/hc/en-gb/articles/360010963354)

operationId: Studies_publishDraftStudy

Parameters

Name In Required Type Description
id path required string Study id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StudyTransition"
      },
      "examples": {
        "stop_study": {
          "value": {
            "action": "STOP"
          }
        },
        "pause_study": {
          "value": {
            "action": "PAUSE"
          }
        },
        "publish_study": {
          "value": {
            "action": "PUBLISH"
          }
        },
        "restart_paused_study": {
          "value": {
            "action": "START"
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
200 Updated
POST /api/v1/studies/{id}/transition
POST /api/v1/study-cost-calculator

Calculate the study cost, including VAT and fees.

operationId: Studies_calculateStudyCostWithVat

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StudyCostRequest"
      },
      "examples": {
        "simple_study_cost": {
          "value": {
            "reward": 100,
            "total_available_places": 5
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
200 Calculated total cost
POST /api/v1/study-cost-calculator

Study collections 6 endpoints

GET /api/v1/study-collections/mutually-exclusive

List studies

operationId: StudyCollections_listMutuallyExclusive

Parameters

Name In Required Type Description
project_id query required string

Responses

4XX Error
200 List of mutually exclusive study collections
GET /api/v1/study-collections/mutually-exclusive
POST /api/v1/study-collections/mutually-exclusive

Create a mutually exclusive study collection. - Studies and study collections must be created separately and then added to the mutually exclusive study collection. - Both the studies and the study collection must be in the same project. - You can only add draft studies to a mutually exclusive study collection. - Adding studies which are already in one study collection to another study collection will remove the study from the original study collection.

operationId: StudyCollections_createMutuallyExclusiveCollection

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MutuallyExclusiveStudyCollectionUpdate"
      },
      "examples": {
        "create_with_studies": {
          "value": {
            "name": "My Mutually Exclusive Study Collection",
            "study_ids": [
              "5f7b9a7b5f7b9a7b5f7b9a7b",
              "5f7b9a7b5f7b9a7b5f7b9a6b"
            ],
            "project_id": "65786062db3b35bcbeb07bcc",
            "description": "This is a description of my mutually exclusive study collection"
          }
        },
        "create_without_studies": {
          "value": {
            "name": "My Mutually Exclusive Study Collection",
            "project_id": "65786062db3b35bcbeb07bcc",
            "description": "This is a description of my mutually exclusive study collection"
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Created
POST /api/v1/study-collections/mutually-exclusive
DELETE /api/v1/study-collections/mutually-exclusive/{id}

Delete a mutually exclusive study collection. This will not delete the studies in the collection. - This can only be completed if the study collection is unpublished. - This will not delete the studies in the collection.

operationId: StudyCollections_deleteMutuallyExclusive

Parameters

Name In Required Type Description
id path required string

Responses

4XX Error
204 Deleted
DELETE /api/v1/study-collections/mutually-exclusive/{id}
GET /api/v1/study-collections/mutually-exclusive/{id}

Get a mutually exclusive study collection

operationId: StudyCollections_getMutuallyExclusive

Parameters

Name In Required Type Description
id path required string

Responses

4XX Error
200 Mutually exclusive study collection
GET /api/v1/study-collections/mutually-exclusive/{id}
PATCH /api/v1/study-collections/mutually-exclusive/{id}

Update a mutually exclusive study collection

operationId: StudyCollections_updateMutuallyExclusive

Parameters

Name In Required Type Description
id path required string

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MutuallyExclusiveStudyCollectionUpdate"
      },
      "examples": {
        "update_name": {
          "value": {
            "name": "My Mutually Exclusive Study Collection"
          }
        },
        "update_studies": {
          "value": {
            "study_ids": [
              "5f7b9a7b5f7b9a7b5f7b9a7b",
              "5f7b9a7b5f7b9a7b5f7b9a6b"
            ]
          }
        },
        "update_description": {
          "value": {
            "description": "This is a description of my mutually exclusive study collection"
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Mutually exclusive study collection
PATCH /api/v1/study-collections/mutually-exclusive/{id}
POST /api/v1/study-collections/mutually-exclusive/{id}/transition

Transition a mutually exclusive study collection. This is used to: - Publish a study collection - Cancel publish a study collection - Schedule publish a study collection - This can be done by setting the publish_at on the study collection at create or patch, then transitioning with the "SCHEDULE_PUBLISH" action - Or optionally the publish_at can be provided directly in the body of the transition request

operationId: StudyCollections_transitionMutuallyExclusive

Parameters

Name In Required Type Description
id path required string

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StudyCollectionsTransitionMutuallyExclusiveRequest"
      },
      "examples": {
        "publish": {
          "value": {
            "action": "PUBLISH"
          }
        },
        "cancel_publish": {
          "value": {
            "action": "CANCEL_PUBLISH"
          }
        },
        "schedule_publish_time_set_in_request": {
          "value": {
            "action": "SCHEDULE_PUBLISH",
            "publish_at": "2050-02-28T13:45:00 Europe/London"
          }
        },
        "schedule_publish_time_already_set_on_collection": {
          "value": {
            "action": "SCHEDULE_PUBLISH"
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Mutually exclusive study collection
POST /api/v1/study-collections/mutually-exclusive/{id}/transition

Submissions 5 endpoints

GET /api/v1/submissions

Returns basic information of the submissions, including the study id, participant id, status and start timestamp

operationId: Submissions_listBasicInfo

Parameters

Name In Required Type Description
study query optional string Optional filter by study ID. This is the ID we pass to the survey platform using %STUDY_ID%

Responses

4XX Error
200 List submissions
GET /api/v1/submissions
POST /api/v1/submissions/bulk-approve

Bulk approve study submissions to pay participants after they have completed your survey or experiment. There are two variant payloads to this request. 1. You can supply a Study ID, and a list of participant IDs, or 2. You can provide a list of submission IDs

operationId: Submissions_bulkApprove

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubmissionsBulkApproveRequest"
      },
      "examples": {
        "bulk_approve_two_participants": {
          "value": {
            "study_id": "60f6acb180a7b59ac0621f9e",
            "participant_ids": [
              "60f25f799fbd8a136cc6a9b0",
              "5ce69ff9b1e73b000146186d"
            ]
          }
        },
        "bulk_approve_multi_submissions": {
          "value": {
            "submission_ids": [
              "60f25f799fbd8a136cc6a9b0",
              "5ce69ff9b1e73b000146186d"
            ]
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Bulk approve in progress
POST /api/v1/submissions/bulk-approve
GET /api/v1/submissions/{id}

Returns the detailed information of a submission, including the study id, participant id, status and start timestamp

operationId: Submissions_getDetail

Parameters

Name In Required Type Description
id path required string Submission id. This is the ID we pass to the survey platform using %SESSION_ID%

Responses

4XX Error
200 Found
GET /api/v1/submissions/{id}
POST /api/v1/submissions/{id}/request-return

**This is an experimental feature that may be subject to change in the future.** <br/> It offers researchers the ability to ask a participant to return a submission. The return reason must be provided in the request and can be any free text string. <br/> The Prolific UI allows users to select any of the following options: * Didn't finish the study * Encountered technical problems * Withdrew consent * Other ( uses the free text input) This constructs a message around the reasons provided so there is no need to provide additional text beyond the reasons. <img alt="Example" src="/assets/img/api/message.png" />

operationId: Submissions_requestReturn

Parameters

Name In Required Type Description
id path required string The submission id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubmissionsRequestReturnRequest"
      }
    }
  },
  "required": true
}

Responses

4XX Error
200 A message is sent to the participant belonging to the submission asking them to return.
POST /api/v1/submissions/{id}/request-return
POST /api/v1/submissions/{id}/transition

Transition a submission to `APPROVED` or `REJECTED`. Once the status is changed, it can not be restored to its previous value. We __strongly__ recommend that, when giving approval to a submission through the API, you first observe the `submission.status.change` [event](https://docs.prolific.com/docs/api-docs/public/#tag/Hooks/paths/~1api~1v1~1hooks~1event-types~1/get) for a status transition to `AWAITING_REVIEW` before making the approval request. Our system is currently unable to process approvals before this transition. Note this endpoint is idempotent, so if you make the same request twice, the second request will be ignored.

operationId: Submissions_transitionById

Parameters

Name In Required Type Description
id path required string Submission id. This is the ID we pass to the survey platform using %SESSION_ID%

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SubmissionTransition"
      },
      "examples": {
        "reject_submission": {
          "value": {
            "action": "REJECT",
            "message": "More than 100 chars long message to amuse the participant with my knowledge of the english language in this funny example",
            "rejection_category": "FAILED_INSTRUCTIONS"
          }
        },
        "approve_submission": {
          "value": {
            "action": "APPROVE"
          }
        }
      }
    }
  },
  "required": false
}

Responses

4XX Error
200 Updated
POST /api/v1/submissions/{id}/transition

Surveys 10 endpoints

GET /api/v1/surveys

Get all the surveys for a researcher.

operationId: Surveys_getAll

Parameters

Name In Required Type Description
researcher_id query required string
offset query optional integer
limit query optional integer

Responses

4XX Error
200 Successful Response
GET /api/v1/surveys
POST /api/v1/surveys

You can create a survey with either `sections -> questions` or just `questions`. This allows you to decide how much flexibility you want in your survey design. However, if you want to render the survey in the Prolific Application, you must use `sections`.

operationId: Surveys_createOrUpdate

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SurveyIn"
      },
      "examples": {
        "with_sections": {
          "value": {
            "title": "A survey with sections and questions",
            "sections": [
              {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                "title": "Root vegetables",
                "questions": [
                  {
                    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08X",
                    "type": "single",
                    "title": "What is your favourite root vegetable?",
                    "answers": [
                      {
                        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08X",
                        "value": "Potato"
                      }
                    ]
                  }
                ]
              }
            ],
            "researcher_id": "7172727272"
          },
          "description": "A survey with sections and questions. This will render in the Prolific Application."
        },
        "without_sections": {
          "value": {
            "title": "A survey with questions",
            "questions": [
              {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08X",
                "type": "single",
                "title": "What is your favourite root vegetable?",
                "answers": [
                  {
                    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08X",
                    "value": "Potato"
                  }
                ]
              }
            ],
            "researcher_id": "7172727272"
          },
          "description": "A survey with questions. This will not render in the Prolific Application."
        }
      }
    }
  },
  "required": true
}

Responses

4XX Error
201 Successful Response
POST /api/v1/surveys
DELETE /api/v1/surveys/{survey_id}

Delete a single Survey.

operationId: Surveys_deleteSingleSurvey

Parameters

Name In Required Type Description
survey_id path required string

Responses

4XX Error
200 Successful Response
DELETE /api/v1/surveys/{survey_id}
GET /api/v1/surveys/{survey_id}

Get a single survey given an ID.

operationId: Surveys_getSurveyById

Parameters

Name In Required Type Description
survey_id path required string

Responses

4XX Error
200 Successful Response
GET /api/v1/surveys/{survey_id}
DELETE /api/v1/surveys/{survey_id}/responses

Delete all the responses for a given Survey.

operationId: Surveys_deleteAllResponses

Parameters

Name In Required Type Description
survey_id path required string

Responses

4XX Error
200 Successful Response
DELETE /api/v1/surveys/{survey_id}/responses
GET /api/v1/surveys/{survey_id}/responses

Get all the responses for a given Survey.

operationId: Surveys_getAllResponses

Parameters

Name In Required Type Description
survey_id path required string

Responses

4XX Error
200 Successful Response
GET /api/v1/surveys/{survey_id}/responses
POST /api/v1/surveys/{survey_id}/responses

Create a Response for a survey.

operationId: Surveys_createResponse

Parameters

Name In Required Type Description
survey_id path required string

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/SurveyResponseIn"
      },
      "examples": {
        "with_sections": {
          "value": {
            "sections": [
              {
                "questions": [
                  {
                    "answers": [
                      {
                        "value": "Potato",
                        "answer_id": "8bde0c5f-235e-41e6-bf82-b73e92852ac8"
                      }
                    ],
                    "question_id": "827e810a-4b1a-40f6-8bc2-c3dd6fcedc25",
                    "question_title": "What is your favourite root vegetable?"
                  }
                ],
                "section_id": "f5e5c4dc-7d2e-40f1-a895-9bb2f8703fd8"
              }
            ],
            "submission_id": "62908f0b98a55b36ac68b992",
            "participant_id": "62908f0b98a55b36ac68b992"
          },
          "description": "A response using sections"
        },
        "without_sections": {
          "value": {
            "questions": [
              {
                "answers": [
                  {
                    "value": "Potato",
                    "answer_id": "8bde0c5f-235e-41e6-bf82-b73e92852ac8"
                  }
                ],
                "question_id": "827e810a-4b1a-40f6-8bc2-c3dd6fcedc25",
                "question_title": "What is your favourite root vegetable?"
              }
            ],
            "submission_id": "62908f0b98a55b36ac68b992",
            "participant_id": "62908f0b98a55b36ac68b992"
          },
          "description": "A survey response using questions"
        }
      }
    }
  },
  "required": true
}

Responses

4XX Error
201 Successful Response
POST /api/v1/surveys/{survey_id}/responses
GET /api/v1/surveys/{survey_id}/responses/summary

Get an aggregated summary of responses for a given survey.

operationId: Surveys_getSummaryResponses

Parameters

Name In Required Type Description
survey_id path required string

Responses

4XX Error
200 Successful response
GET /api/v1/surveys/{survey_id}/responses/summary
DELETE /api/v1/surveys/{survey_id}/responses/{response_id}

Delete a single Response.

operationId: Surveys_deleteResponse

Parameters

Name In Required Type Description
survey_id path required string
response_id path required string

Responses

4XX Error
200 Successful Response
DELETE /api/v1/surveys/{survey_id}/responses/{response_id}
GET /api/v1/surveys/{survey_id}/responses/{response_id}

Get a single response for a survey.

operationId: Surveys_getResponse

Parameters

Name In Required Type Description
survey_id path required string
response_id path required string

Responses

4XX Error
200 Successful Response
GET /api/v1/surveys/{survey_id}/responses/{response_id}

Users 1 endpoints

GET /api/v1/users/me

Use this endpoint to test your token and retrieve the basic information of your account. Add an `Authorization` header with the value `Token <your token>`.

operationId: Users_getUser

Responses

4XX Error
200 Successful Response
GET /api/v1/users/me

Workspaces 5 endpoints

GET /api/v1/workspaces

Gets a list of all workspaces that the user is a member of.

operationId: Workspaces_getAllUserWorkspaces

Responses

4XX Error
200 Success
GET /api/v1/workspaces
POST /api/v1/workspaces

Creates a new workspace and adds the user as a Workspace Admin.

operationId: Workspaces_createWorkspaceAdmin

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateWorkspace"
      },
      "examples": {
        "simple_workspace": {
          "value": {
            "title": "My new workspace"
          }
        },
        "great_british_pounds_workspace": {
          "value": {
            "title": "My workspace using British Pounds",
            "currency_code": "GBP"
          }
        },
        "united_states_dollars_workspace": {
          "value": {
            "title": "My workspace using US Dollars",
            "currency_code": "USD"
          }
        }
      }
    }
  }
}

Responses

4XX Error
201 Created workspace
POST /api/v1/workspaces
GET /api/v1/workspaces/{workspace_id}

Gets a workspace's details

operationId: Workspaces_getDetails

Parameters

Name In Required Type Description
workspace_id path required string Workspace id

Responses

4XX Error
200 Success
GET /api/v1/workspaces/{workspace_id}
PATCH /api/v1/workspaces/{workspace_id}

Updates a workspace's details.

operationId: Workspaces_updateDetails

Parameters

Name In Required Type Description
workspace_id path required string Workspace id

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Workspace"
      },
      "examples": {
        "update_workspace_title": {
          "value": {
            "id": "63722982f9cc073ecc730f6b",
            "title": "My new workspace"
          }
        }
      }
    }
  }
}

Responses

4XX Error
200 Updated workspace redirect link
PATCH /api/v1/workspaces/{workspace_id}
GET /api/v1/workspaces/{workspace_id}/balance

Provides details of the funds available in the workspace.

operationId: Workspaces_getBalance

Parameters

Name In Required Type Description
workspace_id path required string Workspace id

Responses

4XX Error
200 Success
GET /api/v1/workspaces/{workspace_id}/balance

Schemas

object AddToParticipantGroup
{
  "type": "object",
  "required": [
    "action",
    "participant_group"
  ],
  "properties": {
    "action": {
      "enum": [
        "ADD_TO_PARTICIPANT_GROUP"
      ],
      "type": "string",
      "description": "The action to take"
    },
    "participant_group": {
      "type": "string",
      "example": "636e4f379e7d29c6875313e3",
      "description": "The participant group to add the participant to."
    }
  }
}
object Attribute
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Attribute name. It is mandatory for some type of requirements,\nlike AgeRangeEligibilityRequirement."
    },
    "index": {
      "type": "number",
      "example": 5,
      "description": "Attribute index. It is mandatory for some type of requirements,\nlike SelectAnswerEligibilityRequirement."
    },
    "value": {
      "oneOf": [
        {
          "type": "object",
          "nullable": true
        },
        {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object"
              }
            ]
          },
          "nullable": true
        },
        {
          "type": "string",
          "nullable": true
        },
        {
          "type": "number",
          "nullable": true
        },
        {
          "type": "boolean"
        }
      ],
      "example": "true",
      "x-nullable": true,
      "description": "Attribute value. It can be null, a number, a date or a boolean depending on the type of requirement.\nFor boolean values, there is no need to specify all false (non selected) options."
    }
  },
  "additionalProperties": true
}
object AutomaticallyApprove
{
  "type": "object",
  "required": [
    "action"
  ],
  "properties": {
    "action": {
      "enum": [
        "AUTOMATICALLY_APPROVE"
      ],
      "type": "string",
      "description": "The action to take"
    }
  }
}
object BaseStudy
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Public name or title of the study"
    },
    "reward": {
      "type": "number",
      "description": "How much are you going to pay the participants in cents. We\nuse the currency of your account."
    },
    "filters": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SelectFilter"
          },
          {
            "$ref": "#/components/schemas/RangeFilter"
          }
        ]
      },
      "nullable": true,
      "description": "Array of filters.\n\nUse empty array for \"Everyone\""
    },
    "project": {
      "type": "string",
      "description": "Project id, this is optional and if not supplied with be the put in the default workspace and project."
    },
    "metadata": {
      "type": "string",
      "nullable": true,
      "description": "This field can be used to store extra information required for a system integration.\nFor example, it could be some JSON, XML, an integer, or a string.\n\nExamples could include:\n\n  - `123345` - An ID from your system, that helps with linkage when returning the study.\n  - `{ \\\"id\\\": \\\"45\\\", \\\"type\\\": \\\"finance\\\"}` - Some JSON that you want to store."
    },
    "description": {
      "type": "string",
      "description": "Description of the study for the participants to read before\nstarting the study"
    },
    "study_labels": {
      "type": "array",
      "items": {
        "enum": [
          "survey",
          "writing_task",
          "annotation",
          "interview",
          "other"
        ],
        "type": "string"
      },
      "description": "This field allows you to tag studies with information about the type/topic of the study and the kind of work involved in completing it.\n\nWe plan to make this information available to participants for easier self-selection. At present these options are mutually exclusive and only a single option can be selected, however in the future available categories will expand."
    },
    "filter_set_id": {
      "type": "string",
      "nullable": true,
      "description": "The ID of a filter set, from which filters for the study will be taken.\n\nNote, this cannot be used in combination with additional filters via the `filters` field."
    },
    "internal_name": {
      "type": "string",
      "nullable": true,
      "description": "Internal name of the study, not shown to participants"
    },
    "completion_codes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "code",
          "code_type",
          "actions"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "The code the participant will either enter manually at the end of your study or be redirected as part of the return URL."
          },
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AutomaticallyApprove"
                },
                {
                  "$ref": "#/components/schemas/AddToParticipantGroup"
                },
                {
                  "$ref": "#/components/schemas/RemoveFromParticipantGroup"
                },
                {
                  "$ref": "#/components/schemas/ManuallyReview"
                },
                {
                  "$ref": "#/components/schemas/RequestReturn"
                }
              ]
            },
            "description": "The actions that will be completed automatically when the submission is completed with this code.\n\nYou can specify as many actions as you like. For a basic approach where all submissions are left for manual approval, set the `{\"action\": \"MANUALLY_REVIEW\"}` option only.."
          },
          "code_type": {
            "enum": [
              "COMPLETED",
              "FAILED_ATTENTION_CHECK",
              "FOLLOW_UP_STUDY",
              "GIVE_BONUS",
              "INCOMPATIBLE_DEVICE",
              "NO_CONSENT",
              "OTHER"
            ],
            "type": "string",
            "description": "A name for your code to make it easier to understand its intention. Either use one of the predefined options or any other free text."
          }
        }
      },
      "description": "Specify at least one completion code for your study. A participant will enter one of these codes when they complete your study.\n\nEach code must be unique within a study.\n\nYou can specify as many actions as you like per code."
    },
    "content_warnings": {
      "type": "array",
      "items": {
        "enum": [
          "sensitive",
          "explicit"
        ],
        "type": "string"
      },
      "description": "Allow researchers to define content warnings for their study.\n\nAt present these options are mutually exclusive and only a single option can be selected, however in the future available warnings will expand."
    },
    "completion_option": {
      "enum": [
        "url",
        "code"
      ],
      "type": "string",
      "description": "Use 'url' if you will redirect the user back to prolific using a url,\nthe url you will use in your experiment\nor survey to go back is https://app.prolific.com/submissions/complete?cc={code}\n\nUse 'code' when the participants will manually input the code, at the\nend of the experiment you will tell the participants the code. Note that\nthe {code} you have to give is one of the completion codes you define below in the `completion_codes` argument."
    },
    "external_study_url": {
      "type": "string",
      "description": "URL of the survey or experiment you want participant to access. You can pass URL search parameters to your survey or experiment\n\n* Participant id {{%PROLIFIC_PID%}}\n* Study id {{%STUDY_ID%}}\n* Session id {{%SESSION_ID%}}\n\nFor example `https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}`"
    },
    "filter_set_version": {
      "type": "integer",
      "nullable": true,
      "description": "The version of the filter set to be used.\n\nIf not provided, this will default to the latest available version at the time of applying the filter set."
    },
    "prolific_id_option": {
      "enum": [
        "question",
        "url_parameters",
        "not_required"
      ],
      "type": "string",
      "description": "Use 'question' if you will add a question in your survey or experiment asking the participant ID\n\n**Recommended** Use 'url_parameters' if your survey or experiment can retrieve and store those parameters for your analysis.\n\nUse 'not_required' if you don't need to record them"
    },
    "submissions_config": {
      "type": "object",
      "properties": {
        "max_concurrent_submissions": {
          "type": "integer",
          "default": -1,
          "nullable": true,
          "description": "- **-1** is the default value, meaning unlimited concurrent active/reserved submissions per study.\n- **1+** limits the number of concurrent active/reserved submissions a study can have at one time."
        },
        "max_submissions_per_participant": {
          "type": "integer",
          "default": 1,
          "nullable": true,
          "description": "- **1** is the default Prolific experience. This means one submission, per participant, per study. If you do\n  not specify this field, the **default is 1**.\n- **1+** turns your study into a multi-submission study, meaning a participant can create many submissions per study.\n  As noted above, your survey system will need to handle providing a\nunique experience each time the participant takes the study.\n- **-1** will allow an indefinite number of submissions from a single participant, up to `total_available_places`."
        }
      },
      "description": "**BETA**: This is a beta feature and is currently only available to selected workspaces.\nIt is being tested and evaluated for effectiveness and user experience before being released to all users.\n\n**Advanced**: This helps with faster data collection. Your survey system will need to handle providing a\nunique experience each time the participant takes the study.\n\nConfiguration related to study submissions. The purpose of this field is to capture any configuration options that impact the submissions made by participants in a study.",
      "additionalProperties": true
    },
    "device_compatibility": {
      "type": "array",
      "items": {
        "enum": [
          "desktop",
          "tablet",
          "mobile"
        ],
        "type": "string"
      },
      "description": "Add all devices that participants can use.\nYou can include one or more options.\n\nAn empty array indicates that all options are available."
    },
    "maximum_allowed_time": {
      "type": "number",
      "description": "Max time in minutes for a participant to finish the submission. Submissions are timed out if it takes longer.\n\nIf it is not provided the default value is set to the max value.\n\nThe min value is calculated as two minutes plus two times the estimated time plus two times the square root of the estimated time"
    },
    "total_available_places": {
      "type": "number",
      "description": "How many participants are you looking to recruit"
    },
    "content_warning_details": {
      "type": "string",
      "description": "Allow researchers to add further details about their content warning."
    },
    "peripheral_requirements": {
      "type": "array",
      "items": {
        "enum": [
          "audio",
          "camera",
          "download",
          "microphone"
        ],
        "type": "string"
      },
      "description": "Add all requirements that participants have to meet.\n\nAn empty array indicates that there are no extra peripheral requirements."
    },
    "estimated_completion_time": {
      "type": "number",
      "minimum": 1,
      "description": "Estimated duration in minutes of the experiment or survey"
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "Control the balance between speed of your studies and the naivety of the participants.\n\nIf not defined, by default Prolific calculates the best rate for most studies\ntaking into account the `filters` and the `total_available_places` needed for this study.\n\nUse 0 if your priority is speed. When this property is set to 0 all eligible participants will have access\nto your study at the same time, without any prioritization.\n\nYou can also set this at a workspace and project level."
    }
  }
}
string BonusesMakePaymentResponse
{
  "type": "string"
}
object BonusesSetUpPaymentsRequest
{
  "type": "object",
  "example": {
    "study_id": "60f6acb180a7b59ac0621f9e",
    "csv_bonuses": "60ffe5c8371090c7041d43f8,4.25\n60ff44a1d00991f1dfe405d9,4.25"
  },
  "properties": {
    "study_id": {
      "type": "string"
    },
    "csv_bonuses": {
      "type": "string"
    }
  }
}
object BulkBonus
{
  "type": "object",
  "example": {
    "id": "621014cb8e9e0f81e387021f",
    "vat": 0,
    "fees": 283.34,
    "study": "620ca2735fcbba4fa2b3211a",
    "amount": 850,
    "total_amount": 1133.34
  },
  "required": [
    "id",
    "total_amount"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Bonus ID. It is the ID to be used when paying the bonus"
    },
    "vat": {
      "type": "number",
      "description": "The VAT cost for this bonus in cents"
    },
    "fees": {
      "type": "number",
      "description": "The fees Prolific will charge for this bonus in cents"
    },
    "study": {
      "type": "string",
      "description": "Study ID"
    },
    "amount": {
      "type": "number",
      "description": "The amount the participant will receive in cents"
    },
    "total_amount": {
      "type": "number",
      "description": "Total ammount that will be deducted from your balance in cents"
    }
  }
}
object CreateFilterSet
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the filter set."
        },
        "filters": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SelectFilter"
              },
              {
                "$ref": "#/components/schemas/RangeFilter"
              }
            ]
          },
          "description": "List of all filters contained in the filter set."
        },
        "workspace_id": {
          "type": "string",
          "description": "ID of the workspace where the filter set can be used."
        },
        "organisation_id": {
          "type": "string",
          "description": "ID of the organisation where the filter set can be used."
        }
      }
    }
  ],
  "example": [
    {
      "name": "Ambidextrous teenagers",
      "filters": [
        {
          "id": "handednessX",
          "selected_values": [
            "2"
          ]
        },
        {
          "id": "ageX",
          "selected_range": {
            "lower": 18,
            "upper": 19
          }
        }
      ],
      "workspace_id": "644aaabfaf6bbc363b9d47c6"
    }
  ]
}
object CreateInvitationRequest
{
  "type": "object",
  "properties": {
    "role": {
      "enum": [
        "WORKSPACE_ADMIN",
        "WORKSPACE_COLLABORATOR",
        "PROJECT_EDITOR"
      ],
      "type": "string",
      "description": "The role that the invited users will have in the workspace or project. This can be one of the following:\n- \"WORKSPACE_ADMIN\": The user will have administrative rights in the workspace. They can manage settings, invite users, and oversee all projects.\n- \"WORKSPACE_COLLABORATOR\": The user will be a regular collaborator in the workspace. They can contribute to projects but don't have administrative rights.\n- \"PROJECT_EDITOR\": The user will have edit rights for a specific project within a workspace.\n"
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      },
      "description": "An array of email addresses of the users to invite."
    },
    "association": {
      "type": "string",
      "format": "objectId",
      "description": "The ID of the workspace to which the users are being invited."
    }
  }
}
object CreateInvitationResponse
{
  "type": "object",
  "properties": {
    "invitations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Invitation"
      }
    }
  },
  "additionalProperties": true
}
object CreateProject
{
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Name of project"
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "Control the balance between speed of your studies and the naivety of the participants.\n\nIf not defined, by default Prolific calculates the best rate for most studies\ntaking into account the `filters` and the `total_available_places` needed for this study.\n\nUse 0 if your priority is speed. When this property is set to 0 all eligible participants will have access\nto your study at the same time, without any prioritization.\n\nYou can also set this at a workspace and study level."
    }
  }
}
object CreateSecret
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "The ID of the workspace you are creating the secret in"
    }
  },
  "additionalProperties": true
}
object CreateStudy
{
  "allOf": [
    {
      "$ref": "#/components/schemas/BaseStudy"
    },
    {
      "required": [
        "name",
        "description",
        "external_study_url",
        "prolific_id_option",
        "completion_codes",
        "completion_option",
        "estimated_completion_time",
        "reward",
        "total_available_places"
      ]
    }
  ]
}
object CreateWorkspace
{
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Name of workspace"
    },
    "currency_code": {
      "type": "string",
      "description": "Currency used for all transactions within the workspace. Must be GBP or USD."
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "Control the balance between speed of your studies and the naivety of the participants.\n\nIf not defined, by default Prolific calculates the best rate for most studies\ntaking into account the `filters` and the `total_available_places` needed for this study.\n\nUse 0 if your priority is speed. When this property is set to 0 all eligible participants will have access\nto your study at the same time, without any prioritization.\n\nYou can also set this at a project and study level."
    }
  }
}
object Error
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "$ref": "#/components/schemas/ErrorDetail"
    }
  },
  "additionalProperties": true
}
object ErrorDetail
{
  "type": "object",
  "required": [
    "status",
    "error_code",
    "title",
    "detail"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Error title"
    },
    "detail": {
      "anyOf": [
        {
          "type": "string",
          "description": "Error message"
        },
        {
          "type": "array",
          "items": {
            "description": "WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema."
          },
          "description": "Error messages"
        },
        {
          "type": "object",
          "properties": {
            "any_field": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Error message for that field"
              },
              "description": "Name of the field with a validation error and as a value an array with the error descriptions"
            }
          },
          "description": "All fields with validation errors",
          "additionalProperties": true
        }
      ],
      "description": "Error detail"
    },
    "status": {
      "type": "integer",
      "description": "Status code as in the http standards"
    },
    "traceback": {
      "type": "string",
      "description": "Optional debug information"
    },
    "error_code": {
      "type": "integer",
      "description": "Internal error code"
    },
    "interactive": {
      "type": "boolean"
    },
    "additional_information": {
      "type": "string",
      "description": "Optional extra information"
    }
  }
}
object EventType
{
  "type": "object",
  "example": {
    "event_type": "study.status.change",
    "description": "A status change event for studies"
  },
  "properties": {
    "event_type": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}
object EventTypeList
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/EventType"
      }
    }
  },
  "additionalProperties": true
}
object FilterList
{
  "type": "object",
  "properties": {
    "meta": {
      "type": "object",
      "additionalProperties": true
    },
    "_links": {
      "type": "object",
      "additionalProperties": true
    },
    "results": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SelectFilterListResponse"
          },
          {
            "$ref": "#/components/schemas/SelectFilterListDetailedResponse"
          },
          {
            "$ref": "#/components/schemas/RangeFilterListResponse"
          },
          {
            "$ref": "#/components/schemas/RangeFilterListDetailedResponse"
          }
        ]
      }
    }
  }
}
object FilterListAttributes
{
  "type": "object",
  "properties": {
    "type": {
      "enum": [
        "select",
        "range"
      ],
      "type": "string",
      "description": "The filter type."
    },
    "title": {
      "type": "string",
      "description": "The title of the filter."
    },
    "question": {
      "type": "string",
      "description": "The question asked of participants to generate this filter."
    },
    "filter_id": {
      "type": "string",
      "description": "The ID of the filter, based on a slugified version of the title at the time the filter was created."
    },
    "description": {
      "type": "string",
      "description": "A description of the filter."
    }
  }
}
object FilterListDetailedAttributes
{
  "type": "object",
  "properties": {
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "nullable": true,
      "description": "Some additional tags that can be used to display the filter in a specific way, e.g. recommended, new, expiring."
    },
    "category": {
      "type": "string",
      "nullable": true,
      "description": "The category the filter is displayed in in About You and the prescreening modal."
    },
    "subcategory": {
      "type": "string",
      "nullable": true,
      "description": "The sub-category the filter is displayed in in the prescreening modal."
    },
    "display_order": {
      "type": "integer",
      "nullable": true,
      "description": "The order in which the filter is displayed within its sub-category in the prescreening modal."
    },
    "researcher_help_text": {
      "type": "string",
      "nullable": true,
      "description": "Some help text to be displayed to researchers in the prescreening modal."
    },
    "participant_help_text": {
      "type": "string",
      "nullable": true,
      "description": "Some help text to be displayed to participants in the About You section."
    }
  }
}
object FilterSet
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the filter set."
        },
        "name": {
          "type": "string",
          "description": "Name of the filter set."
        },
        "filters": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SelectFilter"
              },
              {
                "$ref": "#/components/schemas/RangeFilter"
              }
            ]
          },
          "description": "List of all filters contained in the filter set."
        },
        "version": {
          "type": "integer",
          "description": "An incrementing integer indicating the version of the filter set."
        },
        "is_locked": {
          "type": "boolean",
          "description": "Whether the filter set has been locked."
        },
        "is_deleted": {
          "type": "boolean",
          "description": "Whether the filter set has been deleted."
        },
        "workspace_id": {
          "type": "string",
          "nullable": true,
          "description": "ID of the workspace where the filter set can be used."
        },
        "organisation_id": {
          "type": "string",
          "nullable": true,
          "description": "ID of the workspace where the filter set can be used."
        }
      }
    }
  ],
  "example": {
    "id": "644ab312af6bbc363b9d47c7X",
    "name": "Ambidextrous teenagers",
    "filters": [
      {
        "id": "handednessX",
        "selected_values": [
          "2"
        ]
      },
      {
        "id": "ageX",
        "selected_range": {
          "lower": 18,
          "upper": 19
        }
      }
    ],
    "version": 1,
    "is_locked": true,
    "is_deleted": false,
    "workspace_id": "644aaabfaf6bbc363b9d47c6",
    "eligible_participant_count": 0
  }
}
object FilterSetList
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FilterSet"
      },
      "description": "List of filter sets."
    }
  },
  "additionalProperties": true
}
object FilterSetParticipantCount
{
  "properties": {
    "eligible_participant_count": {
      "type": "integer",
      "description": "The number of participants who match the filter sets filters. Please note that if the number is\nlower than 25 the count will be obscured to prevent identification of participants."
    }
  },
  "additionalProperties": true
}
object FilterSetsCloneFilterSetRequest
{
  "type": "object",
  "properties": {
    "new_name": {
      "type": "string",
      "description": "A new name for the cloned filter set."
    }
  }
}
object FilterSetsCloneFilterSetResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterSet"
    },
    {
      "$ref": "#/components/schemas/FilterSetParticipantCount"
    }
  ]
}
object FilterSetsCreateFromFiltersResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterSet"
    },
    {
      "$ref": "#/components/schemas/FilterSetParticipantCount"
    }
  ]
}
object FilterSetsGetDetailsResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterSet"
    },
    {
      "$ref": "#/components/schemas/FilterSetParticipantCount"
    }
  ]
}
object FilterSetsLockForEditingResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterSet"
    },
    {
      "$ref": "#/components/schemas/FilterSetParticipantCount"
    }
  ]
}
object FilterSetsUnlockForEditingResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterSet"
    },
    {
      "$ref": "#/components/schemas/FilterSetParticipantCount"
    }
  ]
}
object FilterSetsUpdateDetailsResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterSet"
    },
    {
      "$ref": "#/components/schemas/FilterSetParticipantCount"
    }
  ]
}
object GetAllSurveysResponse
{
  "type": "object",
  "title": "Get all the surveys API response",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyOut"
      },
      "description": "List of all surveys matching the criteria."
    }
  }
}
object Invitation
{
  "type": "object",
  "properties": {
    "status": {
      "enum": [
        "INVITED",
        "ACCEPTED"
      ],
      "type": "string",
      "description": "The current status of the invitation."
    },
    "invitee": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "objectId",
          "nullable": true,
          "description": "The unique ID of the invitee."
        },
        "name": {
          "type": "string",
          "nullable": true,
          "description": "The name of the invitee."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "The email address of the invitee."
        }
      }
    },
    "invited_by": {
      "type": "string",
      "format": "objectId",
      "description": "The ID of the user who sent the invitation."
    },
    "association": {
      "type": "string",
      "format": "objectId",
      "description": "The ID of the workspace or project to which the invitee was invited."
    },
    "invite_link": {
      "type": "string",
      "format": "uri",
      "description": "The link that the invitee can use to accept the invitation."
    }
  }
}
object ManuallyReview
{
  "type": "object",
  "required": [
    "action"
  ],
  "properties": {
    "action": {
      "enum": [
        "MANUALLY_REVIEW"
      ],
      "type": "string",
      "description": "The action to take"
    }
  }
}
object Message
{
  "type": "object",
  "required": [
    "sender_id",
    "body",
    "sent_at",
    "channel_id"
  ],
  "properties": {
    "body": {
      "type": "string",
      "description": "Body of the message."
    },
    "data": {
      "type": "object",
      "properties": {
        "category": {
          "enum": [
            "payment-timing",
            "payment-issues",
            "technical-issues",
            "feedback",
            "rejections",
            "other"
          ],
          "type": "string",
          "example": "feedback",
          "description": "Participants can self-categorise their message before sending it."
        },
        "study_id": {
          "type": "string",
          "example": "620ca2735fcbba4fa2b3211a",
          "description": "What study the message relates to. In case this is not automatically filled for the participant, they can choose which study their message relates to."
        }
      },
      "description": "Metadata for a message"
    },
    "type": {
      "type": "string",
      "description": "Will only me message for now"
    },
    "sent_at": {
      "type": "string",
      "format": "date-time",
      "description": "Date time when message was sent"
    },
    "sender_id": {
      "type": "string",
      "description": "Id of the user who sent the message"
    },
    "channel_id": {
      "type": "string",
      "example": "d45c8a5e812ff990fc6546beaf888c9820f4c184f7200a45d900cf0f321f7f38",
      "description": "The channel ID, for linking back to a thread in the Prolific app."
    }
  }
}
object Messages
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Message"
      }
    }
  },
  "additionalProperties": true
}
object MutuallyExclusiveStudyCollectionUpdate
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "My Mutually Exclusive Study Collection",
      "description": "Mutually exclusive study collection name"
    },
    "study_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "example": "5f7b9a7b5f7b9a7b5f7b9a7b"
      },
      "description": "List of study ids you wish to include in the collection. Note, this will overwrite the current list of studies in the collection"
    },
    "publish_at": {
      "type": "string",
      "example": "2050-02-28T13:45:00 Europe/London",
      "nullable": true,
      "description": "Datetime and timezone the study collection should be scheduled to be published at"
    },
    "description": {
      "type": "string",
      "example": "This is a description of my mutually exclusive study collection",
      "description": "A description of the study collection"
    }
  }
}
object MutuallyExclusiveStudyCollectionsResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MutuallyExclusiveStudyCollectionUpdate"
      },
      "description": "List of all mutually exclusive study collections in a project"
    }
  }
}
object ParticipantGroup
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "5e9b9c9b0f9c9a0001b0b1f5",
      "description": "The id of the participant group"
    },
    "name": {
      "type": "string",
      "example": "Group 1",
      "description": "The name of the participant group"
    },
    "is_deleted": {
      "type": "boolean",
      "example": false,
      "readOnly": true,
      "description": "Whether the participant group has been deleted"
    },
    "project_id": {
      "type": "string",
      "example": null,
      "nullable": true,
      "deprecated": true,
      "description": "The id of the project the participant group belongs to"
    },
    "description": {
      "type": "string",
      "example": "My first participant group",
      "nullable": true,
      "description": "The user-provided description of the participant group"
    },
    "workspace_id": {
      "type": "string",
      "example": "5e9b9c9b0f9c9a0001b1ca2f",
      "nullable": true,
      "description": "The id of the workspace the participant group belongs to. A participant group can only belong to either a workspace or an organisation."
    },
    "feeder_studies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "5e9b9c9b0f9c9a0001b0b1f4",
            "description": "The id of the study."
          },
          "name": {
            "type": "string",
            "example": "Study 1",
            "description": "The name of the study."
          },
          "status": {
            "type": "string",
            "example": "COMPLETED",
            "description": "The current status of the study."
          },
          "internal_name": {
            "type": "string",
            "example": "My Study",
            "description": "The internal name of the study."
          },
          "feeder_completion_codes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "example": "AJVRH234",
                  "description": "The code that will modify the participants in this group."
                },
                "action": {
                  "enum": [
                    "ADD_TO_PARTICIPANT_GROUP",
                    "REMOVE_FROM_PARTICIPANT_GROUP"
                  ],
                  "type": "string",
                  "example": "ADD_TO_PARTICIPANT_GROUP",
                  "description": "The action that will be taken when this code is used."
                },
                "code_type": {
                  "type": "string",
                  "example": "COMPLETION_CODE",
                  "description": "The label or code type given to this code within the context of the study."
                }
              },
              "description": "The code within this study that interacts with the participant group."
            },
            "description": "The completion codes which will modify the participants in this group."
          }
        }
      },
      "readOnly": true,
      "description": "Details of all studies which are configured to modify the participants in this group through completion codes."
    },
    "organisation_id": {
      "type": "string",
      "example": "5e9b9c9b0f9c9a0001b1ca2f",
      "nullable": true,
      "description": "The id of the organisation the participant group belongs to. A participant group can only belong to either a workspace or an organisation."
    },
    "participant_count": {
      "type": "integer",
      "example": 10,
      "readOnly": true,
      "description": "The number of participants in the participant group"
    }
  }
}
object ParticipantGroupListResponse
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ParticipantGroup"
      }
    }
  },
  "additionalProperties": true
}
object ParticipantGroupMembership
{
  "type": "object",
  "properties": {
    "participant_id": {
      "type": "string",
      "example": "5e9b9c9b0f9c9a0001b0b1f5",
      "description": "The id of the participant"
    },
    "datetime_created": {
      "type": "string",
      "example": "2020-04-20T12:00:00Z",
      "description": "The date and time the participant was added to the Participant Group"
    }
  }
}
object ParticipantGroupMembershipListResponse
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ParticipantGroupMembership"
      }
    }
  },
  "additionalProperties": true
}
object ParticipantGroupUpdate
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Group 1",
      "description": "The name of the participant group"
    },
    "participant_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "5e9b9c9b0f9c9a0001b0b1f4",
        "5e9b9c9b0f9c9a0001b0b1f5",
        "5e9b9c9b0f9c9a0001b0b1f6"
      ],
      "description": "The ids of participants to be included in the group.\n\nNote, this overwrites any existing participants in the group; use the participant group membership endpoints to [append](https://docs.prolific.com) or [remove](https://docs.prolific.com) participants from the group."
    }
  }
}
object ParticipantGroupsCreateNewGroupRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Group 1",
      "description": "The name of the participant group"
    },
    "description": {
      "type": "string",
      "example": "Participants with confirmed special dietary requirements.",
      "description": "A description of the participant group"
    },
    "workspace_id": {
      "type": "string",
      "description": "The id of the workspace to create the participant group in. Either a workspace or organisation ID must be specified."
    },
    "organisation_id": {
      "type": "string",
      "description": "The id of the organisation to create the participant group in. Either a workspace or organisation ID must be specified."
    },
    "participant_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "5e9b9c9b0f9c9a0001b0b1f4",
        "5e9b9c9b0f9c9a0001b0b1f5",
        "5e9b9c9b0f9c9a0001b0b1f6"
      ],
      "description": "The ids of participants to be initially added to the group"
    }
  }
}
object ParticipantIDList
{
  "type": "object",
  "properties": {
    "participant_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "example": "5e9b9c9b0f9c9a0001b0b1f5",
        "description": "The id of the participant"
      }
    }
  }
}
object Project
{
  "type": "object",
  "example": {
    "id": "62fce6fff0a78eb4f3ebc09cX",
    "owner": "60a42f4c693c29420793cb73",
    "title": "My project",
    "users": [
      {
        "id": "60a42f4c693c29420793cb73X",
        "name": "Joe Soap",
        "email": "joe.soap@gmail.com",
        "roles": [
          "PROJECT_EDITOR"
        ]
      }
    ],
    "workspace": "60a42f4c693c29420793cb73",
    "description": "This project is for...",
    "naivety_distribution_rate": 0.5
  },
  "required": [
    "id",
    "title"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Project id. It is created by Prolific."
    },
    "owner": {
      "type": "string",
      "description": "User id of the creator of the project. It is created by Prolific."
    },
    "title": {
      "type": "string",
      "description": "Name of project"
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkspaceUser"
      },
      "description": "Data for all users who have access to this project"
    },
    "workspace": {
      "type": "string",
      "description": "Id of the workspace this project is in. This is created by Prolific."
    },
    "description": {
      "type": "string",
      "description": "What is this project used for"
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "The rate at which the studies within this project are distributed."
    }
  },
  "additionalProperties": true
}
object ProjectShort
{
  "type": "object",
  "example": {
    "id": "62fce6fff0a78eb4f3ebc09c",
    "owner": "60a42f4c693c29420793cb73",
    "title": "My project",
    "users": [
      {
        "id": "60a42f4c693c29420793cb73X",
        "name": "Joe Soap",
        "email": "joe.soap@gmail.com",
        "roles": [
          "PROJECT_EDITOR"
        ]
      }
    ],
    "description": "This project is for...",
    "naivety_distribution_rate": 0.5
  },
  "required": [
    "id",
    "title"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Project id. It is created by Prolific."
    },
    "owner": {
      "type": "string",
      "description": "User id of the creator of the project. It is created by Prolific."
    },
    "title": {
      "type": "string",
      "description": "Name of project"
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkspaceUser"
      },
      "description": "Data for all users who have access to this project"
    },
    "description": {
      "type": "string",
      "description": "What is this project used for"
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "The rate at which the studies within this project are distributed."
    }
  },
  "additionalProperties": true
}
object ProjectShortListResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectShort"
      },
      "description": "List of all projects for a user"
    }
  },
  "additionalProperties": true
}
object RangeFilter
{
  "type": "object",
  "required": [
    "selected_range",
    "filter_id"
  ],
  "properties": {
    "filter_id": {
      "type": "string",
      "description": "ID of the \"range\" type filter."
    },
    "selected_range": {
      "type": "object",
      "properties": {
        "lower": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "description": "Your selected lower bound for the range."
        },
        "upper": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "description": "Your selected upper bound for the range."
        }
      },
      "description": "This schema applies for filters of the `range` type, as defined in the [filter list response](\\#tag/Filters/paths/~1api~1v1~1filters~1/get).\n\nA dictionary with two possible objects, 'lower' and 'upper'. At least one must be present and a non-null value.\n\nThe expected data type for these values is defined by the `range` filter's `data_type` (see response linked above).\n\nIf 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.\n\nLeaving 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."
    }
  }
}
object RangeFilterListAttributes
{
  "type": "object",
  "properties": {
    "max": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "description": "The maximum valid value of the range."
    },
    "min": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "description": "The minimum valid value of the range."
    },
    "data_type": {
      "enum": [
        "date",
        "integer"
      ],
      "type": "string",
      "description": "The data type of the range. If the data type is integer, the lower and upper values must be integers.\nIf the data type is date, the lower and upper values must be ISO8601 dates."
    }
  }
}
object RangeFilterListDetailedResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterListAttributes"
    },
    {
      "$ref": "#/components/schemas/RangeFilterListAttributes"
    },
    {
      "$ref": "#/components/schemas/FilterListDetailedAttributes"
    }
  ]
}
object RangeFilterListResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterListAttributes"
    },
    {
      "$ref": "#/components/schemas/RangeFilterListAttributes"
    }
  ]
}
object RemoveFromParticipantGroup
{
  "type": "object",
  "required": [
    "action",
    "participant_group"
  ],
  "properties": {
    "action": {
      "enum": [
        "REMOVE_FROM_PARTICIPANT_GROUP"
      ],
      "type": "string",
      "description": "The action to take"
    },
    "participant_group": {
      "type": "string",
      "example": "636e4f379e7d29c6875313e3",
      "description": "The participant group to remove the participant from."
    }
  }
}
object RequestReturn
{
  "type": "object",
  "required": [
    "action",
    "return_reason"
  ],
  "properties": {
    "action": {
      "enum": [
        "REQUEST_RETURN"
      ],
      "type": "string",
      "description": "The action to take"
    },
    "return_reason": {
      "type": "string",
      "example": "Failed an attention check",
      "description": "The reason you would like to request a return"
    }
  }
}
object Requirement
{
  "type": "object",
  "required": [
    "_cls",
    "attributes"
  ],
  "properties": {
    "_cls": {
      "type": "string",
      "example": "SelectAnswerEligibilityRequirement",
      "description": "Type of requirement"
    },
    "query": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "54ac6ea9fdf99b2204feb899",
          "description": "Id of the question"
        },
        "question": {
          "type": "string",
          "example": "What is your first language?",
          "nullable": true,
          "description": "Question asked to the participant"
        }
      },
      "additionalProperties": true
    },
    "attributes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Attribute"
      },
      "description": "Attributes defining the requirement. Its values will depend\non the type of requirement"
    }
  },
  "additionalProperties": true
}
object RequirementsCount
{
  "type": "object",
  "required": [
    "count"
  ],
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of participants passing all the requirements"
    }
  },
  "additionalProperties": true
}
object RequirementsCountRequest
{
  "type": "object",
  "required": [
    "filters"
  ],
  "properties": {
    "filters": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SelectFilter"
          },
          {
            "$ref": "#/components/schemas/RangeFilter"
          }
        ]
      },
      "description": "List of filters to apply to the count. This parameter uses the new, simplified\nfilters schema for interacting with eligibility."
    },
    "workspace_id": {
      "type": "string",
      "description": "The ID of the workspace you will be creating a study in.\n\nDue to US tax laws, non US residents may not participate in studies created by US researchers.\nFor this reason, we use the country specified in the workspace to determine eligibility.\n\nIf you do not specify a workspace ID, we will use the current workspace ID of the user making the request.\nYour eligibility count may not be accurate if you do not specify a workspace ID."
    },
    "organisation_id": {
      "type": "string",
      "description": "The ID of the workspace you will be creating a filterset in."
    }
  }
}
object RequirementsResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Requirement"
      },
      "description": "List of all defined requirements. There are many attributes\nper requirement that are not documented and are used by our webapp."
    }
  },
  "additionalProperties": true
}
object ReturnRequestedResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "the database id of the submission instance"
    },
    "status": {
      "enum": [
        "ACTIVE",
        "APPROVED",
        "AWAITING REVIEW",
        "REJECTED",
        "RESERVED",
        "RETURNED",
        "TIMED-OUT",
        "UNKNOWN"
      ],
      "type": "string",
      "description": "The current status of the submission"
    },
    "participant": {
      "type": "string",
      "description": "The participant who took part in the study."
    },
    "return_requested": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "The date and time when a request was made to return a submission."
    }
  },
  "additionalProperties": true
}
object SecretDetail
{
  "type": "object",
  "example": {
    "id": "63722971f9cc073ecc730f6aX",
    "value": "cGNqFPb6y0RT3XO9XVSessBDYIbHQ-....",
    "workspace_id": "63722982f9cc073ecc730f6b"
  },
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the secret."
    },
    "value": {
      "type": "string",
      "description": "The secret value."
    },
    "workspace_id": {
      "type": "string",
      "description": "The ID of the workspace that the secret belongs to."
    }
  },
  "additionalProperties": true
}
object SecretList
{
  "type": "object",
  "example": [
    {
      "id": "63722971f9cc073ecc730f6a",
      "value": "secret-and-safe",
      "workspace_id": "63722982f9cc073ecc730f6b"
    }
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SecretDetail"
      },
      "description": "A list of secrets."
    }
  },
  "additionalProperties": true
}
object SelectFilter
{
  "type": "object",
  "required": [
    "filter_id",
    "selected_values"
  ],
  "properties": {
    "filter_id": {
      "type": "string",
      "description": "ID of the \"select\" type filter."
    },
    "weightings": {
      "type": "object",
      "description": "Ratios to control the distribution of participants across the selected values.\n\nInteger percentages, floats, and exact quantities are valid inputs.",
      "additionalProperties": {
        "type": "number"
      }
    },
    "selected_values": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "This schema applies for filters of the `select` type, as defined in the [filter list response](\\#tag/Filters/paths/~1api~1v1~1filters~1/get).\n\nArray of IDs matching the response IDs, from the `select` filter's `choices` (see response linked above).\n\nString format should match the `data_type` of the `select` filter's `choices` (see response linked above)."
    }
  }
}
object SelectFilterListAttributes
{
  "type": "object",
  "properties": {
    "choices": {
      "type": "object",
      "description": "An object containing all the filter's possible responses as key-value pairs, with sequential integer IDs or database ObjectIDs as the keys and the text of the response as the values.",
      "additionalProperties": true
    },
    "data_type": {
      "enum": [
        "ChoiceID",
        "ParticipantID",
        "StudyID",
        "ParticipantGroupID"
      ],
      "type": "string",
      "description": "The format of the keys in the choices object. If the keys are strings representing sequential integers,\nthe data format is integer. If the keys are database ObjectIDs, the type of ID is specified."
    }
  }
}
object SelectFilterListDetailedResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterListAttributes"
    },
    {
      "$ref": "#/components/schemas/SelectFilterListAttributes"
    },
    {
      "$ref": "#/components/schemas/FilterListDetailedAttributes"
    }
  ]
}
object SelectFilterListResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/FilterListAttributes"
    },
    {
      "$ref": "#/components/schemas/SelectFilterListAttributes"
    }
  ]
}
object SendBulkMessage
{
  "type": "object",
  "required": [
    "ids",
    "body",
    "study_id"
  ],
  "properties": {
    "ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of participant ID's"
    },
    "body": {
      "type": "string",
      "description": "Message Body. Text is sanitised for safe storage and display."
    },
    "study_id": {
      "type": "string",
      "description": "A study ID"
    }
  }
}
object SendMessage
{
  "type": "object",
  "required": [
    "recipient_id",
    "body",
    "study_id"
  ],
  "properties": {
    "body": {
      "type": "string",
      "description": "Message Body. Text is sanitised for safe storage and display."
    },
    "study_id": {
      "type": "string",
      "description": "This study is the reason for this message"
    },
    "recipient_id": {
      "type": "string",
      "description": "Recipient user's id"
    }
  }
}
object StudiesDownloadDemographicData200Response
{
  "type": "object",
  "properties": {
    "status": {
      "enum": [
        "Your export should arrive shortly."
      ],
      "type": "string"
    }
  },
  "description": "A status report if the email method is provided."
}
string StudiesDownloadDemographicDataResponse
{
  "type": "string",
  "description": "A CSV string if no method is provided."
}
object StudiesDuplicateStudyRequest
{
  "type": "object",
  "properties": {
    "block_previous_participants": {
      "type": "boolean",
      "default": true,
      "description": "Controls whether the block list is added or not."
    }
  }
}
object StudiesListResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StudyShort"
      },
      "description": "List of all studies matching the criteria."
    }
  },
  "additionalProperties": true
}
object Study
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "Study id. It is created by Prolific. **Read only**."
        },
        "status": {
          "enum": [
            "UNPUBLISHED",
            "SCHEDULED",
            "ACTIVE",
            "AWAITING REVIEW",
            "PAUSED",
            "COMPLETED"
          ],
          "type": "string",
          "readOnly": true,
          "description": "Status of the study. **Read only**.\n\nTo change the status you can use `/api/v1/studies/{id}/transition/`"
        }
      }
    },
    {
      "$ref": "#/components/schemas/CreateStudy"
    },
    {
      "required": [
        "id",
        "status",
        "maximum_allowed_time"
      ]
    }
  ],
  "example": {
    "id": "60d9aadeb86739de712faee0X",
    "name": "Study about API's",
    "reward": 100,
    "status": "UNPUBLISHED",
    "filters": [],
    "description": "This study aims to determine how to make a good public API",
    "study_labels": [
      "interview"
    ],
    "filter_set_id": null,
    "internal_name": "WIT-2021 Study about API's version 2",
    "completion_codes": [
      {
        "code": "ABC123",
        "actions": [
          {
            "action": "AUTOMATICALLY_APPROVE"
          }
        ],
        "code_type": "COMPLETED"
      },
      {
        "code": "DEF234",
        "actions": [
          {
            "action": "AUTOMATICALLY_APPROVE"
          },
          {
            "action": "ADD_TO_PARTICIPANT_GROUP",
            "participant_group": "619e049f7648a4e1f8f3645b"
          }
        ],
        "code_type": "FOLLOW_UP_STUDY"
      }
    ],
    "content_warnings": [
      "sensitive"
    ],
    "completion_option": "url",
    "external_study_url": "https://eggs-experriment.com?participant={{%PROLIFIC_PID%}}",
    "filter_set_version": null,
    "prolific_id_option": "url_parameters",
    "device_compatibility": [
      "desktop"
    ],
    "maximum_allowed_time": 25,
    "total_available_places": 30,
    "content_warning_details": "Experiences with hateful activities, experiences with self-injury and harmful behaviour",
    "peripheral_requirements": [],
    "estimated_completion_time": 5
  },
  "additionalProperties": true
}
object StudyCollectionsTransitionMutuallyExclusiveRequest
{
  "type": "object",
  "properties": {
    "action": {
      "enum": [
        "PUBLISH",
        "SCHEDULE_PUBLISH",
        "CANCEL_PUBLISH"
      ],
      "type": "string"
    },
    "publish_at": {
      "type": "string",
      "description": "Optional parameter for scheduling publish, indicating the datetime and timezone the study collection should be scheduled to be published at"
    }
  }
}
object StudyCostRequest
{
  "type": "object",
  "required": [
    "reward",
    "total_available_places"
  ],
  "properties": {
    "reward": {
      "type": "number",
      "description": "How much are you going to pay the participants in cents. We use the currency of your account"
    },
    "total_available_places": {
      "type": "number",
      "description": "How many participants are you looking to recruit"
    }
  },
  "additionalProperties": true
}
object StudyCostResponse
{
  "type": "object",
  "required": [
    "total_cost"
  ],
  "properties": {
    "total_cost": {
      "type": "number",
      "example": 56,
      "description": "Total cost of the study including VAT and fees in cents. We use your account VAT and Fee percentage. The amount is in your account's currency."
    }
  },
  "additionalProperties": true
}
object StudyShort
{
  "type": "object",
  "example": {
    "id": "60d9aadeb86739de712faee0",
    "name": "Study about API's",
    "status": "UNPUBLISHED"
  },
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Study id. It is created by Prolific."
    },
    "name": {
      "type": "string",
      "description": "Public name or title of the study"
    },
    "reward": {
      "type": "number",
      "description": "How much are you going to pay the participants in cents. We use the currency of your account"
    },
    "status": {
      "enum": [
        "UNPUBLISHED",
        "SCHEDULED",
        "ACTIVE",
        "AWAITING REVIEW",
        "PAUSED",
        "COMPLETED"
      ],
      "type": "string",
      "readOnly": true,
      "description": "Status of the study."
    },
    "publish_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Date time when the study was scheduled to be published."
    },
    "study_type": {
      "enum": [
        "SINGLE",
        "UK_REP_SAMPLE",
        "US_REP_SAMPLE"
      ],
      "type": "string",
      "description": "Deprecated. Type of study."
    },
    "total_cost": {
      "type": "number",
      "description": "Total cost of the study including fees"
    },
    "date_created": {
      "type": "string",
      "format": "date-time",
      "description": "Date time when the study was created"
    },
    "places_taken": {
      "type": "number",
      "readOnly": true,
      "description": "Places already taken, number of submission started excluding timed out and returned submissions"
    },
    "published_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Date time when the study was published."
    },
    "internal_name": {
      "type": "string",
      "nullable": true,
      "description": "Internal name of the study, not shown to participants"
    },
    "number_of_submissions": {
      "type": "number",
      "readOnly": true
    },
    "total_available_places": {
      "type": "number",
      "description": "How many participants are you looking to recruit"
    }
  },
  "additionalProperties": true
}
object StudyTransition
{
  "type": "object",
  "required": [
    "action"
  ],
  "properties": {
    "action": {
      "type": "string",
      "example": "PUBLISH",
      "description": "Action to execute"
    }
  }
}
object Submission
{
  "type": "object",
  "example": {
    "id": "625d4a831bcda2d59ac5a251",
    "status": "APPROVED",
    "study_id": "60aca280709ee40ec37d4885",
    "started_at": "2022-04-18T11:24:51.395Z",
    "participant": "60bf9310e8dec401be6e9615",
    "completed_at": "2022-04-18T11:25:02.734Z",
    "entered_code": "8E8AC860"
  },
  "required": [
    "id",
    "started_at",
    "status",
    "study_id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "The id of the submission"
    },
    "status": {
      "enum": [
        "ACTIVE",
        "APPROVED",
        "AWAITING REVIEW",
        "REJECTED",
        "RESERVED",
        "RETURNED",
        "TIMED-OUT",
        "UNKNOWN"
      ],
      "type": "string",
      "description": "The current status of the submission"
    },
    "study_id": {
      "type": "string",
      "description": "Study id."
    },
    "started_at": {
      "type": "string",
      "description": "The date and time that the user started the submission (UTC)"
    },
    "participant": {
      "type": "string",
      "description": "Participant id."
    },
    "completed_at": {
      "type": "string",
      "nullable": true,
      "description": "The time the submission was completed at."
    },
    "entered_code": {
      "type": "string",
      "nullable": true,
      "description": "The completion code used by the participant to complete the study."
    }
  },
  "additionalProperties": true
}
object SubmissionDetail
{
  "type": "object",
  "example": {
    "id": "625d4a831bcda2d59ac5a251X",
    "status": "APPROVED",
    "study_id": "60aca280709ee40ec37d4885",
    "started_at": "2022-04-18T11:24:51.395Z",
    "participant": "60bf9310e8dec401be6e9615",
    "completed_at": "2022-04-18T11:25:02.734Z",
    "entered_code": "8E8AC860",
    "bonus_payments": [
      1000,
      2536
    ]
  },
  "required": [
    "id",
    "started_at",
    "status",
    "study_id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "The id of the submission"
    },
    "status": {
      "enum": [
        "ACTIVE",
        "APPROVED",
        "AWAITING REVIEW",
        "REJECTED",
        "RESERVED",
        "RETURNED",
        "TIMED-OUT",
        "UNKNOWN"
      ],
      "type": "string",
      "description": "The current status of the submission"
    },
    "study_id": {
      "type": "string",
      "description": "Study id."
    },
    "started_at": {
      "type": "string",
      "description": "The date and time that the user started the submission (UTC)"
    },
    "participant": {
      "type": "string",
      "description": "Participant id."
    },
    "completed_at": {
      "type": "string",
      "nullable": true,
      "description": "The time the submission was completed at."
    },
    "entered_code": {
      "type": "string",
      "nullable": true,
      "description": "The completion code used by the participant to complete the study."
    },
    "bonus_payments": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "Bonus payments that have been paid on the submission. Returned in pence / cents."
    }
  },
  "additionalProperties": true
}
object SubmissionListResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SubmissionShort"
      },
      "description": "List of all studies matching the criteria."
    }
  },
  "additionalProperties": true
}
object SubmissionShort
{
  "type": "object",
  "example": {
    "id": "60d9aadeb86739de712faee0X",
    "status": "ACTIVE",
    "started_at": "2021-05-20T11:03:00.457Z",
    "study_code": "ABC123",
    "participant_id": "60bf9310e8dec401be6e9615"
  },
  "required": [
    "id",
    "started_at",
    "participant_id",
    "status",
    "has_siblings"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "Submission id."
    },
    "status": {
      "enum": [
        "RESERVED",
        "ACTIVE",
        "TIME-OUT",
        "AWAITING REVIEW",
        "APPROVED",
        "RETURNED",
        "REJECTED"
      ],
      "type": "string",
      "readOnly": true,
      "description": "Status of the submission."
    },
    "started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Date started"
    },
    "study_code": {
      "type": "string",
      "nullable": true,
      "description": "The completion code used by the participant to complete the study."
    },
    "completed_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Date completed"
    },
    "has_siblings": {
      "type": "boolean",
      "description": "Whether or not the submission has sibling submissions (sharing the same study)."
    },
    "participant_id": {
      "type": "string",
      "description": "Participant id."
    }
  },
  "additionalProperties": true
}
object SubmissionTransition
{
  "type": "object",
  "required": [
    "action"
  ],
  "properties": {
    "action": {
      "enum": [
        "APPROVE",
        "REJECT"
      ],
      "type": "string",
      "example": "APPROVE",
      "description": "Action to execute."
    },
    "message": {
      "type": "string",
      "example": "Good explanation of the situation.",
      "description": "Required if action is 'REJECT'. Message sent to the participant\nexplaining the reason for the rejection.\nIt must be at least 100 chars long."
    },
    "rejection_category": {
      "enum": [
        "TOO_QUICKLY",
        "TOO_SLOWLY",
        "FAILED_INSTRUCTIONS",
        "INCOMP_LONGITUDINAL",
        "FAILED_CHECK",
        "LOW_EFFORT",
        "MALINGERING",
        "NO_CODE",
        "BAD_CODE",
        "NO_DATA",
        "UNSUPP_DEVICE",
        "OTHER"
      ],
      "type": "string",
      "example": "LOW_EFFORT",
      "description": "Required if action is 'REJECT', it sums as the category of\nthe rejection."
    }
  }
}
object SubmissionsBulkApproveRequest
{
  "oneOf": [
    {
      "title": "Participant IDs",
      "required": [
        "study_id",
        "participant_ids"
      ],
      "properties": {
        "study_id": {
          "type": "string"
        },
        "participant_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    {
      "title": "Submission IDs",
      "required": [
        "submission_ids"
      ],
      "properties": {
        "submission_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  ]
}
string SubmissionsBulkApproveResponse
{
  "type": "string",
  "example": "The request to bulk approve has been made successfully."
}
object SubmissionsRequestReturnRequest
{
  "type": "object",
  "example": {
    "request_return_reasons": [
      "Withdrew consent.",
      "Did not finish study."
    ]
  },
  "required": [
    "request_return_reasons"
  ],
  "properties": {
    "request_return_reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
object SubscriptionDetail
{
  "type": "object",
  "required": [
    "event_type",
    "target_url",
    "workspace_id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "The ID of the subscription."
    },
    "event_type": {
      "type": "string",
      "description": "The name of the event type associated to the subscription."
    },
    "is_enabled": {
      "type": "boolean",
      "description": "Whether the subscription is enabled or not."
    },
    "target_url": {
      "type": "string",
      "description": "The URL that the subscription will notify when your event type is triggered."
    },
    "workspace_id": {
      "type": "string",
      "description": "The ID of the workspace we will create the subscription in."
    }
  },
  "additionalProperties": true
}
object SubscriptionEvent
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the subscription event."
    },
    "status": {
      "enum": [
        "PENDING",
        "SUCCEEDED",
        "FAILED"
      ],
      "type": "string",
      "description": "The status of the event. Will be `FAILED` if the `target_url` response is not 2xx."
    },
    "payload": {
      "type": "object",
      "nullable": true,
      "description": "The event payload that was sent to the target url."
    },
    "event_type": {
      "type": "string",
      "description": "The event type that was triggered."
    },
    "target_url": {
      "type": "string",
      "description": "The URL where the event payload is sent."
    },
    "resource_id": {
      "type": "string",
      "description": "The Prolific Resource ID that the event is linked to."
    },
    "datetime_created": {
      "type": "string",
      "description": "The time the event was created."
    },
    "datetime_updated": {
      "type": "string",
      "description": "The last time the event was updated."
    }
  }
}
object SubscriptionEventList
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SubscriptionEvent"
      },
      "description": "All the events triggered for the subscription"
    }
  },
  "additionalProperties": true
}
object SubscriptionList
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SubscriptionDetail"
      },
      "description": "List of all subscriptions."
    }
  },
  "additionalProperties": true
}
object SubscriptionUpdateDetail
{
  "type": "object",
  "required": [
    "event_type",
    "target_url"
  ],
  "properties": {
    "event_type": {
      "type": "string",
      "description": "The name of the event type associated to the subscription."
    },
    "is_enabled": {
      "type": "boolean",
      "description": "Whether the subscription is enabled or not."
    },
    "target_url": {
      "type": "string",
      "description": "The URL that the subscription will notify when your event type is triggered."
    }
  },
  "additionalProperties": true
}
object SurveyAnswerOption
{
  "type": "object",
  "title": "AnswerOption",
  "required": [
    "value"
  ],
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "format": "uuid"
    },
    "value": {
      "type": "string",
      "title": "Value",
      "example": "Potato",
      "maxLength": 140,
      "description": "The answer option value that can be selected."
    }
  },
  "description": "Responsible for defining an answer model for a given question"
}
object SurveyIn
{
  "type": "object",
  "title": "SurveyIn",
  "required": [
    "researcher_id",
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "title": "Title",
      "example": "A survey about vegetables",
      "description": "The survey title."
    },
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveySection"
      },
      "title": "Sections",
      "description": "An array of sections in the survey, or use `questions`."
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyQuestion"
      },
      "title": "Questions",
      "description": "An array of questions in the survey, or use `sections`."
    },
    "researcher_id": {
      "type": "string",
      "title": "Researcher Id",
      "example": "7172727272",
      "description": "The Prolific researcher ID."
    }
  },
  "description": "The model used to create a `Survey`."
}
object SurveyOut
{
  "type": "object",
  "title": "SurveyOut",
  "required": [
    "researcher_id",
    "title"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "title": " Id",
      "description": "Auto generated by the system."
    },
    "title": {
      "type": "string",
      "title": "Title",
      "example": "A survey about vegetables",
      "description": "The survey title."
    },
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveySection"
      },
      "title": "Sections",
      "description": "Optional: An array of sections in the survey, otherwise `questions` will be defined."
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyQuestion"
      },
      "title": "Questions",
      "description": "Optional: An array of questions in the survey, otherwise `sections` will be defined."
    },
    "date_created": {
      "type": "string",
      "title": "Date Created",
      "format": "date-time",
      "example": "2022-05-27T08:43:12",
      "description": "The date/time the survey was created (UTC)."
    },
    "date_modified": {
      "type": "string",
      "title": "Date Modified",
      "format": "date-time",
      "example": "2022-05-27T08:43:12",
      "description": "The date/time the survey was modified (UTC)."
    },
    "researcher_id": {
      "type": "string",
      "title": "Researcher Id",
      "example": "7172727272",
      "description": "The Prolific researcher ID."
    }
  },
  "description": "The model used to create a serialised representation a `Survey`."
}
object SurveyQuestion
{
  "type": "object",
  "title": "Question",
  "required": [
    "answers",
    "title",
    "type"
  ],
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "format": "uuid"
    },
    "type": {
      "$ref": "#/components/schemas/SurveyQuestionType"
    },
    "title": {
      "type": "string",
      "title": "Title",
      "example": "What is your favourite root vegetable?",
      "maxLength": 200,
      "description": "The question title."
    },
    "answers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyAnswerOption"
      },
      "title": "Answers",
      "maxItems": 10,
      "description": "An array of answer options for a question."
    }
  },
  "description": "Responsible for defining a question within a survey.",
  "x-konfig-properties": {
    "type": {
      "example": "single",
      "description": "The type of question being asked."
    }
  }
}
object SurveyQuestionResponse
{
  "type": "object",
  "title": "QuestionResponse",
  "required": [
    "answers",
    "question_id",
    "question_title"
  ],
  "properties": {
    "answers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyResponseAnswer"
      },
      "title": "Answers",
      "description": "The answers selected."
    },
    "question_id": {
      "type": "string",
      "title": "Question Id",
      "format": "uuid",
      "description": "The question ID."
    },
    "question_title": {
      "type": "string",
      "title": "Question Title",
      "description": "The title of the survey question."
    }
  },
  "description": "Responsible for defining an answer to a survey question"
}
string SurveyQuestionType
{
  "enum": [
    "single",
    "multiple"
  ],
  "type": "string",
  "title": "QuestionType",
  "description": "Responsible for articulating the question type. At the moment we have:\n\n- single answer\n- multiple answer\n\nArgs:\n    str (_type_): The type of question.\n    Enum (_type_): The class to define an enum."
}
object SurveyResponseAnswer
{
  "type": "object",
  "title": "ResponseAnswer",
  "required": [
    "answer_id",
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "title": "Value",
      "example": "Potato",
      "description": "The answer option value selected."
    },
    "answer_id": {
      "type": "string",
      "title": "Answer Id",
      "format": "uuid",
      "description": "The answer ID."
    }
  },
  "description": "Responsible for defining a response to a question"
}
object SurveyResponseIn
{
  "type": "object",
  "title": "ResponseIn",
  "required": [
    "participant_id",
    "submission_id"
  ],
  "properties": {
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyResponseSection"
      },
      "title": "Sections",
      "description": "An array of sections from the survey, otherwise use `questions`."
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyQuestionResponse"
      },
      "title": "Questions",
      "description": "An array of questions from the survey, otherwise use `sections`."
    },
    "submission_id": {
      "type": "string",
      "title": "Submission Id",
      "example": "62908f0b98a55b36ac68b992",
      "description": "The Prolific submission ID."
    },
    "participant_id": {
      "type": "string",
      "title": "Participant Id",
      "example": "62908f0b98a55b36ac68b992",
      "description": "The Prolific participant ID."
    }
  },
  "description": "The model used to create a `Response`."
}
object SurveyResponseOut
{
  "type": "object",
  "title": "ResponseOut",
  "required": [
    "participant_id",
    "submission_id"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "title": " Id"
    },
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyResponseSection"
      },
      "title": "Sections",
      "description": "An array of sections from the survey, otherwise `questions`."
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyQuestionResponse"
      },
      "title": "Questions",
      "description": "An array of questions from the survey, otherwise `sections`."
    },
    "date_created": {
      "type": "string",
      "title": "Date Created",
      "format": "date-time",
      "example": "2022-05-27T08:43:12",
      "description": "The date/time the response was created (UTC)."
    },
    "date_modified": {
      "type": "string",
      "title": "Date Modified",
      "format": "date-time",
      "example": "2022-05-27T08:43:12",
      "description": "The date/time the response was modified (UTC)."
    },
    "submission_id": {
      "type": "string",
      "title": "Submission Id",
      "example": "62908f0b98a55b36ac68b992",
      "description": "The Prolific submission ID."
    },
    "participant_id": {
      "type": "string",
      "title": "Participant Id",
      "example": "62908f0b98a55b36ac68b992",
      "description": "The Prolific participant ID."
    }
  },
  "description": "The model used to create a serialised representation a `Response`."
}
object SurveyResponseSection
{
  "type": "object",
  "title": "Section",
  "required": [
    "questions",
    "section_id"
  ],
  "properties": {
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyQuestionResponse"
      },
      "title": "Questions",
      "description": "The questions for a given section."
    },
    "section_id": {
      "type": "string",
      "title": "Section Id",
      "format": "uuid",
      "description": "The section ID."
    }
  },
  "description": "Responsible for linking question/answers to a response for a survey.\n\nThis is more of a long term thing, but helps if we add now."
}
object SurveySection
{
  "type": "object",
  "title": "Section",
  "required": [
    "questions",
    "title"
  ],
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "format": "uuid",
      "description": "Auto generated by the system."
    },
    "title": {
      "type": "string",
      "title": "Title",
      "example": "Root vegetables",
      "description": "The section title."
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveyQuestion"
      },
      "title": "Questions",
      "maxItems": 5,
      "description": "An array of questions a section within a Survey."
    }
  },
  "description": "Responsible for providing a section to the survey.\n\nThis is more of a long term thing, but helps if we add now."
}
object SurveySummary
{
  "type": "object",
  "title": "Summary",
  "example": {
    "questions": [
      {
        "answers": [
          {
            "count": 4,
            "answer": "Yes",
            "answer_id": "4c69011b-9b6b-46c6-8ba2-da80761131dc"
          },
          {
            "count": 6,
            "answer": "No",
            "answer_id": "f3c8d38f-842c-49d9-a0bb-e17b7803b240"
          }
        ],
        "question": "Do you feel that this will all be alright on the night?",
        "question_id": "02dee012-25e4-449e-8f2f-a552b9007d92",
        "total_answers": 10
      }
    ],
    "survey_id": "63346b3a4fd1fe7b39f192e9"
  },
  "required": [
    "survey_id"
  ],
  "properties": {
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveySummaryQuestion"
      },
      "title": "Questions",
      "description": "A list of questions for the given survey."
    },
    "survey_id": {
      "type": "string",
      "title": "Survey Id",
      "description": "The survey ID."
    }
  },
  "description": "Responsible for providing a base for all the aggregated answers for a survey."
}
object SurveySummaryAnswer
{
  "type": "object",
  "title": "SummaryAnswer",
  "required": [
    "answer"
  ],
  "properties": {
    "count": {
      "type": "integer",
      "title": "Count",
      "default": 0,
      "description": "The count of how many times this answer was used in a response."
    },
    "answer": {
      "type": "string",
      "title": "Answer",
      "description": "The answer selected."
    },
    "answer_id": {
      "type": "string",
      "title": "Answer Id",
      "format": "uuid",
      "description": "The answer ID."
    }
  },
  "description": "Responsible for housing the aggregation for a specific answer."
}
object SurveySummaryQuestion
{
  "type": "object",
  "title": "SummaryQuestion",
  "required": [
    "question"
  ],
  "properties": {
    "answers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SurveySummaryAnswer"
      },
      "title": "Answers",
      "description": "A list of aggregated answer information."
    },
    "question": {
      "type": "string",
      "title": "Question",
      "description": "The title of the question."
    },
    "question_id": {
      "type": "string",
      "title": "Question Id",
      "format": "uuid",
      "description": "The question ID."
    },
    "total_answers": {
      "type": "integer",
      "title": "Total Answers",
      "default": 0,
      "description": "The total number of answered responses for a given question."
    }
  },
  "description": "Responsible for housing the questions we want to aggregate for the summary."
}
object SurveysDeleteAllResponsesResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SurveysDeleteResponseResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SurveysDeleteSingleSurveyResponse
{
  "type": "object",
  "example": {},
  "properties": {}
}
object SurveysGetAllResponsesResponse
{
  "type": "object",
  "example": {
    "results": [
      {
        "id": "63063d07691a81e96a6e8494X",
        "sections": [
          {
            "questions": [
              {
                "answers": [
                  {
                    "value": "Yes",
                    "answer_id": "c72d8cf9-5429-40ae-ac74-10041ed68824"
                  }
                ],
                "question_id": "3797222e-f731-4bea-838b-f668682d902d",
                "question_title": "Do you like ice cream?"
              }
            ],
            "section_id": "75ac961f-d94a-4490-af8f-935ca088315f"
          }
        ],
        "date_created": "2022-08-24T15:00:23.325000",
        "date_modified": "2022-08-24T15:00:23.325000",
        "submission_id": "63063cfc71fd74aad90886c4",
        "participant_id": "5c83c95d4c266300156edc01"
      },
      {
        "id": "63063d03691a81e96a6e8493X",
        "sections": [
          {
            "questions": [
              {
                "answers": [
                  {
                    "value": "No",
                    "answer_id": "a2de5745-b0b4-421b-98ec-23935c78be13"
                  }
                ],
                "question_id": "3797222e-f731-4bea-838b-f668682d902d",
                "question_title": "Do you like ice cream?"
              }
            ],
            "section_id": "75ac961f-d94a-4490-af8f-935ca088315f"
          }
        ],
        "date_created": "2022-08-24T15:00:19.478000",
        "date_modified": "2022-08-24T15:00:19.478000",
        "submission_id": "5e0f36b63ccda26295505f0d",
        "participant_id": "5c83c95d4c266300156edc01"
      }
    ]
  },
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "63063d07691a81e96a6e8494"
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "questions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "answers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "Yes"
                            },
                            "answer_id": {
                              "type": "string",
                              "example": "c72d8cf9-5429-40ae-ac74-10041ed68824"
                            }
                          }
                        }
                      },
                      "question_id": {
                        "type": "string",
                        "example": "3797222e-f731-4bea-838b-f668682d902d"
                      },
                      "question_title": {
                        "type": "string",
                        "example": "Do you like ice cream?"
                      }
                    }
                  }
                },
                "section_id": {
                  "type": "string",
                  "example": "75ac961f-d94a-4490-af8f-935ca088315f"
                }
              }
            }
          },
          "date_created": {
            "type": "string",
            "example": "2022-08-24T15:00:23.325000"
          },
          "date_modified": {
            "type": "string",
            "example": "2022-08-24T15:00:23.325000"
          },
          "submission_id": {
            "type": "string",
            "example": "63063cfc71fd74aad90886c4"
          },
          "participant_id": {
            "type": "string",
            "example": "5c83c95d4c266300156edc01"
          }
        }
      }
    }
  }
}
object UpdateFilterSet
{
  "type": "object",
  "example": [
    {
      "name": "Left-handed 30-somethings",
      "filters": [
        {
          "id": "handedness",
          "selected_values": [
            "1"
          ]
        },
        {
          "id": "age",
          "selected_range": {
            "lower": 30,
            "upper": 39
          }
        }
      ]
    }
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the filter set."
    },
    "filters": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SelectFilter"
          },
          {
            "$ref": "#/components/schemas/RangeFilter"
          }
        ]
      },
      "description": "List of all filters contained in the filter set."
    }
  }
}
object User
{
  "type": "object",
  "required": [
    "email",
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "email": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
object Workspace
{
  "type": "object",
  "example": {
    "id": "62fce6fff0a78eb4f3ebc09cX",
    "owner": "60a42f4c693c29420793cb73",
    "title": "My workspace",
    "users": [
      {
        "id": "60a42f4c693c29420793cb73X",
        "name": "Joe Soap",
        "email": "joe.soap@gmail.com",
        "roles": [
          "WORKSPACE_ADMIN"
        ]
      }
    ],
    "wallet": "61a65c06b084910b3f0c00d6",
    "projects": [
      {
        "id": "60a42f4c693c29420793cb73X"
      }
    ],
    "description": "This workspace does..."
  },
  "required": [
    "id",
    "title"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workspace id. It is created by Prolific."
    },
    "owner": {
      "type": "string",
      "description": "Workspace id. It is created by Prolific."
    },
    "title": {
      "type": "string",
      "description": "Name of workspace"
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkspaceUser"
      },
      "description": "Data for a user related to a workspace"
    },
    "wallet": {
      "type": "string",
      "description": "Wallet tied to workspace"
    },
    "projects": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectShort"
      },
      "description": "Data for a project related to a workspace"
    },
    "description": {
      "type": "string",
      "description": "What is this workspace used for"
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "The rate at which the studies within this workspace are distributed."
    }
  },
  "additionalProperties": true
}
object WorkspaceBalance
{
  "type": "object",
  "example": {
    "currency_code": "GBP",
    "total_balance": 630,
    "available_balance": 210,
    "balance_breakdown": {
      "vat": 30,
      "fees": 150,
      "rewards": 450
    },
    "available_balance_breakdown": {
      "vat": 10,
      "fees": 50,
      "rewards": 150
    }
  },
  "properties": {
    "currency_code": {
      "type": "string",
      "description": "The currency used for all financial transactions within the workspace."
    },
    "total_balance": {
      "type": "integer",
      "description": "The total balance of the workspace, including funds which have already been assigned to active studies.\n\nAll monetary values are shown in the sub-currency of your workspace currency (e.g. pence, cents)."
    },
    "available_balance": {
      "type": "integer",
      "description": "The remaining balance of your workspace which is available to spend, after removing funds assigned to already active studies, etc."
    },
    "balance_breakdown": {
      "type": "object",
      "description": "A breakdown of the total balance of the workspace into:\n- Funds available to pay to participants\n- Funds pre-paid to Prolific for our services\n- Funds for any VAT applied to our service fees"
    },
    "available_balance_breakdown": {
      "type": "object",
      "description": "A breakdown of the available balance of the workspace into:\n- Funds available to pay to participants\n- Funds pre-paid to Prolific for our services\n- Funds for any VAT applied to our service fees"
    }
  }
}
object WorkspaceShort
{
  "type": "object",
  "example": {
    "id": "62fce6fff0a78eb4f3ebc09cX",
    "owner": "60a42f4c693c29420793cb73",
    "title": "My workspace",
    "users": [
      {
        "id": "60a42f4c693c29420793cb73X",
        "name": "Joe Soap",
        "email": "joe.soap@gmail.com",
        "roles": [
          "WORKSPACE_ADMIN"
        ]
      }
    ],
    "description": "This workspace does...",
    "naivety_distribution_rate": 0.5
  },
  "required": [
    "id",
    "title"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workspace id. It is created by Prolific."
    },
    "owner": {
      "type": "string",
      "description": "User id of the creator of the workspace. It is created by Prolific."
    },
    "title": {
      "type": "string",
      "description": "Name of workspace"
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkspaceUser"
      },
      "description": "Data for all users who have access to this workspace"
    },
    "description": {
      "type": "string",
      "description": "What is this workspace used for"
    },
    "naivety_distribution_rate": {
      "type": "number",
      "maximum": 1,
      "minimum": 0,
      "nullable": true,
      "description": "The rate at which the studies within this project are distributed."
    }
  },
  "additionalProperties": true
}
object WorkspaceUser
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Id of user"
    },
    "name": {
      "type": "string",
      "description": "Name of user"
    },
    "email": {
      "type": "string",
      "description": "email of user"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "User roles in workspace"
    }
  }
}
object WorkspacesListResponse
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WorkspaceShort"
      },
      "description": "List of all workspaces for user"
    }
  },
  "additionalProperties": true
}