Publish event
publish_eventSend an event to one or more Apinator channels so subscribed clients receive it immediately; cache channels store and replay it for future subscribers.
Instructions
Publish an event to one or more Apinator channels. Every client subscribed to those channels receives it immediately. On cache- channels the event is also stored and replayed to future subscribers. Pass exactly one of channel or channels.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Event payload. An object or array is sent as JSON; a string is sent as-is (clients JSON-decode it if they can). | |
| name | Yes | Event name, e.g. "order-created". Names starting with "realtime:" are reserved. | |
| channel | No | Channel to publish to, e.g. "orders" or "private-user-42". | |
| channels | No | Several channels to publish the same event to (max 100). | |
| socket_id | No | Exclude this connection from receiving the event (the sender's own socket). |