Filter since v1.0.0
fswa_webhook_url
Rewrites the webhook endpoint URL per-event before dispatch.
$
/ Signature
apply_filters( 'fswa_webhook_url', $url, $payload, $webhook, $trigger, $original_payload )
/ When it fires
Fires after Pro URL template expansion (`{{ field }}` tokens), just before the HTTP request is built.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $url | param | string | yes | The configured endpoint URL (may already contain expanded Pro templates). |
| $payload | param | array | yes | The final outgoing payload (post-mapping, post-Code Glue). |
| $webhook | param | array | yes | Full webhook configuration row. |
| $trigger | param | string | yes | WordPress action name. |
| $original_payload | param | array|null | — | Pre-mapping payload as fallback for token resolution. |
/ Returns
string The URL to use for this delivery. Must be a valid HTTPS URL (unless `fswa_require_https` is false)./ Examples
Inject a record ID from payload into the URL path
add_filter( 'fswa_webhook_url', function ( $url, $payload, $webhook, $trigger, $original ) { if ( (int) $webhook['id'] !== 30 ) return $url; $deal_id = $payload['_hs_deal_id'] ?? ''; return "https://api.hubapi.com/crm/v3/objects/deals/{$deal_id}"; }, 10, 5 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate