InvergeDocs
PHPAPI reference

In-app messages

In-app messages in the PHP SDK.

// access
$nexus->inApp()

InApp

class
class Inverge\Nexus\Resource\InApp

In-app messages — OneSignal-style modals & banners shown inside your app. Messages are composed in the console; this resource fetches the ones a user is eligible to see (for server-driven / headless UIs) and records impressions and clicks. Triggers + frequency caps are applied by the client SDK.

View source

__construct

constructor
function __construct(Inverge\Nexus\NexusClient $client)

Parameters

Prop

Type

View source

active()

method
function active(array $options = []): array

The active in-app messages for the tenant (the SDK evaluates triggers + frequency locally).

Parameters

Prop

Type

Returns array<mixed> — list of messages

View source

trackEvent()

method
function trackEvent(string $messageId, string $type, array $options = []): array

Record an in-app message event: impression, click, or dismiss.

Parameters

Prop

Type

Returns array<mixed>

View source

impression()

method
function impression(string $messageId, array $options = []): array

Parameters

Prop

Type

Returns array<mixed>

View source

click()

method
function click(string $messageId, string $buttonId, array $options = []): array

Parameters

Prop

Type

Returns array<mixed>

View source

dismiss()

method
function dismiss(string $messageId, array $options = []): array

Parameters

Prop

Type

Returns array<mixed>

View source

On this page