Channel

Subscribe to channel messages

Subscribe to a channel to receive real-time messages published to it. This endpoint returns a streaming response that will continuously send message events as they are published to the channel via the publish endpoint. The connection remains open until the client closes it or an error occurs.

post/channel/{channelId}/subscribe

Request

  • Base URL: https://api.chatbotkit.com/api/v1
  • URL: https://api.chatbotkit.com/api/v1/channel/{channelId}/subscribe
  • Auth: HTTP bearer

Path parameters

channelIdstring required

The ID of the channel to subscribe to (minimum 16 characters)

Request body

historyLengthinteger

Number of historical messages to replay from the channel before subscribing to live updates. When provided, the subscriber will first receive up to this many recent messages that were published before the subscription started. This is useful for catching up on messages that may have been published during connection setup.

Response

Successfully subscribed to channel messages

Changes

No recorded changes to this operation across all 1 revision of this API.