ReferenceAsk
Remy Reference/admin/Publish a test event
?

Publish a test event

Publish an event exactly as the app would, to verify a subscriber before the backend trigger exists.
admin.events.publish({ channels, data })

Publishes a test event through the same validation, delivery, and metering as the app's own events.publish, so a frontend subscriber can be verified before the backend that will eventually trigger it exists. It returns the live subscriber count across the channels, and zero is normal, not an error. It also returns the platform-stamped publish id, the same id events tail prints, so a test publish can be correlated with the live stream, along with the scope it published into.

Parameters
channel
string
RequiredThe channel to publish to.
json
string
RequiredThe payload as a JSON string.
--scope
string
Environment to publish into: live (default), preview:<releaseId>, or dev:<sessionId>.
CLI
remy-admin events publish user:usr_123 '{"type":"ping"}'