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

# manage_webhooks

> Subscribe or unsubscribe an event callback.

> [!WARNING]
>
> **WRITE** · 2 operations · may change data

Subscribe or unsubscribe an event callback.

```js theme={null}
manage_webhooks({
  action: "subscribe" | "unsubscribe",
  event?, target_url?, fields?, subscribe_id?, confirm_token?
})
```

| `action` | Required | Notes |
| - | - | - |
| `subscribe` | `target_url` (the callback URL) | Optional: `event` (the event/list id — the real field is `listId`). `target_url` must be HTTPS and reachable from the Lofty backend. `fields` holds extra webhook fields beyond `event`/`target_url`: `limit` (max events per callback batch, default 100, max 5000) and `permissionMode` (`0` = assignment-based delivery, the default; `1` = ownership-based, also delivers leads the subscriber manages by team/office/personal ownership). |
| `unsubscribe` | `subscribe_id` | Only a subscription you created can be removed; another user's returns error `20047`. |

`event` (`listId`) is one of:

| `event` | Fires on |
| - | - |
| `1` | Agent info created or updated |
| `2` | Lead info created, updated, or deleted |
| `3` | Lead site activity (browse/favorite/search) |
| `4` | Listing alert changed |
| `5` | Transaction created, updated, or deleted |
| `6` | Call (manual/logged only, excludes auto) |
| `7` | Email (manual/logged only, excludes auto) |
| `8` | Text (manual/logged only, excludes auto) |
| `9` | Note created, updated, or deleted |
| `10` | Task created, updated, finished, or deleted |
| `11` | Appointment created, updated, finished, or deleted |
| `12` | Lead pipeline stage changed |


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