# boolean_smtp_connection_data

> Filters a connection's data before it is created through the REST API.

Filter · Tier A · Since 1.0.0



## Signature

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$data` | `array<string, mixed>` | Connection fields (`name`, `driver`, `settings`, `priority`) whitelisted from the request. Return the array to use for creation. |

**Returns** `array<string, mixed>` — The filtered data.

## Fires in

- [app/Http/Controllers/ConnectionController.php:127](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Http/Controllers/ConnectionController.php#L127) — `BooleanSmtp\Http\Controllers\ConnectionController::store()`

## Example

```php
add_filter( 'boolean_smtp_connection_data', function ( array $data ) {
    return $data;
}, 10, 1 );
```
