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."
}
Load more schemas