Skip to main content
All CollectionsIntegrations
Strigo's Subscriptions API
Strigo's Subscriptions API

How to use Strigo's Subscriptions API to subscribe to events happening in Strigo

Nir Cohen avatar
Written by Nir Cohen
Updated over 7 months ago

Note: This feature is currently in open Beta.

Strigo provides an API based on a concept called rest-hooks. This API allows you to subscribe to certain events. Once those events occur, their payload will be sent to a target URL specified in the subscription. This practically acts as a notification system that you can respond to.

For example, let's say that you wish to receive a notification at https://example.com every time a learner is enrolled in an on-demand course, and then use your email provider to send an email to that learner. To achieve that, you would subscribe to the enrollment.create event, and set the target of the subscription to https://example.com. Every time a user is enrolled in any on-demand course, the target will receive an HTTP request with the enrollment's payload, as described here. Since the enrollment payload includes the email of the enrollee, you'll be able to use that email address to send some custom email to them.

The events are sent both when performing actions through Lounge, and through Strigo's REST API.

The following events are currently supported:

  • enrollment.create => Any time a user is enrolled in an on-demand course.

  • enrollment.finished => Any time an enrollment of an on-demand course ends.

  • ondemand.create => Any time an on-demand course is created.

  • class.create => Any time a class template is created.

  • member.create => Any time a member (partner, or otherwise), is invited to the team.

  • event.create => Any time an event is scheduled.

  • event.update => Any time an event is updated.

  • event.delete => Any time an event is deleted.

  • event.finish=> Any time an event is finished.

  • partner.create => Any time a partner entity is created.

  • learner.join=> Any time a learner is joined the event.

Some notes:

  • We intend on expanding this to include more events.

  • You can subscribe to the same event multiple times using different targets, and Strigo will send notifications to all of them, allowing you to have different services respond differently to the same event.

  • When receiving the notification, you can look for the x-event-type header, which indicates the event type, for example:
    โ€‹'x-event-type': 'event.create'

To subscribe to notifications, see our REST API reference.

Did this answer your question?