Skip to main content

Event Inbox

GraphQL Endpoint

https://platform.enjin.io/graphql

Event Inbox stores eligible on-chain notifications for your account so you can poll at a convenient time or recover notifications missed over WebSocket. Authenticate with your Enjin Platform API token. Notifications are captured automatically; no Pusher connection or opt-in is required.

See Working with Events for the processing workflow and On-chain notifications for the supported events.

GetPendingEvents​

Returns the oldest unacknowledged notifications for the authenticated user on the requested network and chain, up to limit.

GetPendingEvents(
network: Network! = ENJIN
chain: Chain! = MATRIX
limit: Int! = 100
): [UnprocessedEvent!]!
ArgumentTypeDefaultDescription
networkNetwork!ENJINNetwork to retrieve notifications from: ENJIN or CANARY.
chainChain!MATRIXChain to retrieve notifications from: MATRIX or RELAY.
limitInt!100Maximum number of notifications to return, from 1 to 100.

All three arguments can be omitted to use their defaults. Poll each network and chain you need separately.

Response fields​

The result is a list of UnprocessedEvent objects, or [] if there are no pending notifications.

FieldTypeDescription
uuidID!Delivery UUID used for deduplication and acknowledgment. The same UUID is included in the corresponding Pusher notification.
eventString!Exact Pusher event name, for example BalancesTransfer.
payloadJSON!Notification payload as a JSON object. The delivery UUID is returned separately in uuid; Pusher adds it to the payload as uuid.

Example​

This example retrieves notifications on Enjin Relaychain.

query GetPendingEvents(
$network: Network! = ENJIN
$chain: Chain! = MATRIX
$limit: Int! = 100
) {
GetPendingEvents(network: $network, chain: $chain, limit: $limit) {
uuid
event
payload
}
}

Variables:

{
"network": "ENJIN",
"chain": "RELAY",
"limit": 100
}

These two notifications have identical payloads but different UUIDs. Treat them as separate deliveries; deduplicate by uuid, not by payload or event name.

Retrieving the next batch​

Reading notifications does not acknowledge them. There are no page, offset, or cursor arguments: repeated queries return the oldest pending notifications until they are acknowledged or expire. After successfully processing a batch, call AcknowledgeEvents with its UUIDs, then query again for the next batch.

Notifications are retained for 14 days from dispatch. Unacknowledged notifications expire and are automatically purged after that period. Event Inbox does not backfill historical events.