# boolean_smtp_api_debug_response_enabled

> Filters whether raw debug data may be attached to an admin REST response.

Filter · Tier C · Since 1.0.0

This is the canonical filter for the API debug response channel; the legacy `boolean_smtp_debug_attach_api_debug` and `boolean_smtp_debug_output_xhr` filters feed into its default for backward compatibility.

## Signature

```php
add_filter( 'boolean_smtp_api_debug_response_enabled', $callback, 10, 1 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$enabled` | `bool` | The legacy-filtered default. |

**Returns** `bool` — The filtered value.

## Fires in

- [app/Support/Debug/WordPressDebugLogger.php:1483](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Support/Debug/WordPressDebugLogger.php#L1483) — `BooleanSmtp\Support\Debug\WordPressDebugLogger::isApiDebugResponseEnabled()`

## Example

```php
add_filter( 'boolean_smtp_api_debug_response_enabled', function ( bool $enabled ) {
    return $enabled;
}, 10, 1 );
```
