# Integrations

> Send booking events to Zapier, Make, Slack, a CRM or a door lock with webhooks, and connect other tools through the Session API.

Who can do this: admins only.

## Connect to other tools

Webhooks notify any URL when something happens in Session. Zapier and Make route them to Mailchimp, Slack, a Google Sheet, a CRM or a door lock without code.

For Google, Apple or Outlook calendars, use a [calendar link](/docs/calendar-feed) from **My account** instead.

## Setting up a webhook

Add webhooks from [Settings → Data](/go/admin/settings/data), up to 10 per venue, each with its own URL and events.

1. In the Integrations section, click **Add webhook**
2. Paste your endpoint URL, add a description, select the events you want, and click **Create endpoint**
3. Copy the **signing secret**. It isn't shown again; if lost, open the webhook and click **Regenerate secret**

Session POSTs JSON to your URL each time one of those events fires. The `X-Webhook-Signature` header is a hex HMAC-SHA256 of the request body, signed with your secret.

Without a 2xx answer within 10 seconds, Session retries, up to 5 attempts over about three hours, then marks the delivery failed.

## Available events

- `contact.created` - someone books with you for the first time, you add them as a customer, or they subscribe
- `contact.updated` - a customer's details or marketing choice change, with a `changes` list (`email`, `name`, `phone`, `marketing`, `account`)
- `booking.created` - a booking is confirmed, online or from the admin, or a cancelled booking is restored
- `booking.updated` - a booking is rescheduled or its spaces change, with a `changes` list (`rescheduled`, `spaces`) and a `previous` block of the old values
- `booking.cancelled` - a booking is cancelled
- `membership.created` - a new membership subscription starts
- `membership.cancelled` - a membership is cancelled (active until the period ends)
- `membership.expired` - a membership fully ends
- `session.attended` - a session has ended, with who checked in and who was a no-show
- `voucher.purchased` - someone buys a gift voucher

## Reading a booking event

- `id` - the booking's permanent identifier. Match events on it, not `reference_code` (the `BK-XXXXXX` reference customers see).
- `payment_status` - `completed` when the booking was paid for, `not_required` when nothing was charged.
- `created_by_admin` - `true` when your team added the booking, `false` when the customer booked online.
- `payment_method` - `card_terminal`, `cash`, `bank_transfer` or `other` when you took payment yourselves; empty for online payments and free bookings.
- `amount_paid`, `unit_price`, `discount_amount`, `refund_amount` - in minor units, so `2500` is £25.00. The customer actually paid `amount_paid` minus `refund_amount`.
- `currency` - the three-letter code (`GBP`, `AUD`, `EUR`).

<Callout variant="warning">
`booking.created` also fires for free bookings, such as membership or bundle ones. To count sales, count only events where `payment_status` is `completed` and `created_by_admin` isn't `true`, and ignore any `id` you've already counted, because a retried delivery can arrive twice.
</Callout>

## Sync customers to your CRM

Send contact events through Zapier or Make to Mailchimp, HubSpot or any CRM. They carry `email`, names, `phone`, `phone_e164` (international format), `is_guest` (no account yet) and `marketing_status`, also on booking events' `customer`. Mail people who are `opted_in` or `soft_opt_in` (on your list without ticking a box), never `opted_out` or `not_asked`. Imports send none; someone who only buys a voucher, bundle or membership appears on that purchase's event.

<Callout variant="warning">
Erasing a customer in Session doesn't reach your CRM, so delete them there too. Delivery records are kept for 30 days.
</Callout>

## Tracking ad conversions

Booking events carry an `attribution` object, so you can send paid bookings back to Google Ads or Meta as conversions:

- `click_id` and `click_id_kind` - the ad click id the customer arrived with: `gclid`, `gbraid`, `wbraid` or `fbclid`.
- `utm_source`, `utm_medium`, `utm_campaign`, `utm_content`.
- `referrer_host` - the site they came from.
- `entry_point` - `booking_page` or `embed`.

Point your ad at your booking page or [booking widget](/docs/embed); to upload Google Ads conversions without code, see [Google Ads conversion tracking](/docs/google-ads). `attribution` is empty for team-added, imported and unsourced bookings. `utm_term` and Google Analytics client ids aren't kept.

## Door access and locks

- **Kisi**: with the Connect add-on, connect it directly and every booking gets an **Open the door** button. See [Kisi door access](/docs/kisi-door-access).
- **A connected lock** (remote control by app, API, or Zapier and Make, plus time-limited codes): use `booking.created` to open the lock or issue a code for the booking's times, `booking.updated` with `rescheduled` to move it, and `booking.cancelled` to close it.
- **A standalone keypad**: put a shared code in the session's **Confirmation note** (**Messages** → **Booking confirmation**), which only people who have booked see. Change it now and then, and don't share one for [private hire](/docs/private-sessions).

<Callout variant="warning">
Session doesn't control heaters. Check with your installer that anyone inside can always get out, even if the power fails.
</Callout>

## The API

The API lets another tool **create a discount code** (optionally limited to certain sessions or booking types), **read a day's sessions** with who's booked, waiver status and extras, and **record attendance**. It needs a developer.

With **Connect**, it can also **add**, **cancel** (refunded under your policy, or not) or **move** a booking, **close or reopen a date**, **change a session's capacity** and **cancel a session**. Each can be tried as a dry run, a retry never acts twice, and every change is listed in Settings → Data.

## API keys

Admins create and revoke keys in [Settings → Data](/go/admin/settings/data) in the **Connect** card under **API keys**. Venues already using the API keep their access.

1. Click **Create key**, name it, and pick **Read key** or **Write key**. A write key makes changes, runs as the admin you choose, and can't read customers' details
2. Copy the key. It's shown once; if you lose it or it's exposed, **Revoke** it and create another

Send it as `Authorization: Bearer <key>` to `https://bookasession.org/api/v1`.

<Callout variant="warning">
Never use `www.bookasession.org`: its redirect drops the body of a POST request, so the call silently does nothing.
</Callout>

## Connect an AI assistant

To ask Claude, ChatGPT or Codex about your reports and schedule, or with Connect to change bookings, see [Connect AI](/docs/connect-ai). It needs no developer or API key.

## Common questions

1. **My endpoint isn't receiving anything.** Send a test event with the send icon, then check the history icon. No attempt means you didn't subscribe to that event.

2. **A customer checked out twice for the same session - do I get two `booking.created` events?** No: the second checkout adds spaces to their booking, so you get `booking.updated` with `changes: ["spaces"]`.
