webhooks

Create a subscription

Changed on

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.

A new subscription is created with is_enabled set to false and won't receive any events until it has been confirmed via the confirm subscription endpoint.

post/api/v1/hooks/subscriptions/

Request

  • Base URL
    https://api.prolific.com
  • URL
    https://api.prolific.com/api/v1/hooks/subscriptions/
  • Auth
    API key in header Authorization

Request body

idstring

The ID of the subscription.

event_typestring required

The name of the event type associated to the subscription.

target_urlstring required

The URL that the subscription will notify when your event type is triggered.

is_enabledboolean

Whether the subscription is enabled or not.

workspace_idstring required

The ID of the workspace we will create the subscription in.

Response

Created

Changes

    • warning

      deleted the header request parameter Authorization

    • info

      the endpoint scheme security token was added to the API

    • info

      api operation id create-subscription removed and replaced with webhooks_CreateSubscription