Prolific

Research participant recruitment platform

docs.prolific.com ↗
Version
1.0
OpenAPI
3.0.1
Endpoints
78
Schemas
115
76
Quality
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

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/

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

application/json
schema BonusesSetUpPaymentsRequest
Property Type Required
study_id string optional
csv_bonuses string optional

Responses

4XX

Error

201

Bonus created

POST /api/v1/submissions/bonus-payments

Filtersets 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

application/json
schema CreateFilterSet
Property Type Required
name string optional
filters array optional
workspace_id string optional
organisation_id string optional

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

application/json
schema UpdateFilterSet
Property Type Required
name string optional
filters array optional

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

application/json
schema FilterSetsCloneFilterSetRequest
Property Type Required
new_name string optional

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

application/json
schema RequirementsCountRequest
Property Type Required
filters array required
workspace_id string optional
organisation_id string optional

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

application/json
schema CreateSecret
Property Type Required
workspace_id string optional

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

application/json
schema SubscriptionDetail
Property Type Required
id string optional
event_type string required
is_enabled boolean optional
target_url string required
workspace_id string required

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

application/json
schema SubscriptionUpdateDetail
Property Type Required
event_type string required
is_enabled boolean optional
target_url string required

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

application/json
schema SubscriptionDetail
Property Type Required
id string optional
event_type string required
is_enabled boolean optional
target_url string required
workspace_id string required

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

required
application/json
schema CreateInvitationRequest
Property Type Required
role string optional
emails array optional
association string optional

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

application/json
schema SendMessage
Property Type Required
body string required
study_id string required
recipient_id string required

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

application/json
schema SendBulkMessage
Property Type Required
ids array required
body string required
study_id string required

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

Participantgroups 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

required
application/json
schema ParticipantGroupsCreateNewGroupRequest
Property Type Required
name string required
description string optional
workspace_id string optional
organisation_id string optional
participant_ids array optional

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

application/json
schema ParticipantGroupUpdate
Property Type Required
name string optional
participant_ids array optional

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

required
application/json
schema ParticipantIDList
Property Type Required
participant_ids array optional

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

required
application/json
schema ParticipantIDList
Property Type Required
participant_ids array optional

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

application/json
schema Project
Property Type Required
id string required
owner string optional
title string required
users array optional
id string required
name string optional
email string optional
roles array optional
workspace string optional
description string optional
naivety_distribution_rate number optional

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

application/json
schema CreateProject
Property Type Required
title string required
naivety_distribution_rate number optional

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

application/json
schema CreateStudy
Property Type Required
name string required
reward number required
filters array optional
project string optional
metadata string optional
description string required
study_labels array optional
filter_set_id string optional
internal_name string optional
completion_codes array required
code string required
actions array required
code_type string required
content_warnings array optional
completion_option string required
external_study_url string required
filter_set_version integer optional
prolific_id_option string required
submissions_config object optional
max_concurrent_submissions integer optional
max_submissions_per_participant integer optional
device_compatibility array optional
maximum_allowed_time number optional
total_available_places number required
content_warning_details string optional
…3 more object optional

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. 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
operationId: Studies_updateStudyDetails

Parameters

Name In Required Type Description
id path required string

Study id

Request Body

application/json
schema BaseStudy
Property Type Required
name string optional
reward number optional
filters array optional
project string optional
metadata string optional
description string optional
study_labels array optional
filter_set_id string optional
internal_name string optional
completion_codes array optional
code string required
actions array required
code_type string required
content_warnings array optional
completion_option string optional
external_study_url string optional
filter_set_version integer optional
prolific_id_option string optional
submissions_config object optional
max_concurrent_submissions integer optional
max_submissions_per_participant integer optional
device_compatibility array optional
maximum_allowed_time number optional
total_available_places number optional
content_warning_details string optional
…3 more object optional

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

application/json
schema StudiesDuplicateStudyRequest
Property Type Required
block_previous_participants boolean optional

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.

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

operationId: Studies_publishDraftStudy

Parameters

Name In Required Type Description
id path required string

Study id

Request Body

application/json
schema StudyTransition
Property Type Required
action string required

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

application/json
schema StudyCostRequest
Property Type Required
reward number required
total_available_places number required

Responses

4XX

Error

200

Calculated total cost

POST /api/v1/study-cost-calculator

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."
    }
  }
}