# Notification_Data_Access::insert()

Insert a new notification.

```php
insert( array $data )
```

## Parameters

- `$data` (array<string, mixed>) Notification data.
  - `$user_id` (int) Required. User to notify.
  - `$type` (string) Required. Notification type slug.
  - `$title` (string) Required. Short title.
  - `$message` (string) Optional. Longer message.
  - `$url` (string) Optional. Link URL.
  - `$actor_id` (int) Optional. User who triggered the notification.
  - `$object_type` (string) Optional. Related object type (e.g., 'team', 'post').
  - `$object_id` (int) Optional. Related object ID.
  - `$data` (array) Optional. Additional data (JSON encoded).
  - `$actions` (array) Optional. Action buttons (see clanbite_notify for format).

## Return

`int|\WP_Error` Notification ID or error.
