> ## Documentation Index
> Fetch the complete documentation index at: https://www.spacebring.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Learn about Spacebring webhooks

## What are webhooks?

Webhooks are a way for Spacebring to notify you about events that occur in your network. For example, when a booking is created, a webhook will be sent to your application. See the full list of [webhook event types](https://webhooks.spacebring.com/).

## Steps to set up webhooks

### 1. Create your endpoint

In your application, you should create an endpoint that will receive the webhooks. This endpoint should receive POST requests and respond with `2xx` status code.

### 2. Register the endpoint

To register a webhook endpoint, your network needs the API & webhooks add-on. [Pricing](https://www.spacebring.com/pricing)

The [owner](https://www.spacebring.com/docs/administration/administrators.md#understand-administrator-roles) of your Spacebring network should follow these steps:

1. On the left-side panel, click **(...)** menu next to your network name.
2. Go to **Network settings** > **Developers** > **Webhooks**.

![Webhooks tab of the Developers page with the Add Endpoint button on Spacebring's coworking space management
platform](https://mintcdn.com/spacebring/HXwgu-OYpQnS7jw8/images/developer-webhooks-register-the-endpoint.png?fit=max\&auto=format\&n=HXwgu-OYpQnS7jw8\&q=85\&s=32e15d4a5b540c0825a65847781bc8e5)

## Get each date of a repeating booking

A repeating booking is a single booking, so `booking.created` is sent for it once, with its first date. To act on each date a resource is booked, such as sending a door code, handle `booking.upcoming`:

* It's sent an hour before a booking starts, and an hour before each date of a repeating booking.
* Each date carries its own `startDate` and `endDate`. A date after the first has the `id` `{bookingId}_{isoDate}`, as [retrieve bookings](https://www.spacebring.com/docs/developer/api/resources/retrieve-bookings.md) returns it with `singleBookings`.
* A date waiting for its payment is sent once it's paid.
* A booking made, paid, or rescheduled less than an hour before it starts gets no `booking.upcoming`. Handle `booking.created`, `booking.paid`, or `booking.updated` for it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.