PHPackages                             errnesto/kirby-plugin-webhooks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. errnesto/kirby-plugin-webhooks

ActiveKirby-plugin

errnesto/kirby-plugin-webhooks
==============================

Kirby plugin to register custom webhooks based on kirby hooks

1.0.0(6y ago)141.1k1[3 issues](https://github.com/errnesto/kirby-plugin-webhooks/issues)MITPHP

Since Feb 17Pushed 3y ago2 watchersCompare

[ Source](https://github.com/errnesto/kirby-plugin-webhooks)[ Packagist](https://packagist.org/packages/errnesto/kirby-plugin-webhooks)[ RSS](/packages/errnesto-kirby-plugin-webhooks/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Kirby Webhook Plugin
====================

[](#kirby-webhook-plugin)

This is a simple plugin that lets you configure custom webhooks. Webhooks are trigged by kirby hook events.

**Alternative:**

---

Installation
------------

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/webhooks`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/errnesto/kirby-plugin-webhooks.git site/plugins/webhooks

```

### Composer

[](#composer)

```
composer require errnesto/kirby-plugin-webhooks

```

Setup
-----

[](#setup)

This plugin looks for webhook configurations in the kirby `site` object. So to create a webhook you could just edit the `content/site.txt` file:

```
Webhooks:

-
  url: >
    https://webhook.site/74a7ed53-7091-4871-a1d7-749417b24269
  payload: '{"secret":"123"}'
  triggers: page.create:after, page.update:after

```

The config must be stored under the key `Webhooks` as yaml array.
Every webhook needs the following options:

- `url`: The URL to post to when a kirby hook is triggered
- `payload`: The body of the post request
- `triggers`: A comma seperated list of [kirby hooks](https://getkirby.com/docs/reference/system/options/hooks)

A blueprint to edit the webhooks in the panel could look like this:

```
webhooks:
  label: Webhooks
  type: structure
  fields:
    url:
      label: URL
      type: url
    payload:
      label: Payload
      type: text
    triggers:
      label: Triggers
      type: tags
```

Options
-------

[](#options)

You can customize the requests the plugin sends with your own functions.
Every function gets the following parameters:

- `$trigger`: The name of the hook that caused the webhook to be called
- `$webhook`: The webhook read from the site object. (This will include any field you define)
- `...$params`: All the params from the [kirby hook](https://getkirby.com/docs/reference/system/options/hooks).

You can set all of the following options by returning them in your `/site/config/config.php`:

### `getURL()`

[](#geturl)

```
// default:
return [
  'errnesto.webhooks.getURL' => function ($trigger, $webhook, ...$params) {
    return $webhook['url'];
  }
];
```

### `getHeader()`

[](#getheader)

```
return [
  // default:
  'errnesto.webhooks.getHeader' => function ($trigger, $webhook, ...$params) {
    return "Content-type: application/json\r\n";
  }
];
```

### `getMethod()`

[](#getmethod)

```
return [
  // default:
  'errnesto.webhooks.getMethod' => function ($trigger, $webhook, ...$params) {
    return "POST";
  }
];
```

### `getPayload()`

[](#getpayload)

```
return [
  // default
  'errnesto.webhooks.getPayload' => function ($trigger, $webhook, ...$params) {
    return $webhook['payload'];
  },
];
```

TODO
----

[](#todo)

- Add custom panel view and store webhooks somewhere else?
- Returning null from `getURL` should skip a hook and not cause an error
- Option to make hook non blocking?

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2274d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ece0349f4100ed08400ec70e63e9463c6ec75435b173fed0adb63a7d16abb8c1?d=identicon)[errnesto](/maintainers/errnesto)

---

Top Contributors

[![errnesto](https://avatars.githubusercontent.com/u/3065968?v=4)](https://github.com/errnesto "errnesto (19 commits)")

### Embed Badge

![Health badge](/badges/errnesto-kirby-plugin-webhooks/health.svg)

```
[![Health](https://phpackages.com/badges/errnesto-kirby-plugin-webhooks/health.svg)](https://phpackages.com/packages/errnesto-kirby-plugin-webhooks)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k535.5k350](/packages/getkirby-cms)[distantnative/retour-for-kirby

Manage redirects and track 404s right from the Kirby CMS Panel

14689.4k1](/packages/distantnative-retour-for-kirby)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[getkirby/staticache

Static site performance on demand

9615.4k](/packages/getkirby-staticache)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

6910.7k1](/packages/fabianmichael-kirby-meta)[thathoff/kirby-oauth

Kirby OAuth 2 Plugin

3823.9k](/packages/thathoff-kirby-oauth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
