For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Go to app
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
    • Introduction
    • Users
    • Taskflow
    • AI Task Builder
    • Studies
    • Representative sample studies
    • study-collections
    • Filter Sets
    • Participant Groups
    • Custom Groups
    • Study Distribution
    • Submissions
    • Bonuses
    • Messages
    • Workspaces
    • Projects
    • Surveys
    • Webhooks
      • Subscribing
      • Receiving
      • Event Delivery and Retry Logic
      • Persistent Failures and Disabling Logic
      • Idempotency and the X-Event-ID Header
      • Handling event order with X-Timestamp
      • Verifying
      • GETList all subscribable event types
      • GETList all secrets
      • POSTCreate/replace a secret
      • GETList all subscriptions
      • POSTCreate a subscription
      • GETRetrieve a subscription
      • POSTConfirm a subscription
      • DELDelete a subscription
      • PATCHUpdate a subscription
      • GETGet subscription events
    • Invitations
    • Reward Recommendations
    • Testing
    • Well Known Endpoints
Go to app
LogoLogo
API ReferenceWebhooks

Create a subscription

|View as Markdown|Open in Claude|
POST
https://api.prolific.com/api/v1/hooks/subscriptions/
POST
/api/v1/hooks/subscriptions/
$curl -X POST https://api.prolific.com/api/v1/hooks/subscriptions/ \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "event_type": "study.status.change",
> "target_url": "https://hooks.myresearchapp.com/api/v1/notifications/study-status",
> "workspace_id": "63722982f9cc073ecc730f6b"
>}'
1{
2 "results": [
3 {
4 "event_type": "study.status.change",
5 "target_url": "https://hooks.myresearchapp.com/api/v1/notifications/study-status",
6 "workspace_id": "63722982f9cc073ecc730f6b",
7 "id": "5f8d0d55b54764421b7156c3",
8 "is_enabled": true
9 }
10 ]
11}
Create a subscription for an event type. When an event is triggered in the Prolific system, the hook will automatically notify the specified target URL. Before creating a subscription, you must ensure that you have created a secret for your workspace.
Was this page helpful?
Previous

List all subscriptions

Next

Retrieve a subscription

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.
event_typestringRequired
The name of the event type associated to the subscription.
target_urlstringRequired
The URL that the subscription will notify when your event type is triggered.
workspace_idstringRequired
The ID of the workspace we will create the subscription in.
is_enabledbooleanOptional
Whether the subscription is enabled or not.

Response

Created
resultslist of objects
List of all subscriptions.

Errors

4XX
Client Request Error