> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.prolific.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.prolific.com/_mcp/server.

# Reviewing submissions and rewards

This guide covers how to set up rewards and approve submissions via the API.

When creating the study, set the reward for completing the task. Read [our guide here](https://researcher-help.prolific.com/en/article/8d9da9) on how to decide on a reward amount.

For a participant to be paid, their submission needs to be approved. There are 3 ways to approve a submission:

## Option 1: Automatic approval

#### Create the study

### Request

POST [https://api.prolific.com/api/v1/studies/](https://api.prolific.com/api/v1/studies/)

```curl study_with_automatic_approval
curl -X POST https://api.prolific.com/api/v1/studies/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "name": "A study with automatic approval",
  "description": "A short survey which submissions are automatically approved",
  "external_study_url": "https://google.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 160,
  "completion_codes": [
    {
      "code": "K3C8R0",
      "code_type": "COMPLETED",
      "actions": [
        {
          "action": "AUTOMATICALLY_APPROVE"
        }
      ]
    }
  ],
  "device_compatibility": [
    "mobile",
    "desktop",
    "tablet"
  ],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": {
    "max_submissions_per_participant": 1
  },
  "completion_code": "K3C8R0"
}'
```

```python study_with_automatic_approval
import requests

url = "https://api.prolific.com/api/v1/studies/"

payload = {
    "name": "A study with automatic approval",
    "description": "A short survey which submissions are automatically approved",
    "external_study_url": "https://google.com",
    "prolific_id_option": "question",
    "total_available_places": 10,
    "estimated_completion_time": 1,
    "reward": 160,
    "completion_codes": [
        {
            "code": "K3C8R0",
            "code_type": "COMPLETED",
            "actions": [{ "action": "AUTOMATICALLY_APPROVE" }]
        }
    ],
    "device_compatibility": ["mobile", "desktop", "tablet"],
    "peripheral_requirements": [],
    "filters": [],
    "submissions_config": { "max_submissions_per_participant": 1 },
    "completion_code": "K3C8R0"
}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript study_with_automatic_approval
const url = 'https://api.prolific.com/api/v1/studies/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"name":"A study with automatic approval","description":"A short survey which submissions are automatically approved","external_study_url":"https://google.com","prolific_id_option":"question","total_available_places":10,"estimated_completion_time":1,"reward":160,"completion_codes":[{"code":"K3C8R0","code_type":"COMPLETED","actions":[{"action":"AUTOMATICALLY_APPROVE"}]}],"device_compatibility":["mobile","desktop","tablet"],"peripheral_requirements":[],"filters":[],"submissions_config":{"max_submissions_per_participant":1},"completion_code":"K3C8R0"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go study_with_automatic_approval
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/studies/"

	payload := strings.NewReader("{\n  \"name\": \"A study with automatic approval\",\n  \"description\": \"A short survey which submissions are automatically approved\",\n  \"external_study_url\": \"https://google.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 160,\n  \"completion_codes\": [\n    {\n      \"code\": \"K3C8R0\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"AUTOMATICALLY_APPROVE\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"K3C8R0\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby study_with_automatic_approval
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/studies/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"A study with automatic approval\",\n  \"description\": \"A short survey which submissions are automatically approved\",\n  \"external_study_url\": \"https://google.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 160,\n  \"completion_codes\": [\n    {\n      \"code\": \"K3C8R0\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"AUTOMATICALLY_APPROVE\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"K3C8R0\"\n}"

response = http.request(request)
puts response.read_body
```

```java study_with_automatic_approval
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/studies/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"A study with automatic approval\",\n  \"description\": \"A short survey which submissions are automatically approved\",\n  \"external_study_url\": \"https://google.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 160,\n  \"completion_codes\": [\n    {\n      \"code\": \"K3C8R0\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"AUTOMATICALLY_APPROVE\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"K3C8R0\"\n}")
  .asString();
```

```php study_with_automatic_approval
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/studies/', [
  'body' => '{
  "name": "A study with automatic approval",
  "description": "A short survey which submissions are automatically approved",
  "external_study_url": "https://google.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 160,
  "completion_codes": [
    {
      "code": "K3C8R0",
      "code_type": "COMPLETED",
      "actions": [
        {
          "action": "AUTOMATICALLY_APPROVE"
        }
      ]
    }
  ],
  "device_compatibility": [
    "mobile",
    "desktop",
    "tablet"
  ],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": {
    "max_submissions_per_participant": 1
  },
  "completion_code": "K3C8R0"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp study_with_automatic_approval
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/studies/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"A study with automatic approval\",\n  \"description\": \"A short survey which submissions are automatically approved\",\n  \"external_study_url\": \"https://google.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 160,\n  \"completion_codes\": [\n    {\n      \"code\": \"K3C8R0\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"AUTOMATICALLY_APPROVE\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"K3C8R0\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift study_with_automatic_approval
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "A study with automatic approval",
  "description": "A short survey which submissions are automatically approved",
  "external_study_url": "https://google.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 160,
  "completion_codes": [
    [
      "code": "K3C8R0",
      "code_type": "COMPLETED",
      "actions": [["action": "AUTOMATICALLY_APPROVE"]]
    ]
  ],
  "device_compatibility": ["mobile", "desktop", "tablet"],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": ["max_submissions_per_participant": 1],
  "completion_code": "K3C8R0"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/studies/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

#### On your survey tool

When the participant completes the task, redirect them to Prolific with the completion code:

```
https://app.prolific.com/submissions/complete?cc={completion code}
```

See our [integration
guide](https://researcher-help.prolific.com/en/articles/445179-survey-software-integration-guides) for various
survey tools.

#### Publish the study

### Request

POST [https://api.prolific.com/api/v1/studies/\{id}/transition/](https://api.prolific.com/api/v1/studies/\{id}/transition/)

```curl Publish a draft study
curl -X POST https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "action": "PUBLISH"
}'
```

```python Publish a draft study
import requests

url = "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/"

payload = { "action": "PUBLISH" }
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Publish a draft study
const url = 'https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"action":"PUBLISH"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Publish a draft study
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/"

	payload := strings.NewReader("{\n  \"action\": \"PUBLISH\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Publish a draft study
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"PUBLISH\"\n}"

response = http.request(request)
puts response.read_body
```

```java Publish a draft study
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"PUBLISH\"\n}")
  .asString();
```

```php Publish a draft study
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/', [
  'body' => '{
  "action": "PUBLISH"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Publish a draft study
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"PUBLISH\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Publish a draft study
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = ["action": "PUBLISH"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

Participants will then be automatically paid once they complete the submission.

## Option 2: Manual review

#### Create the study

### Request

POST [https://api.prolific.com/api/v1/studies/](https://api.prolific.com/api/v1/studies/)

```curl minimal_study
curl -X POST https://api.prolific.com/api/v1/studies/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "name": "Minimally Configured Study",
  "description": "Study configured with only the required fields for 10 places and £1 reward",
  "external_study_url": "https://example.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 100,
  "completion_codes": [
    {
      "code": "ABC123",
      "code_type": "COMPLETED",
      "actions": [
        {
          "action": "MANUALLY_REVIEW"
        }
      ]
    }
  ],
  "device_compatibility": [
    "mobile",
    "desktop",
    "tablet"
  ],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": {
    "max_submissions_per_participant": 1
  },
  "completion_code": "ABC123"
}'
```

```python minimal_study
import requests

url = "https://api.prolific.com/api/v1/studies/"

payload = {
    "name": "Minimally Configured Study",
    "description": "Study configured with only the required fields for 10 places and £1 reward",
    "external_study_url": "https://example.com",
    "prolific_id_option": "question",
    "total_available_places": 10,
    "estimated_completion_time": 1,
    "reward": 100,
    "completion_codes": [
        {
            "code": "ABC123",
            "code_type": "COMPLETED",
            "actions": [{ "action": "MANUALLY_REVIEW" }]
        }
    ],
    "device_compatibility": ["mobile", "desktop", "tablet"],
    "peripheral_requirements": [],
    "filters": [],
    "submissions_config": { "max_submissions_per_participant": 1 },
    "completion_code": "ABC123"
}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript minimal_study
const url = 'https://api.prolific.com/api/v1/studies/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Minimally Configured Study","description":"Study configured with only the required fields for 10 places and £1 reward","external_study_url":"https://example.com","prolific_id_option":"question","total_available_places":10,"estimated_completion_time":1,"reward":100,"completion_codes":[{"code":"ABC123","code_type":"COMPLETED","actions":[{"action":"MANUALLY_REVIEW"}]}],"device_compatibility":["mobile","desktop","tablet"],"peripheral_requirements":[],"filters":[],"submissions_config":{"max_submissions_per_participant":1},"completion_code":"ABC123"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go minimal_study
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/studies/"

	payload := strings.NewReader("{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby minimal_study
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/studies/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}"

response = http.request(request)
puts response.read_body
```

```java minimal_study
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/studies/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}")
  .asString();
```

```php minimal_study
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/studies/', [
  'body' => '{
  "name": "Minimally Configured Study",
  "description": "Study configured with only the required fields for 10 places and £1 reward",
  "external_study_url": "https://example.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 100,
  "completion_codes": [
    {
      "code": "ABC123",
      "code_type": "COMPLETED",
      "actions": [
        {
          "action": "MANUALLY_REVIEW"
        }
      ]
    }
  ],
  "device_compatibility": [
    "mobile",
    "desktop",
    "tablet"
  ],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": {
    "max_submissions_per_participant": 1
  },
  "completion_code": "ABC123"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp minimal_study
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/studies/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift minimal_study
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Minimally Configured Study",
  "description": "Study configured with only the required fields for 10 places and £1 reward",
  "external_study_url": "https://example.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 100,
  "completion_codes": [
    [
      "code": "ABC123",
      "code_type": "COMPLETED",
      "actions": [["action": "MANUALLY_REVIEW"]]
    ]
  ],
  "device_compatibility": ["mobile", "desktop", "tablet"],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": ["max_submissions_per_participant": 1],
  "completion_code": "ABC123"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/studies/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

#### Publish the study

### Request

POST [https://api.prolific.com/api/v1/studies/\{id}/transition/](https://api.prolific.com/api/v1/studies/\{id}/transition/)

```curl Publish a draft study
curl -X POST https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "action": "PUBLISH"
}'
```

```python Publish a draft study
import requests

url = "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/"

payload = { "action": "PUBLISH" }
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Publish a draft study
const url = 'https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"action":"PUBLISH"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Publish a draft study
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/"

	payload := strings.NewReader("{\n  \"action\": \"PUBLISH\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Publish a draft study
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"PUBLISH\"\n}"

response = http.request(request)
puts response.read_body
```

```java Publish a draft study
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"PUBLISH\"\n}")
  .asString();
```

```php Publish a draft study
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/', [
  'body' => '{
  "action": "PUBLISH"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Publish a draft study
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"PUBLISH\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Publish a draft study
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = ["action": "PUBLISH"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

#### On your survey tool

When the participant completes the task, redirect them to Prolific with the completion code:

```
https://app.prolific.com/submissions/complete?cc={completion code}
```

See our [integration
guide](https://researcher-help.prolific.com/en/articles/445179-survey-software-integration-guides) for various
survey tools.

#### Approve the submission

When a participant is sent to the survey tool, their submission ID will be in the URL parameters from Step 1. Use
this submission ID to approve the submission.

### Request

POST [https://api.prolific.com/api/v1/submissions/\{id}/transition/](https://api.prolific.com/api/v1/submissions/\{id}/transition/)

```curl Approving a submission
curl -X POST https://api.prolific.com/api/v1/submissions/id/transition/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "action": "APPROVE"
}'
```

```python Approving a submission
import requests

url = "https://api.prolific.com/api/v1/submissions/id/transition/"

payload = { "action": "APPROVE" }
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Approving a submission
const url = 'https://api.prolific.com/api/v1/submissions/id/transition/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"action":"APPROVE"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Approving a submission
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/submissions/id/transition/"

	payload := strings.NewReader("{\n  \"action\": \"APPROVE\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Approving a submission
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/submissions/id/transition/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"APPROVE\"\n}"

response = http.request(request)
puts response.read_body
```

```java Approving a submission
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/submissions/id/transition/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"APPROVE\"\n}")
  .asString();
```

```php Approving a submission
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/submissions/id/transition/', [
  'body' => '{
  "action": "APPROVE"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Approving a submission
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/submissions/id/transition/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"APPROVE\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Approving a submission
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = ["action": "APPROVE"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/submissions/id/transition/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

## Option 3: Bulk approval

If you prefer to manually review submissions, and are likely to review a large number of submissions at once, use the bulk approval endpoint to prevent being rate limited.

#### Create the study

### Request

POST [https://api.prolific.com/api/v1/studies/](https://api.prolific.com/api/v1/studies/)

```curl minimal_study
curl -X POST https://api.prolific.com/api/v1/studies/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "name": "Minimally Configured Study",
  "description": "Study configured with only the required fields for 10 places and £1 reward",
  "external_study_url": "https://example.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 100,
  "completion_codes": [
    {
      "code": "ABC123",
      "code_type": "COMPLETED",
      "actions": [
        {
          "action": "MANUALLY_REVIEW"
        }
      ]
    }
  ],
  "device_compatibility": [
    "mobile",
    "desktop",
    "tablet"
  ],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": {
    "max_submissions_per_participant": 1
  },
  "completion_code": "ABC123"
}'
```

```python minimal_study
import requests

url = "https://api.prolific.com/api/v1/studies/"

payload = {
    "name": "Minimally Configured Study",
    "description": "Study configured with only the required fields for 10 places and £1 reward",
    "external_study_url": "https://example.com",
    "prolific_id_option": "question",
    "total_available_places": 10,
    "estimated_completion_time": 1,
    "reward": 100,
    "completion_codes": [
        {
            "code": "ABC123",
            "code_type": "COMPLETED",
            "actions": [{ "action": "MANUALLY_REVIEW" }]
        }
    ],
    "device_compatibility": ["mobile", "desktop", "tablet"],
    "peripheral_requirements": [],
    "filters": [],
    "submissions_config": { "max_submissions_per_participant": 1 },
    "completion_code": "ABC123"
}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript minimal_study
const url = 'https://api.prolific.com/api/v1/studies/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Minimally Configured Study","description":"Study configured with only the required fields for 10 places and £1 reward","external_study_url":"https://example.com","prolific_id_option":"question","total_available_places":10,"estimated_completion_time":1,"reward":100,"completion_codes":[{"code":"ABC123","code_type":"COMPLETED","actions":[{"action":"MANUALLY_REVIEW"}]}],"device_compatibility":["mobile","desktop","tablet"],"peripheral_requirements":[],"filters":[],"submissions_config":{"max_submissions_per_participant":1},"completion_code":"ABC123"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go minimal_study
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/studies/"

	payload := strings.NewReader("{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby minimal_study
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/studies/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}"

response = http.request(request)
puts response.read_body
```

```java minimal_study
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/studies/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}")
  .asString();
```

```php minimal_study
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/studies/', [
  'body' => '{
  "name": "Minimally Configured Study",
  "description": "Study configured with only the required fields for 10 places and £1 reward",
  "external_study_url": "https://example.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 100,
  "completion_codes": [
    {
      "code": "ABC123",
      "code_type": "COMPLETED",
      "actions": [
        {
          "action": "MANUALLY_REVIEW"
        }
      ]
    }
  ],
  "device_compatibility": [
    "mobile",
    "desktop",
    "tablet"
  ],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": {
    "max_submissions_per_participant": 1
  },
  "completion_code": "ABC123"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp minimal_study
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/studies/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Minimally Configured Study\",\n  \"description\": \"Study configured with only the required fields for 10 places and £1 reward\",\n  \"external_study_url\": \"https://example.com\",\n  \"prolific_id_option\": \"question\",\n  \"total_available_places\": 10,\n  \"estimated_completion_time\": 1,\n  \"reward\": 100,\n  \"completion_codes\": [\n    {\n      \"code\": \"ABC123\",\n      \"code_type\": \"COMPLETED\",\n      \"actions\": [\n        {\n          \"action\": \"MANUALLY_REVIEW\"\n        }\n      ]\n    }\n  ],\n  \"device_compatibility\": [\n    \"mobile\",\n    \"desktop\",\n    \"tablet\"\n  ],\n  \"peripheral_requirements\": [],\n  \"filters\": [],\n  \"submissions_config\": {\n    \"max_submissions_per_participant\": 1\n  },\n  \"completion_code\": \"ABC123\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift minimal_study
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Minimally Configured Study",
  "description": "Study configured with only the required fields for 10 places and £1 reward",
  "external_study_url": "https://example.com",
  "prolific_id_option": "question",
  "total_available_places": 10,
  "estimated_completion_time": 1,
  "reward": 100,
  "completion_codes": [
    [
      "code": "ABC123",
      "code_type": "COMPLETED",
      "actions": [["action": "MANUALLY_REVIEW"]]
    ]
  ],
  "device_compatibility": ["mobile", "desktop", "tablet"],
  "peripheral_requirements": [],
  "filters": [],
  "submissions_config": ["max_submissions_per_participant": 1],
  "completion_code": "ABC123"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/studies/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

#### Publish the study

### Request

POST [https://api.prolific.com/api/v1/studies/\{id}/transition/](https://api.prolific.com/api/v1/studies/\{id}/transition/)

```curl Publish a draft study
curl -X POST https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "action": "PUBLISH"
}'
```

```python Publish a draft study
import requests

url = "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/"

payload = { "action": "PUBLISH" }
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Publish a draft study
const url = 'https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"action":"PUBLISH"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Publish a draft study
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/"

	payload := strings.NewReader("{\n  \"action\": \"PUBLISH\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Publish a draft study
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"PUBLISH\"\n}"

response = http.request(request)
puts response.read_body
```

```java Publish a draft study
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"PUBLISH\"\n}")
  .asString();
```

```php Publish a draft study
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/', [
  'body' => '{
  "action": "PUBLISH"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Publish a draft study
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"PUBLISH\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Publish a draft study
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = ["action": "PUBLISH"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/studies/60d9aadeb86739de712faee0/transition/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

#### On your survey tool

When the participant completes the task, redirect them to Prolific with the completion code:

```
https://app.prolific.com/submissions/complete?cc={completion code}
```

See our [integration
guide](https://researcher-help.prolific.com/en/articles/445179-survey-software-integration-guides) for various
survey tools.

#### Approve the submissions in bulk

When participants are sent to the survey tool, their submission IDs will be in the URL parameters from Step 1. Use
these submission IDs to approve the submissions in bulk.

### Request

POST [https://api.prolific.com/api/v1/submissions/bulk-approve/](https://api.prolific.com/api/v1/submissions/bulk-approve/)

```curl bulk_approve_multi_submissions
curl -X POST https://api.prolific.com/api/v1/submissions/bulk-approve/ \
     -H "Authorization: Token <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "submission_ids": [
    "60f25f799fbd8a136cc6a9b0",
    "5ce69ff9b1e73b000146186d"
  ]
}'
```

```python bulk_approve_multi_submissions
import requests

url = "https://api.prolific.com/api/v1/submissions/bulk-approve/"

payload = { "submission_ids": ["60f25f799fbd8a136cc6a9b0", "5ce69ff9b1e73b000146186d"] }
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript bulk_approve_multi_submissions
const url = 'https://api.prolific.com/api/v1/submissions/bulk-approve/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"submission_ids":["60f25f799fbd8a136cc6a9b0","5ce69ff9b1e73b000146186d"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go bulk_approve_multi_submissions
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/submissions/bulk-approve/"

	payload := strings.NewReader("{\n  \"submission_ids\": [\n    \"60f25f799fbd8a136cc6a9b0\",\n    \"5ce69ff9b1e73b000146186d\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby bulk_approve_multi_submissions
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/submissions/bulk-approve/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"submission_ids\": [\n    \"60f25f799fbd8a136cc6a9b0\",\n    \"5ce69ff9b1e73b000146186d\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java bulk_approve_multi_submissions
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/submissions/bulk-approve/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"submission_ids\": [\n    \"60f25f799fbd8a136cc6a9b0\",\n    \"5ce69ff9b1e73b000146186d\"\n  ]\n}")
  .asString();
```

```php bulk_approve_multi_submissions
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/submissions/bulk-approve/', [
  'body' => '{
  "submission_ids": [
    "60f25f799fbd8a136cc6a9b0",
    "5ce69ff9b1e73b000146186d"
  ]
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp bulk_approve_multi_submissions
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/submissions/bulk-approve/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"submission_ids\": [\n    \"60f25f799fbd8a136cc6a9b0\",\n    \"5ce69ff9b1e73b000146186d\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift bulk_approve_multi_submissions
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = ["submission_ids": ["60f25f799fbd8a136cc6a9b0", "5ce69ff9b1e73b000146186d"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/submissions/bulk-approve/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

#### Note

* Before you publish a study, make sure you have enough funds in your account to approve the required number of submissions. Check out our [Workspace
  balance & adding money](https://researcher-help.prolific.com/en/articles/445246-workspace-balance) guide to learn
  more.
* Any submissions Awaiting Review 21 days after completion will be auto-approved.