# WebSpaceEvent events

> 33 FeatherPanel plugin events on WebSpaceEvent (32 emitted by the core): the event names, the arguments each listener gets, where they fire and a PHP listener for each.

Source: https://featherpanel.com/docs/plugins/events/web-space/

Part of the [plugin events reference](https://featherpanel.com/docs/plugins/events/). Listeners get the payload values as positional arguments in the order shown, cannot cancel the action, and must catch their own exceptions. 1 of these events are declared but no code emits them yet; they are marked not emitted.

## Setup

Import `WebSpaceEvent` in your entry class and register listeners in `processEvents()`:

```php
<?php

namespace App\Addons\myplugin;

use App\App;
use App\Plugins\AppPlugin;
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\WebSpaceEvent;

class MyPlugin implements AppPlugin
{
    public static function processEvents(PluginEvents $event): void
    {
        $event->on(WebSpaceEvent::onWebSpaceAppInstalled(), function (...$args): void {
            App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:app:installed ' . json_encode($args));
        });
    }

    public static function pluginInstall(): void
    {
    }

    public static function pluginUninstall(): void
    {
    }
}
```

## `WebSpaceEvent::onWebSpaceAppInstalled()`

- Name: `featherpanel:webspace:app:installed`
- emitted at 9 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L275)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string app, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (9 sites)

-   [`WebSpaceAppsController::installWordPress`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L84)[`POST /api/user/webspaces/{uuidShort}/apps/wordpress`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-wordpress)
-   [`WebSpaceAppsController::installLaravel`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L275)[`POST /api/user/webspaces/{uuidShort}/apps/laravel`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-laravel)
-   [`WebSpaceAppsController::installJoomla`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L327)[`POST /api/user/webspaces/{uuidShort}/apps/joomla`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-joomla)
-   [`WebSpaceAppsController::installDrupal`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L379)[`POST /api/user/webspaces/{uuidShort}/apps/drupal`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-drupal)
-   [`WebSpaceAppsController::installGhost`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L434)[`POST /api/user/webspaces/{uuidShort}/apps/ghost`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-ghost)
-   [`WebSpaceAppsController::installNodeStarter`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L482)[`POST /api/user/webspaces/{uuidShort}/apps/node-starter`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-node-starter)
-   [`WebSpaceAppsController::installPythonStarter`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L530)[`POST /api/user/webspaces/{uuidShort}/apps/python-starter`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-python-starter)
-   [`WebSpaceAppsController::installWordPressPlugin`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L578)[`POST /api/user/webspaces/{uuidShort}/apps/wordpress/plugin`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-wordpress-plugin)
-   [`WebSpaceAppsController::installDbApp`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L890)

```php
$event->on(WebSpaceEvent::onWebSpaceAppInstalled(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:app:installed ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceAppUpdated()`

- Name: `featherpanel:webspace:app:updated`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L283)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string app, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (2 sites)

-   [`WebSpaceAppsController::updateWordPress`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L131)[`POST /api/user/webspaces/{uuidShort}/apps/wordpress/update`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-wordpress-update)
-   [`WebSpaceAppsController::gitDeploy`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceAppsController.php#L705)[`POST /api/user/webspaces/{uuidShort}/apps/git-deploy`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-apps-git-deploy)

```php
$event->on(WebSpaceEvent::onWebSpaceAppUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:app:updated ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceBackupCreated()`

- Name: `featherpanel:webspace:backup:create`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L75)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string|null backup uuid, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (2 sites)

-   [`WebSpacesController::createBackup`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1321)[`POST /api/admin/webspaces/{uuid}/backup`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-backup)
-   [`WebSpacesController::createBackup`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1354)[`POST /api/admin/webspaces/{uuid}/backup`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-backup)

```php
$event->on(WebSpaceEvent::onWebSpaceBackupCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:backup:create ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceBackupDeleted()`

- Name: `featherpanel:webspace:backup:delete`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L83)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string backup uuid, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpacesController::deleteBackup`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1390)[`DELETE /api/admin/webspaces/{uuid}/backups/{backupUuid}`](https://featherpanel.com/docs/api/reference/admin/webspaces/#delete-admin-webspaces-uuid-backups-backupUuid)

```php
$event->on(WebSpaceEvent::onWebSpaceBackupDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:backup:delete ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceBackupRestored()`

- Name: `featherpanel:webspace:backup:restore`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L91)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string backup uuid, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (2 sites)

-   [`WebSpacesController::restoreBackup`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1445)[`POST /api/admin/webspaces/{uuid}/backups/{backupUuid}/restore`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-backups-backupUuid-restore)
-   [`WebSpacesController::restoreBackup`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1465)[`POST /api/admin/webspaces/{uuid}/backups/{backupUuid}/restore`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-backups-backupUuid-restore)

```php
$event->on(WebSpaceEvent::onWebSpaceBackupRestored(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:backup:restore ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceConsoleAccessed()`

- Name: `featherpanel:webspace:console:access`
- not emitted
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L195)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array context.

```php
$event->on(WebSpaceEvent::onWebSpaceConsoleAccessed(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:console:access ' . json_encode($args));
});
```

No code emits this event yet, so the arguments are unknown. The listener accepts any.

## `WebSpaceEvent::onWebSpaceCreated()`

- Name: `featherpanel:webspace:created`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L27)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array webspace, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (2 sites)

-   [`WebSpacesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L448)[`PUT /api/admin/webspaces`](https://featherpanel.com/docs/api/reference/admin/webspaces/#put-admin-webspaces)
-   [`WebSpacesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L493)[`PUT /api/admin/webspaces`](https://featherpanel.com/docs/api/reference/admin/webspaces/#put-admin-webspaces)

```php
$event->on(WebSpaceEvent::onWebSpaceCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:created ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDatabaseCreated()`

- Name: `featherpanel:webspace:database:create`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L123)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int database id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDatabaseController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceDatabaseController.php#L170)[`POST /api/user/webspaces/{uuidShort}/databases`](https://featherpanel.com/docs/api/reference/user/webspaces/databases/#post-user-webspaces-uuidShort-databases)

```php
$event->on(WebSpaceEvent::onWebSpaceDatabaseCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:database:create ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDatabaseDeleted()`

- Name: `featherpanel:webspace:database:delete`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L131)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int database id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDatabaseController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceDatabaseController.php#L222)[`DELETE /api/user/webspaces/{uuidShort}/databases/{databaseId}`](https://featherpanel.com/docs/api/reference/user/webspaces/databases/#delete-user-webspaces-uuidShort-databases-databaseId)

```php
$event->on(WebSpaceEvent::onWebSpaceDatabaseDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:database:delete ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDeleted()`

- Name: `featherpanel:webspace:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L43)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpacesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L529)[`DELETE /api/admin/webspaces/{uuid}`](https://featherpanel.com/docs/api/reference/admin/webspaces/#delete-admin-webspaces-uuid)

```php
$event->on(WebSpaceEvent::onWebSpaceDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:deleted ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDirectoryCreated()`

- Name: `featherpanel:webspace:directory:create`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L179)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string path, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceFilesController::createDirectory`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceFilesController.php#L155)[`POST /api/user/webspaces/{uuidShort}/files/create-directory`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-files-create-directory)

```php
$event->on(WebSpaceEvent::onWebSpaceDirectoryCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:directory:create ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDnsRecordCreated()`

- Name: `featherpanel:webspace:dns:record:created`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L219)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array record.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDnsController::createRecord`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpaceDnsController.php#L206)[`POST /api/admin/webspaces/{uuid}/dns/zones/{zoneId}/records`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-dns-zones-zoneId-records)

```php
$event->on(WebSpaceEvent::onWebSpaceDnsRecordCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:dns:record:created ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDnsRecordDeleted()`

- Name: `featherpanel:webspace:dns:record:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L235)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, string record id.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDnsController::deleteRecord`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpaceDnsController.php#L266)[`DELETE /api/admin/webspaces/{uuid}/dns/zones/{zoneId}/records/{recordId}`](https://featherpanel.com/docs/api/reference/admin/webspaces/#delete-admin-webspaces-uuid-dns-zones-zoneId-records-recordId)

```php
$event->on(WebSpaceEvent::onWebSpaceDnsRecordDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:dns:record:deleted ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDnsRecordUpdated()`

- Name: `featherpanel:webspace:dns:record:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L227)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array record.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDnsController::updateRecord`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpaceDnsController.php#L243)[`PATCH /api/admin/webspaces/{uuid}/dns/zones/{zoneId}/records/{recordId}`](https://featherpanel.com/docs/api/reference/admin/webspaces/#patch-admin-webspaces-uuid-dns-zones-zoneId-records-recordId)

```php
$event->on(WebSpaceEvent::onWebSpaceDnsRecordUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:dns:record:updated ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDnsZoneLinked()`

- Name: `featherpanel:webspace:dns:zone:linked`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L203)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array zone.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDnsController::linkZone`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpaceDnsController.php#L121)[`POST /api/admin/webspaces/{uuid}/dns/zones`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-dns-zones)

```php
$event->on(WebSpaceEvent::onWebSpaceDnsZoneLinked(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:dns:zone:linked ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceDnsZoneUnlinked()`

- Name: `featherpanel:webspace:dns:zone:unlinked`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L211)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int zone id.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceDnsController::unlinkZone`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpaceDnsController.php#L149)[`DELETE /api/admin/webspaces/{uuid}/dns/zones/{zoneId}`](https://featherpanel.com/docs/api/reference/admin/webspaces/#delete-admin-webspaces-uuid-dns-zones-zoneId)

```php
$event->on(WebSpaceEvent::onWebSpaceDnsZoneUnlinked(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:dns:zone:unlinked ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceFilesDeleted()`

- Name: `featherpanel:webspace:files:delete`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L187)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array paths, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceFilesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceFilesController.php#L416)[`POST /api/user/webspaces/{uuidShort}/files/delete`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-files-delete)

```php
$event->on(WebSpaceEvent::onWebSpaceFilesDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:files:delete ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceMailboxCreated()`

- Name: `featherpanel:webspace:mailbox:create`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L163)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int mailbox id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceMailboxController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceMailboxController.php#L419)[`POST /api/user/webspaces/{uuidShort}/mailboxes`](https://featherpanel.com/docs/api/reference/user/webspaces/mailboxes/#post-user-webspaces-uuidShort-mailboxes)

```php
$event->on(WebSpaceEvent::onWebSpaceMailboxCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:mailbox:create ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceMailboxDeleted()`

- Name: `featherpanel:webspace:mailbox:delete`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L171)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int mailbox id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceMailboxController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceMailboxController.php#L465)[`DELETE /api/user/webspaces/{uuidShort}/mailboxes/{mailboxId}`](https://featherpanel.com/docs/api/reference/user/webspaces/mailboxes/#delete-user-webspaces-uuidShort-mailboxes-mailboxId)

```php
$event->on(WebSpaceEvent::onWebSpaceMailboxDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:mailbox:delete ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceReinstalled()`

- Name: `featherpanel:webspace:reinstall`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L67)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (2 sites)

-   [`WebSpacesController::reinstall`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpacesController.php#L1054)[`POST /api/user/webspaces/{uuidShort}/reinstall`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-reinstall)
-   [`WebSpacesController::reinstall`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpacesController.php#L1083)[`POST /api/user/webspaces/{uuidShort}/reinstall`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-reinstall)

```php
$event->on(WebSpaceEvent::onWebSpaceReinstalled(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:reinstall ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceScheduleCreated()`

- Name: `featherpanel:webspace:schedule:create`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L139)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int schedule id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceScheduleController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php#L141)[`POST /api/user/webspaces/{uuidShort}/schedules`](https://featherpanel.com/docs/api/reference/user/webspaces/schedules/#post-user-webspaces-uuidShort-schedules)

```php
$event->on(WebSpaceEvent::onWebSpaceScheduleCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:schedule:create ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceScheduleDeleted()`

- Name: `featherpanel:webspace:schedule:delete`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L155)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int schedule id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceScheduleController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php#L285)[`DELETE /api/user/webspaces/{uuidShort}/schedules/{scheduleId}`](https://featherpanel.com/docs/api/reference/user/webspaces/schedules/#delete-user-webspaces-uuidShort-schedules-scheduleId)

```php
$event->on(WebSpaceEvent::onWebSpaceScheduleDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:schedule:delete ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceScheduleUpdated()`

- Name: `featherpanel:webspace:schedule:update`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L147)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int schedule id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceScheduleController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php#L241)[`PUT /api/user/webspaces/{uuidShort}/schedules/{scheduleId}`](https://featherpanel.com/docs/api/reference/user/webspaces/schedules/#put-user-webspaces-uuidShort-schedules-scheduleId)

```php
$event->on(WebSpaceEvent::onWebSpaceScheduleUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:schedule:update ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSftpAccountCreated()`

- Name: `featherpanel:webspace:sftp:account:created`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L243)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array account.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSftpAccountController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSftpAccountController.php#L99)[`POST /api/user/webspaces/{uuidShort}/sftp-accounts`](https://featherpanel.com/docs/api/reference/user/webspaces/sftp-accounts/#post-user-webspaces-uuidShort-sftp-accounts)

```php
$event->on(WebSpaceEvent::onWebSpaceSftpAccountCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:sftp:account:created ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSftpAccountDeleted()`

- Name: `featherpanel:webspace:sftp:account:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L259)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int account id.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSftpAccountController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSftpAccountController.php#L123)[`DELETE /api/user/webspaces/{uuidShort}/sftp-accounts/{accountId}`](https://featherpanel.com/docs/api/reference/user/webspaces/sftp-accounts/#delete-user-webspaces-uuidShort-sftp-accounts-accountId)

```php
$event->on(WebSpaceEvent::onWebSpaceSftpAccountDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:sftp:account:deleted ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSftpAccountUpdated()`

- Name: `featherpanel:webspace:sftp:account:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L251)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array account.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSftpAccountController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSftpAccountController.php#L188)[`PATCH /api/user/webspaces/{uuidShort}/sftp-accounts/{accountId}`](https://featherpanel.com/docs/api/reference/user/webspaces/sftp-accounts/#patch-user-webspaces-uuidShort-sftp-accounts-accountId)

```php
$event->on(WebSpaceEvent::onWebSpaceSftpAccountUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:sftp:account:updated ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSftpPasswordReset()`

- Name: `featherpanel:webspace:sftp:password:reset`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L267)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int account id.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSftpAccountController::resetPassword`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSftpAccountController.php#L153)[`POST /api/user/webspaces/{uuidShort}/sftp-accounts/{accountId}/reset-password`](https://featherpanel.com/docs/api/reference/user/webspaces/sftp-accounts/#post-user-webspaces-uuidShort-sftp-accounts-accountId-reset-password)

```php
$event->on(WebSpaceEvent::onWebSpaceSftpPasswordReset(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:sftp:password:reset ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSubuserCreated()`

- Name: `featherpanel:webspace:subuser:create`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L99)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int subuser id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSubuserController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSubuserController.php#L108)[`POST /api/user/webspaces/{uuidShort}/users`](https://featherpanel.com/docs/api/reference/user/webspaces/#post-user-webspaces-uuidShort-users)

```php
$event->on(WebSpaceEvent::onWebSpaceSubuserCreated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:subuser:create ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSubuserDeleted()`

- Name: `featherpanel:webspace:subuser:delete`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L115)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int subuser id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSubuserController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSubuserController.php#L202)[`DELETE /api/user/webspaces/{uuidShort}/users/{subuserId}`](https://featherpanel.com/docs/api/reference/user/webspaces/#delete-user-webspaces-uuidShort-users-subuserId)

```php
$event->on(WebSpaceEvent::onWebSpaceSubuserDeleted(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:subuser:delete ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSubuserUpdated()`

- Name: `featherpanel:webspace:subuser:update`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L107)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, int subuser id, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpaceSubuserController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceSubuserController.php#L163)[`PUT /api/user/webspaces/{uuidShort}/users/{subuserId}`](https://featherpanel.com/docs/api/reference/user/webspaces/#put-user-webspaces-uuidShort-users-subuserId)

```php
$event->on(WebSpaceEvent::onWebSpaceSubuserUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:subuser:update ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceSuspended()`

- Name: `featherpanel:webspace:suspended`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L51)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpacesController::suspend`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1759)[`POST /api/admin/webspaces/{uuid}/suspend`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-suspend)

```php
$event->on(WebSpaceEvent::onWebSpaceSuspended(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:suspended ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceUnsuspended()`

- Name: `featherpanel:webspace:unsuspended`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L59)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (1 site)

-   [`WebSpacesController::unsuspend`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L1784)[`POST /api/admin/webspaces/{uuid}/unsuspend`](https://featherpanel.com/docs/api/reference/admin/webspaces/#post-admin-webspaces-uuid-unsuspend)

```php
$event->on(WebSpaceEvent::onWebSpaceUnsuspended(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:unsuspended ' . json_encode($args));
});
```

## `WebSpaceEvent::onWebSpaceUpdated()`

- Name: `featherpanel:webspace:updated`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/WebSpaceEvent.php#L35)

Docblock: string|null user uuid, string webspace uuid, string uuid\_short, array changed fields, array context.

The payload is built at runtime, so its keys cannot be read from the source. Accept `...$args` and inspect them.

When it fires (2 sites)

-   [`WebSpacesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/WebSpacesController.php#L272)[`PATCH /api/admin/webspaces/{uuid}`](https://featherpanel.com/docs/api/reference/admin/webspaces/#patch-admin-webspaces-uuid)
-   [`WebSpacesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpacesController.php#L356)[`PATCH /api/user/webspaces/{uuidShort}`](https://featherpanel.com/docs/api/reference/user/webspaces/#patch-user-webspaces-uuidShort)

```php
$event->on(WebSpaceEvent::onWebSpaceUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:webspace:updated ' . json_encode($args));
});
```
