# Webhook notifications

Notifications sent and scheduled per webhook

Endpoint: `https://api.bookingmood.com/v1/webhook_notifications`, supporting `GET`. Authenticate with the header `Authorization: Bearer YOUR_API_KEY` (see [authentication](https://www.bookingmood.com/da-DK/api-reference/authentication.md)).

## The webhook notification object

| Attribute | Type | Description |
| --- | --- | --- |
| `id` | `uuid` | Unique identifier. |
| `webhook_id` | `uuid` | Identifier of the related webhook. References [`webhooks.id`](https://www.bookingmood.com/da-DK/api-reference/webhooks.md). |
| `created_at` | `timestamp with time zone` | Creation timestamp. Read-only: set by the database. |
| `updated_at` | `timestamp with time zone` | Last modification timestamp. Read-only: set by the database. |
| `created_on` | `date` | Date on which the webhook notification was created. |
| `event_type` | `WebhookEvent` | Event the notification is about. |
| `payload` | `jsonb` | JSON payload of the notification. |
| `response` | `text \| null` | Response of the endpoint. |
| `status` | `WebhookNotificationStatus` | Status of the notification: `pending`, `sent` or `error`. |
| `tries` | `integer` | Number of delivery attempts. |

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "webhook_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-10-30T23:37:06.265Z",
  "updated_at": "2026-10-30T23:37:06.265Z",
  "created_on": "2026-10-30",
  "event_type": "bookings.created",
  "payload": {},
  "response": "",
  "status": "pending",
  "tries": 0
}
```

### Types

```typescript
type WebhookEvent = 
  | "bookings.created"
  | "bookings.updated"
  | "calendar_events.created"
  | "calendar_events.updated"
  | "calendar_events.confirmed"
  | "calendar_events.cancelled"
  | "contacts.created"
  | "contacts.updated"
  | "invoices.created"
  | "invoices.updated"
  | "payments.created"
  | "payments.updated"
  | "payments.paid"
  | "tasks.created"
  | "tasks.updated"
  | "tasks.completed"
  | "members.created"
  | "members.updated"
  | "products.created"
  | "products.updated"
  | "sites.created"
  | "sites.updated"
  | "widgets.created"
  | "widgets.updated";

type WebhookNotificationStatus = "error" | "pending" | "sent";
```

### Related resources

Embed related resources with the [`select` parameter](https://www.bookingmood.com/da-DK/api-reference/selecting.md), e.g. `select=*,webhooks(*)`. Resources related through more than one column need the column as a hint, like `table!column(*)`.

| Embed | Type | Description |
| --- | --- | --- |
| `webhooks(*)` | `object \| null` | The [webhook](https://www.bookingmood.com/da-DK/api-reference/webhooks.md) referenced by `webhook_id`. |

## List webhook notifications

`GET /v1/webhook_notifications`

Filter on any attribute with `column=operator.value` (see [filtering](https://www.bookingmood.com/da-DK/api-reference/filtering.md)). Choose columns and embed related resources with `select` (see [selecting](https://www.bookingmood.com/da-DK/api-reference/selecting.md)), and sort and paginate with `order`, `limit` and `offset` (see [sorting and pagination](https://www.bookingmood.com/da-DK/api-reference/sorting-pagination.md)).

```bash
curl -X GET "https://api.bookingmood.com/v1/webhook_notifications?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Responses:

- `200`: A list of webhook notifications with the selected columns. `206` when the list is a partial range.
- `400`: The request is malformed, for example an unknown column or an invalid filter.
- `401`: The API key is missing or invalid.

Errors have a JSON body with a `code`, `message`, `details` and `hint`. See the [introduction](https://www.bookingmood.com/da-DK/api-reference.md) for more on errors. The full API is described by the OpenAPI spec at https://api.bookingmood.com/v1/openapi.json.
