---
title: "fswa_webhook_response — Action Hook"
description: "Fires after every HTTP response is received — success or error — with full response context."
url: "https://wpwebhooks.org/docs/fswa-webhook-response/"
---

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

Action since v1.9.0

# fswa\_webhook\_response

Fires after every HTTP response is received — success or error — with full response context.

/ Signature

```
do_action( 'fswa_webhook_response', $webhook_id, $trigger, $response_code, $response_body, $payload, $webhook )
```

/ When it fires

Fires after every HTTP response, for both 2xx successes and error codes. Fires on the first synchronous attempt and on every queue retry.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $webhook\_id | param | int | yes | Webhook configuration ID. |
| $trigger | param | string | yes | WordPress action name. |
| $response\_code | param | int | yes | HTTP response status code. |
| $response\_body | param | string | yes | Raw HTTP response body. |
| $payload | param | array | yes | The final payload that was sent. |
| $webhook | param | array | yes | Full webhook configuration row. |

/ Examples

Store a returned HubSpot deal ID in post meta

```
add_action( 'fswa_webhook_response', function ( $webhook_id, $trigger, $code, $body, $payload, $webhook ) {
    if ( $code !== 201 ) return;
    $data = json_decode( $body, true );
    if ( isset( $data['id'], $payload['order_id'] ) ) {
        update_post_meta( (int) $payload['order_id'], '_hs_deal_id', sanitize_text_field( $data['id'] ) );
    }
}, 10, 6 );
```

/ Related

[fswa\_success](https://wpwebhooks.org/docs/fswa-success/)[fswa\_glue\_post\_dispatch](https://wpwebhooks.org/docs/fswa-glue-post-dispatch/)[Post-Dispatch Scripting](https://wpwebhooks.org/docs/post-dispatch-scripting/)

/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_response — Action Hook — Webhook Actions Docs","description":"Fires after every HTTP response is received — success or error — with full response context.","url":"https://wpwebhooks.org/docs/fswa-webhook-response/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
