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

Clear filters

Filter sets 1 endpoints

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}

Hooks 1 endpoints

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}

Participant groups 1 endpoints

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}

Projects 1 endpoints

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}

Studies 1 endpoints

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}

Study collections 1 endpoints

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}

Workspaces 1 endpoints

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}

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
}