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

Create survey

|View as Markdown|Open in Claude|
POST
https://api.prolific.com/api/v1/surveys/
POST
/api/v1/surveys/
$curl -X POST https://api.prolific.com/api/v1/surveys/ \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "researcher_id": "7172727272",
> "title": "A survey with questions",
> "questions": [
> {
> "answers": [
> {
> "value": "Potato",
> "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
> }
> ],
> "title": "What is your favourite root vegetable?",
> "type": "single",
> "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
> }
> ]
>}'
1{
2 "researcher_id": "7172727272",
3 "title": "A survey about vegetables",
4 "_id": "string",
5 "date_created": "2022-05-27T08:43:12",
6 "date_modified": "2022-05-27T08:43:12",
7 "sections": [
8 {
9 "questions": [
10 {
11 "answers": [
12 {
13 "value": "Potato",
14 "id": "string"
15 }
16 ],
17 "title": "What is your favourite root vegetable?",
18 "type": "single",
19 "id": "string"
20 }
21 ],
22 "title": "Root vegetables",
23 "id": "string"
24 }
25 ],
26 "questions": [
27 {
28 "answers": [
29 {
30 "value": "Potato",
31 "id": "string"
32 }
33 ],
34 "title": "What is your favourite root vegetable?",
35 "type": "single",
36 "id": "string"
37 }
38 ]
39}

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

Was this page helpful?
Previous

Get all surveys

Next

Get survey

Authentication

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

Request

This endpoint expects an object.
researcher_idstringRequired
The Prolific researcher ID.
titlestringRequired
The survey title.
sectionslist of objectsOptional

An array of sections in the survey, or use questions.

questionslist of objectsOptional

An array of questions in the survey, or use sections.

Response

Successful Response
researcher_idstring
The Prolific researcher ID.
titlestring
The survey title.
_idstring
Auto generated by the system.
date_createddatetime

The date/time the survey was created (UTC).

date_modifieddatetime

The date/time the survey was modified (UTC).

sectionslist of objects

Optional: An array of sections in the survey, otherwise questions will be defined.

questionslist of objects

Optional: An array of questions in the survey, otherwise sections will be defined.

Errors

4XX
Client Request Error

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

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

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

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