Notification inbox
Returns the notifications sent to a user within your application — the data behind an in-app “Messages” screen.
GET /api/push/notifications?externalUserId=operator-497&limit=50&offset=0
X-Push-App-Key: <application key>
Query parameters
| Parameter | Required | Notes |
|---|---|---|
externalUserId | yes | The namespaced user id used at registration. |
limit | no | Page size. |
offset | no | Pagination offset. |
from | no | Start of an ISO-8601 date range. |
to | no | End of an ISO-8601 date range. |
status | no | Filter by notification status. |
Normalise the response before using it
The response may be a bare array or a paged envelope. An earlier build passed the raw body straight to .filter, and a non-array took the whole notification centre down with it.
const toArray = (data: any) =>
Array.isArray(data) ? data
: Array.isArray(data?.items) ? data.items
: Array.isArray(data?.data) ? data.data
: Array.isArray(data?.notifications) ? data.notifications
: Array.isArray(data?.result) ? data.result
: [];