Skip to main content

How to define the events?

Listen for events in your application as they occur and master how to define and understand these webhook events.

We use events to keep you up to date with what's happening in your app in real time. When one of them occurs, we create an Event object. There are several kinds of events that are supported by Cryptr. It is possible to determine which events will be taken into account when creating your webhooks.

Listen to specific events

It is possible to listen to only specific events.

To do this, simply modify the value of the event_codes field when creating a webhook. It is also possible to modify these values later.

cURL
curl -X POST '${cryptr_service_url}/api/v2/webhooks' \
-d 'name=webhook-name' \
-d 'target_url=https://your_target_url.fr' \
-d 'event_codes[]=dir_sync.user.provision.success' \
-d 'event_codes[]=dir_sync.user.update.success'
tip
  • If you want to receive all events, you can simply fill in all in the event_codes key instead of the list of event codes.
  • If you want to receive all SSO SAML events, you can use sso_saml.all.
  • If you want to receive all Directory Sync events, you can use dir_sync.all

You can view a list of available Event Codes on the Events List page. To learne more about events you can also consult our Events Presentation page.

See also