Monitoring study progress

View as MarkdownOpen in Claude

Prolific provides webhook events for updates to your workspace, such as study.status.change, study.progress.change and submission.status.change.

1

List event types

GET
https://api.prolific.com/api/v1/hooks/event-types/

Make a note of the event type you’d like to subscribe to. You’ll need this later when setting up a subscription.

2

Create a secret

Secrets are used to verify the authenticity of our webhook requests to your system. It allows you to prove we have sent them and the payload hasn’t been fiddled with.

POST
https://api.prolific.com/api/v1/hooks/secrets/
Body

This will create a new secret for your workspace and be returned in the response body. Keep this safe, and note that you can only have one active secret per workspace at a time.

3

Subscribe to an event

POST
https://api.prolific.com/api/v1/hooks/subscriptions/
Body

If successful, the endpoint will return a response that includes:

  • An id field in the body - This is the unique identifier for your subscription.
  • An X-Hook-Secret header - Used to confirm your intention to subscribe to the desired event type.

Make a note of both the id and the X-Hook-Secret. We’ll use these to confirm our intention to subscribe to the desired event type.

Note

target_url must use https:// and be publicly accessible.

4

Confirm the subscription

POST
https://api.prolific.com/api/v1/hooks/subscriptions/:subscription_id/
Path Parameters
Body

Replace <subscription_id> with the value of the X-Hook-Secret header in the previous subscription request.

If subscription confirmation is successful, you should receive a 200 status code.

From here, whenever the specified event occurs, the target URL will be called. The data sent in the call will depend on the event. See the complete API reference here. This link includes tips on idempotency and error handling.