Skip to main content
POST
/
realtime
/
v1
/
channels
/
{channel}
/
messages
Publish a message to a channel
curl --request POST \
  --url https://api.voyant.travel/realtime/v1/channels/{channel}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "order.updated",
  "data": "<unknown>"
}
'
{
  "id": "<string>",
  "channel": "<string>",
  "event": "<string>",
  "data": "<unknown>",
  "publishedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Voyant Cloud API token, passed as Authorization: Bearer <token>. Each token carries a fixed set of scopes; an operation rejects tokens missing its required scope.

Path Parameters

channel
string
required

Body

application/json
event
string
required

Event name delivered to subscribers.

Example:

"order.updated"

data
any

JSON-serializable payload delivered as-is to subscribers.

Response

Published message

id
string
required
channel
string
required
event
string
required
data
any
required
publishedAt
string<date-time>
required