The Prelude Session API uses webhooks to notify you when certain events occur.

How to setup your Webhook

1

Implement the handler

Develop a webhook endpoint to receive event data POST requests and GET verification requests.

2

Register the webhook

Register the webhook endpoint by setting the URL and the events you want to subscribe to, using the POST /v2/session/apps/{appID}/webhooks endpoint.

3

Activate the webhook

Activate the webhook using the POST /v2/session/apps/{appID}/webhooks/{webhookID}/activate endpoint.

4

Verify the webhook

Prelude’s webhook service will send a GET verification event to the webhook endpoint. Make sure to return a 200 OK along with the verification (challenge) response to acknowledge receipt of the event. See more details in the Verification Challenge Request page.

5

Start receiving events

Start receiving events. Make sure to return a 200 OK HTTP response to the POST request to acknowledge receipt of the event. If you don’t, Prelude will retry sending the event for 2 weeks.

Webhook events

You can subscribe to the following events:

  • user.created
  • user.deleted
  • user.profile.updated
  • user.identifier.created
  • user.identifier.deleted
  • user.session.created
  • user.session.revoked

Webhook payload

Events are received in batches. Each batch contains a list of events and only contains events for the application that the webhook is registered to.

app_id
string
required

An application's unique identifier.

Example:

"54e9ujn"

events
object[]
required