Skip to main content
You can call this function from anywhere in your backend to send multiple events. The other way to send multiple events is by using io.sendEvents() from inside a run() function. Use eventTrigger() on a Job to listen for events. For single events, use client.sendEvent() instead.

Parameters

events
array
required
options
object

Returns

events
array
const event = client.sendEvents([
  {
    name: "new.user",
    payload: {
      userId: "u_12345",
    },
  },
  {
    name: "new.user",
    payload: {
      userId: "u_67890",
    },
  },
]);
I