# boolean_smtp_connection_created

> Fires after a connection has been created through the REST API.

Action · Tier A · Since 1.0.0



## Signature

```php
add_action( 'boolean_smtp_connection_created', $callback, 10, 1 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$payload` | `array<string, mixed>` |  |
| &nbsp;&nbsp;`id` | `int` | Id of the created connection. |
| &nbsp;&nbsp;`name` | `string` | Connection name. |
| &nbsp;&nbsp;`driver` | `string` | Transport driver key. |
| &nbsp;&nbsp;`timestamp` | `int` | Unix timestamp of creation. |

## Fires in

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

## Example

```php
add_action( 'boolean_smtp_connection_created', function ( array $payload ) {
    // React to the event.
}, 10, 1 );
```
