> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sageprotocol.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

> Supports administrative creation and configuration of apps, royalties management, reward toggling, and logs relevant events.

```rust theme={null}
use std::string;
use sui::event;
use sage_admin::admin;
use sage_admin::admin_access;
use sage_admin::apps;
use sage_admin::fees;
use sage_utils::string_helpers;
```

<Tip>
  Explore this module further in the Mover Registry: @sage/admin
</Tip>

## Events

### `AppCreated`

Emitted when a new `App` is created.

```rust theme={null}
public struct AppCreated has copy, drop
```

<Expandable title="Fields">
  ```rust theme={null}
    app_id: address,
    name: std::string::String
  ```
</Expandable>

## Functions

### `create_app`

Creates a new `App` within the protocol. Aborts with `sage_admin::access:ETypeMismatch` if the `owned_user` is the incorrect type.

```rust theme={null}
public fun create_app<ChannelType: key>(channel_config: &ChannelConfig, channel: &ChannelType)
```

<Expandable title="Implementation">
  ```rust theme={null}
    public fun create_app<OwnedUserType: key> (
        app_registry: &mut AppRegistry,
        app_name: String,
        owned_user: &OwnedUserType,
        owned_user_config: &UserOwnedConfig,
        ctx: &mut TxContext
    ): address {
        admin_access::assert_owned_user<OwnedUserType>(
            owned_user_config,
            owned_user
        );

        create_app_internal(
            app_registry,
            app_name,
            ctx
        )
    }
  ```
</Expandable>
