For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.prolific.com/documentation/core-concepts/llms.txt. For full documentation content, see https://docs.prolific.com/documentation/core-concepts/llms-full.txt.

# Monitoring study progress

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

<Steps>
  <Step title="List event types">
    <RunnableEndpoint endpoint="GET /api/v1/hooks/event-types/" readonly={["examples"]} />

    Make a note of the event type you'd like to subscribe to. You'll need this later when setting up a subscription.
  </Step>

  <Step title="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.

    <RunnableEndpoint endpoint="POST /api/v1/hooks/secrets/" readonly={["examples"]} />

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

  <Step title="Subscribe to an event">
    <RunnableEndpoint endpoint="POST /api/v1/hooks/subscriptions/" readonly={["examples"]} />

    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 title="Note">
      `target_url` must use `https://` and be publicly accessible.
    </Note>
  </Step>

  <Step title="Confirm the subscription">
    <RunnableEndpoint endpoint="POST /api/v1/hooks/subscriptions/{subscription_id}/" readonly={["examples"]} />

    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](/api-reference/webhooks) here. This link includes tips on
    idempotency and error handling.
  </Step>
</Steps>