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

# Send a broadcast

POST https://api.prolific.com/api/v1/broadcasts/
Content-Type: application/json

Sends one message to many participants on a study. Each of them gets a new conversation carrying the broadcast's subject, topic and study, with the message as its first message. Replies stay in that conversation, between the participant and the sender.

The broadcast is saved as it was sent and never changes. The conversations are created in the background, so they can take a short while to appear.

Pass your own `id` to make sending safe to repeat. Sending again with an id you've already used returns that broadcast rather than sending it twice.

Every recipient must have a submission for the study, in any status. A broadcast can go to as many people as a bulk message, 4,000 by default, and going over returns a 400 that gives the limit. The study must belong to a workspace you are in. A study you can't broadcast about returns 404, as does the endpoint while broadcasts aren't enabled for the study's workspace.


Reference: https://docs.prolific.com/api-reference/messages/create-broadcast

## Authentication

- `Authorization` header (required) (prefixed with ` Token  `) — 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

### Body (application/json)

This endpoint expects a CreateBroadcast.

- `study_id` (string, required) — The study the broadcast is about.
- `subject` (string, required) — Shown as the title of each recipient's conversation.
- `body` (string, required) — The message, sent as the first message of each conversation.
- `recipient_ids` (list of string, required) — Participants with a submission for the study. Repeats are ignored.
- `audience_source` (enum, required) — Where the recipients were picked.
  - Allowed values: `submissions`
- `id` (string, optional) — An id you choose for the broadcast. Sending again with the same id returns the broadcast already sent. One is made for you if it's left out.
- `topic` (enum, optional, nullable) — Which of the fixed categories it falls under, if any.
  - Allowed values: `payment-timing`, `payment-issues`, `technical-issues`, `feedback`, `rejections`, `other`
- `workspace_id` (string, optional) — Send it as this workspace rather than as yourself. Must be the study's workspace, and requires workspace messaging.

## Response

### 201

The broadcast

- `id` (string, required)
- `study_id` (string, required)
- `subject` (string, required)
- `topic` (string, required, nullable)
- `body` (string, required)
- `audience_source` (string, required)
- `recipient_count` (integer, required)
- `datetime_created` (datetime, required)

## Errors

### 400 Client Request Error

Error

- `status` (integer, required) — Status code as in the http standards
- `error_code` (integer, required) — Internal error code
- `title` (string, required) — Error title
- `detail` (ErrorDetailDetail, required) — Error detail
- `additional_information` (string, optional) — Optional extra information
- `traceback` (string, optional) — Optional debug information
- `interactive` (boolean, optional)

## Types

### ErrorDetailDetail

Error detail

### ErrorDetailDetail2

All fields with validation errors

- `any_field` (list of string, optional) — Name of the field with a validation error and as a value an array with the error descriptions

## Examples

**Request**

```json
{
  "study_id": "719e049f7648a4e1f8f3645a",
  "subject": "Wave 2 is open",
  "body": "Thanks for taking part in wave 1, wave 2 is now open.",
  "recipient_ids": [
    "619e049f7648a4e1f8f3645b",
    "619e049f7648a4e1f8f3645c"
  ],
  "audience_source": "submissions",
  "topic": "other"
}
```

**Response**

```json
{
  "id": "6a0df1a4db9c3b6c71c192a5",
  "study_id": "719e049f7648a4e1f8f3645a",
  "subject": "Wave 2 is open",
  "topic": "other",
  "body": "string",
  "audience_source": "submissions",
  "recipient_count": 312,
  "datetime_created": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

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

payload = {
    "study_id": "719e049f7648a4e1f8f3645a",
    "subject": "Wave 2 is open",
    "body": "Thanks for taking part in wave 1, wave 2 is now open.",
    "recipient_ids": ["619e049f7648a4e1f8f3645b", "619e049f7648a4e1f8f3645c"],
    "audience_source": "submissions",
    "topic": "other"
}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.prolific.com/api/v1/broadcasts/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"study_id":"719e049f7648a4e1f8f3645a","subject":"Wave 2 is open","body":"Thanks for taking part in wave 1, wave 2 is now open.","recipient_ids":["619e049f7648a4e1f8f3645b","619e049f7648a4e1f8f3645c"],"audience_source":"submissions","topic":"other"}'
};

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

```go
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"subject\": \"Wave 2 is open\",\n  \"body\": \"Thanks for taking part in wave 1, wave 2 is now open.\",\n  \"recipient_ids\": [\n    \"619e049f7648a4e1f8f3645b\",\n    \"619e049f7648a4e1f8f3645c\"\n  ],\n  \"audience_source\": \"submissions\",\n  \"topic\": \"other\"\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
require 'uri'
require 'net/http'

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

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  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"subject\": \"Wave 2 is open\",\n  \"body\": \"Thanks for taking part in wave 1, wave 2 is now open.\",\n  \"recipient_ids\": [\n    \"619e049f7648a4e1f8f3645b\",\n    \"619e049f7648a4e1f8f3645c\"\n  ],\n  \"audience_source\": \"submissions\",\n  \"topic\": \"other\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.prolific.com/api/v1/broadcasts/")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"subject\": \"Wave 2 is open\",\n  \"body\": \"Thanks for taking part in wave 1, wave 2 is now open.\",\n  \"recipient_ids\": [\n    \"619e049f7648a4e1f8f3645b\",\n    \"619e049f7648a4e1f8f3645c\"\n  ],\n  \"audience_source\": \"submissions\",\n  \"topic\": \"other\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.prolific.com/api/v1/broadcasts/', [
  'body' => '{
  "study_id": "719e049f7648a4e1f8f3645a",
  "subject": "Wave 2 is open",
  "body": "Thanks for taking part in wave 1, wave 2 is now open.",
  "recipient_ids": [
    "619e049f7648a4e1f8f3645b",
    "619e049f7648a4e1f8f3645c"
  ],
  "audience_source": "submissions",
  "topic": "other"
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/broadcasts/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"study_id\": \"719e049f7648a4e1f8f3645a\",\n  \"subject\": \"Wave 2 is open\",\n  \"body\": \"Thanks for taking part in wave 1, wave 2 is now open.\",\n  \"recipient_ids\": [\n    \"619e049f7648a4e1f8f3645b\",\n    \"619e049f7648a4e1f8f3645c\"\n  ],\n  \"audience_source\": \"submissions\",\n  \"topic\": \"other\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "study_id": "719e049f7648a4e1f8f3645a",
  "subject": "Wave 2 is open",
  "body": "Thanks for taking part in wave 1, wave 2 is now open.",
  "recipient_ids": ["619e049f7648a4e1f8f3645b", "619e049f7648a4e1f8f3645c"],
  "audience_source": "submissions",
  "topic": "other"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/broadcasts/")! 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()
```