Docs/API reference/Publish event

Publish event

The single gateway endpoint for publishing a signed event to a channel.

API· 4 min read

Endpoint

POST/apps/{appId}/events

Publishes one event. EmitWave verifies the HMAC signature, rate-limits, validates, scopes the channel to appId, and fans the event out to subscribers.

Authentication

Each request must be HMAC-signed with a server credential. The signature covers the HTTP method, path, canonical query, and a hash of the exact JSON body, using HMAC-SHA256. In practice you never sign by hand — a server SDK does it for you. Channels are automatically scoped per application so tenants never share a channel.

Request body

FieldTypeDescription
channelstringExternal channel name, e.g. orders or private-account.42
eventstringEvent name subscribers bind to, e.g. order.created
dataobjectArbitrary JSON payload delivered to subscribers
Publishing permission does not grant a subscriber access to a private channel. Subscriber authorization is evaluated separately — see Realtime auth.

Response

A successful publish returns 200 with {"published": true}. Failures return a stable error code and matching HTTP status — see Errors.

Example

bash
# Sign + send with the dev helper (uses the shared protocol signer)
go run ./cmd/ewsign \
  -gw https://api.emitwave.com -app <APP_ID> \
  -key <PUBLIC_KEY> -secret <SECRET> \
  -channel news -event article.created -data '{"hello":"world"}'
# → 200 {"published":true}