Action since v1.3.0
fswa_webhook_saved
Fires after a webhook is created or updated via the REST API.
$
/ Signature
do_action( 'fswa_webhook_saved', $webhook_id, $request )
/ When it fires
Fires after the webhook row is written to the database, inside the REST API handlers for create (POST /webhooks) and update (/webhooks/{id}), before the response is built. It does not fire for the enable/disable toggle, for Build imports, or for Build with AI / Abilities writes. Extensions use this to persist their own per-webhook fields.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $webhook_id | param | int | yes | Webhook configuration ID (the new ID on create). |
| $request | param | WP_REST_Request | yes | The REST request that created or updated the webhook. Read your own fields from it with `$request->get_param()`; the update route carries the ID as a URL parameter, the create route does not. |
/ Examples
Log webhook changes to an audit log
add_action( 'fswa_webhook_saved', function ( $webhook_id, $request ) { $params = $request->get_url_params(); $action = empty( $params['id'] ) ? 'created' : 'updated'; $name = $request->get_param( 'name' ) ?? "#{$webhook_id}"; error_log( "[fswa] Webhook {$name} {$action} (ID: {$webhook_id})" ); }, 10, 2 );
/ Related
Ready Your next automation is
Your next automation is
one sentence away.
$ wp plugin install flowsystems-webhook-actions --activate