MessagingApi
Reference for the MessagingApi module: the API endpoints for messaging operations, with every class and function, its full signature, parameters and return type. The module registers a POST endpoint that records a member's device token for push notifications, and provides the handler that stores it.
This page is a pure reference. It documents only what the module's source defines: one class registering the endpoints and providing their handler.
MessagingApi- registers and handles the messaging API endpoints.
MessagingApi
Declares the messaging API surface. Endpoints registers the routes into
the ApiConfig registry when the module loads; NotificationTokenPost is the
handler bound to the POST /api/Messaging/v1/NotificationToken route, which
registers a device token for push notifications for the logged-in member.
Endpoints
MessagingApi::Endpoints(): void
Register the messaging API endpoints into the ApiConfig registry. Declares the Messaging v1 module and its POST NotificationToken route, with the route's inputs, guard and handler. Called once when the module loads.
Returns void
NotificationTokenPost
MessagingApi::NotificationTokenPost(object $input, ApiContext $ctx): void
Handler for POST /api/Messaging/v1/NotificationToken. Registers a device token for push notifications against the logged-in member. Reads the token and platform from the validated input.
| Name | Type | Description |
|---|---|---|
$input | object | The validated request input, with the token (string) and platform (ios, android or web). |
$ctx | ApiContext | The API request context. |
Returns void