---
title: "fswa_webhook_saved — Action Hook"
description: "Fires after a webhook is created or updated via the REST API."
url: "https://wpwebhooks.org/docs/fswa-webhook-saved/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_webhook\_saved

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, $webhook_data, $is_new )
```

/ When it fires

Fires after the webhook row is written to the database, inside the REST API handler for create and update operations. Pro uses this to persist per-webhook retry and backoff settings.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $webhook\_id | param | int | yes | Webhook configuration ID. |
| $webhook\_data | param | array | yes | The saved webhook data array. |
| $is\_new | param | bool | yes | \`true\` if the webhook was just created; \`false\` on update. |

/ Examples

Log webhook changes to an audit log

```
add_action( 'fswa_webhook_saved', function ( $webhook_id, $webhook_data, $is_new ) {
    $action = $is_new ? 'created' : 'updated';
    $name   = $webhook_data['name'] ?? "#{$webhook_id}";
    error_log( "[fswa] Webhook {$name} {$action} (ID: {$webhook_id})" );
}, 10, 3 );
```

/ Related

[fswa\_webhook\_data](https://wpwebhooks.org/docs/fswa-webhook-data/)[REST API](https://wpwebhooks.org/docs/rest-api/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_webhook_saved — Action Hook — Webhook Actions Docs","description":"Fires after a webhook is created or updated via the REST API.","url":"https://wpwebhooks.org/docs/fswa-webhook-saved/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
