Send a broadcast
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
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
The study the broadcast is about, if any. Needed with audience_source submissions.
Participants to send it to. Repeats are ignored. Needs audience_source, which sets who’s allowed.
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.
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.