# Webhook

Webhook subscription management and event delivery.

Webhooks are sent to subscriber endpoints when events occur related to
experiences, events, and bookings.


## Booking created

 - [POST v1.booking.created](https://developer.understory.io/apis/booking/bookingcreated.md): Sent when a new booking is created.

## Booking updated

 - [POST v1.booking.updated](https://developer.understory.io/apis/booking/bookingupdated.md): Sent when a booking is updated.

## Booking cancelled

 - [POST v1.booking.cancelled](https://developer.understory.io/apis/booking/bookingcancelled.md): Sent when a booking is cancelled.

## Event created

 - [POST v1.event.created](https://developer.understory.io/apis/event/eventcreated.md): Sent when a new event is created for an experience.

## Event updated

 - [POST v1.event.updated](https://developer.understory.io/apis/event/eventupdated.md): Sent when an event is updated.

## Event cancelled

 - [POST v1.event.cancelled](https://developer.understory.io/apis/event/eventcancelled.md): Sent when an event is cancelled.

## Event completed

 - [POST v1.event.completed](https://developer.understory.io/apis/event/eventcompleted.md): Sent when an event has completed.

For single-session events, this is triggered when the session's end time is reached.
For multi-session events, this is triggered when the last session's end time is reached.

## Event deleted

 - [POST v1.event.deleted](https://developer.understory.io/apis/event/eventdeleted.md): Sent when an event is deleted.

## Experience created

 - [POST v1.experience.created](https://developer.understory.io/apis/experience/experiencecreated.md): Sent when a new experience is created.

## Experience updated

 - [POST v1.experience.updated](https://developer.understory.io/apis/experience/experienceupdated.md): Sent when an experience is updated.

## Experience deleted

 - [POST v1.experience.deleted](https://developer.understory.io/apis/experience/experiencedeleted.md): Sent when an experience is deleted.

## Marketing consent created

 - [POST v1.marketing_consent.created](https://developer.understory.io/apis/marketing/marketingconsentcreated.md): Sent when a new marketing consent is submitted.

This webhook is triggered every time a consent is submitted, even if the
email already exists. This allows external marketing systems to resubscribe
users who may have been unsubscribed externally.

## List Webhook Subscriptions

 - [GET /v1/webhook-subscriptions](https://developer.understory.io/apis/webhook/listwebhooksubscriptions.md): Retrieve all webhook subscriptions for the current organization.

## Create Webhook Subscription

 - [POST /v1/webhook-subscriptions](https://developer.understory.io/apis/webhook/createwebhooksubscription.md): Create a new webhook subscription to receive event notifications at the specified URL.

## Get Webhook Subscription

 - [GET /v1/webhook-subscriptions/{subscriptionId}](https://developer.understory.io/apis/webhook/getwebhooksubscription.md): Retrieve details of a specific webhook subscription.

## Update Webhook Subscription

 - [PUT /v1/webhook-subscriptions/{subscriptionId}](https://developer.understory.io/apis/webhook/updatewebhooksubscription.md): Update the configuration of an existing webhook subscription.

## Delete Webhook Subscription

 - [DELETE /v1/webhook-subscriptions/{subscriptionId}](https://developer.understory.io/apis/webhook/deletewebhooksubscription.md): Permanently delete a webhook subscription. This will stop all webhook deliveries for this subscription.

## Event created

 - [POST v1.event.created](https://developer.understory.io/apis/webhook/eventcreated.md): Sent when a new event is created for an experience.

## Event updated

 - [POST v1.event.updated](https://developer.understory.io/apis/webhook/eventupdated.md): Sent when an event is updated.

## Event cancelled

 - [POST v1.event.cancelled](https://developer.understory.io/apis/webhook/eventcancelled.md): Sent when an event is cancelled.

## Event completed

 - [POST v1.event.completed](https://developer.understory.io/apis/webhook/eventcompleted.md): Sent when an event has completed.

For single-session events, this is triggered when the session's end time is reached.
For multi-session events, this is triggered when the last session's end time is reached.

## Event deleted

 - [POST v1.event.deleted](https://developer.understory.io/apis/webhook/eventdeleted.md): Sent when an event is deleted.

## Experience created

 - [POST v1.experience.created](https://developer.understory.io/apis/webhook/experiencecreated.md): Sent when a new experience is created.

## Experience updated

 - [POST v1.experience.updated](https://developer.understory.io/apis/webhook/experienceupdated.md): Sent when an experience is updated.

## Experience deleted

 - [POST v1.experience.deleted](https://developer.understory.io/apis/webhook/experiencedeleted.md): Sent when an experience is deleted.

## Booking created

 - [POST v1.booking.created](https://developer.understory.io/apis/webhook/bookingcreated.md): Sent when a new booking is created.

## Booking updated

 - [POST v1.booking.updated](https://developer.understory.io/apis/webhook/bookingupdated.md): Sent when a booking is updated.

## Booking cancelled

 - [POST v1.booking.cancelled](https://developer.understory.io/apis/webhook/bookingcancelled.md): Sent when a booking is cancelled.

## Journal Entry created

 - [POST v1.journal_entry.created](https://developer.understory.io/apis/webhook/journalentrycreated.md): Sent when a new accounting journal entry has been recorded.

## Marketing consent created

 - [POST v1.marketing_consent.created](https://developer.understory.io/apis/webhook/marketingconsentcreated.md): Sent when a new marketing consent is submitted.

This webhook is triggered every time a consent is submitted, even if the
email already exists. This allows external marketing systems to resubscribe
users who may have been unsubscribed externally.

## Journal Entry created

 - [POST v1.journal_entry.created](https://developer.understory.io/apis/accounting/journalentrycreated.md): Sent when a new accounting journal entry has been recorded.

