# Webhooks

Webhooks provide a mechanism for notifying client applications when certain events happen on the server. This is an efficient alternative to polling for changes. You can configure a webhook by logging into the [gospace AI console](https://console.gospace.app) and navigating to `Admin > Settings > Webhooks.`

### Webhook security

To verify that the request comes from gospace AI, a `x-gospace-signature` header is added to each request. The value of this header is a HMAC SHA256 hash computed from the request body and your webhook signature key.

{% code title="RESPONSE HEADERS" %}

```json
headers: {
  "x-gospace-signature": "11eu12e102ru102ur102ru019u2r102ur012ur09"
}
```

{% endcode %}

### Webhook format

When an event occurs, we will make a `POST` request to the URL specified when you created the webhook. The request body will contain an event object which includes the topic string and data object.

{% code title="REQUEST" %}

```json
{
  topic: <topic string>,
  data: {
    _id: <entity ID>
  }
}
```

{% endcode %}

### Webhook events

gospace AI features an extensive events library that allows organisations to subscribe to and act on real-time events. This powerful feature enables businesses to track actions and automate responses, creating a dynamic and interactive AI environment.

| Event                       | Description                          |
| --------------------------- | ------------------------------------ |
| ALLOCATION\_CREATED         | An allocation has been created.      |
| ALLOCATION\_UPDATED         | An allocation has been updated.      |
| ALLOCATION\_DELETED         | An allocation has been deleted.      |
| INTENTION\_CREATED          | An intention has been created.       |
| INTENTION\_UPDATED          | An intention has been updated.       |
| INTENTION\_DELETED          | An intention has been deleted.       |
| PEOPLE\_CREATED             | A person has been created.           |
| PEOPLE\_UPDATED             | A person has been update.            |
| PEOPLE\_DELETED             | A person has been deleted.           |
| PEOPLE\_SETTINGS\_CREATED   | People settings have been created.   |
| PEOPLE\_SETTINGS\_UPDATED   | People settings have been created.   |
| TEAM\_CREATED               | A team has been created.             |
| TEAM\_UPDATED               | A team has been updated.             |
| TEAM\_DELETED               | A team has been deleted.             |
| TEAM\_SETTINGS\_CREATED     | Team settings have been created.     |
| TEAM\_SETTINGS\_UPDATED     | Team settings have been updated.     |
| TEAM\_MEMBER\_ADDED         | A team member has been added.        |
| TEAM\_MEMBER\_REMOVED       | A team member has been removed.      |
| LOCATION\_CREATED           | A location has been created.         |
| LOCATION\_UPDATED           | A location has been updated.         |
| LOCATION\_DELETED           | A location has been deleted.         |
| LAYER\_CREATED              | A layer has been created.            |
| LAYER\_UPDATED              | A layer has been updated.            |
| LAYER\_DELETED              | A layer has been deleted.            |
| ZONE\_CREATED               | A zone has been created.             |
| ZONE\_UPDATED               | A zone has been updated.             |
| ZONE\_DELETED               | A zone has been deleted.             |
| ROOM\_CREATED               | A room has been created.             |
| ROOM\_UPDATED               | A room has been updated.             |
| ROOM\_DELETED               | A room has been deleted.             |
| SPACE\_CREATED              | A space has been created.            |
| SPACE\_UPDATED              | A space has been updated.            |
| SPACE\_DELETED              | A space has been deleted.            |
| CLUSTER\_CREATED            | A space cluster has been created.    |
| CLUSTER\_UPDATED            | A space cluster has been updated.    |
| CLUSTER\_DELETED            | A space cluster has been deleted.    |
| CIRCULATION\_ROUTE\_CREATED | A circulation path has been created. |
| CIRCULATION\_ROUTE\_UPDATED | A circulation path has been updated. |
| CIRCULATION\_ROUTE\_DELETED | A circulation path has been deleted. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.gospace.com/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
