Send messages to Fanout subscribers
POST {{fastly_url}}/service/{{service_id}}/publish
Send one or more messages to Fanout subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel.
IMPORTANT: For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the Authorization header (instead of the Fastly-Key header) using the Bearer scheme.
Authorization: API token with at least Engineer permissions.
Request Body
{"items"=>[{"channel"=>"mychannel", "formats"=>{"ws-message"=>{"content"=>"hello world"}}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Host | string | ||
Content-Type | string | ||
Accept | string |