Skip to navigation

Send a broadcast

View as MarkdownOpen in Claude

Sends one message to many participants. Each of them gets a new conversation with the broadcast’s subject, topic and any 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.

Send it to recipient_ids or to a participant_group_id, exactly one of the two. With audience_source: submissions, each recipient must have a submission for the study in any status. With audience_source: TYPED_IDS (IDs typed in) or MESSAGES (participants picked from your conversations), each must be a participant who has taken part in one of your studies or already has a conversation with you. A group’s members get it as the group is at the moment of sending, whether or not they’re on the study, which only labels the broadcast. Each member must have taken part in one of your studies or already have a conversation with you. A group that isn’t in the broadcast’s workspace or its organisation, or that you can’t view, returns 404, and one with no members returns 400. If your access to the group can’t be checked right now, it returns 503. A broadcast has the same recipient limit as a bulk message. Going over it 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 broadcast’s workspace.

Without a study_id, give the workspace it’s from as context_workspace_id, or as workspace_id to send it as that workspace. audience_source: submissions needs a study.

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.
subjectstringRequired<=500 characters
Shown as the title of each recipient's conversation.
bodystringRequired10-10000 characters
The message, sent as the first message of each conversation.
idstringOptionalformat: "^[a-f0-9]{24}$"
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.
study_idstringOptional

The study the broadcast is about, if any. Needed with audience_source submissions.

topicenum or nullOptional
Which of the fixed categories it falls under, if any.
recipient_idslist of stringsOptional

Participants to send it to. Repeats are ignored. Needs audience_source, which sets who’s allowed.

participant_group_idstringOptional
Send to every member of this participant group, as it is at the moment of sending. The group must belong to the broadcast's workspace or its organisation. Any study labels the broadcast and doesn't narrow who gets it, so members don't need a submission for it. A group with no members returns 400.
audience_sourceenumOptional

Where recipient_ids were picked. submissions for participants picked from the study’s submissions, TYPED_IDS for IDs typed in, MESSAGES for participants picked from your conversations. Left out for a participant group, which sets it to PARTICIPANT_GROUP.

Allowed values:
workspace_idstringOptional
Send it as this workspace rather than as yourself. Must be the study's workspace if there's a study, and requires workspace messaging.
context_workspace_idstringOptional

The workspace a broadcast with no study is from, when you’re sending it as yourself. You must belong to it. Can’t be combined with study_id or workspace_id.

Response

The broadcast
idstring
study_idstring or null
The study it's about, or null.
subjectstring
topicstring or null
bodystring
audience_sourceenum
Allowed values:
participant_groupobject or null
The participant group it was sent to, or null.
recipient_countinteger
datetime_createddatetime

Errors

4XX
Client Request Error