---
title: "Publish a message to a channel"
method: POST
path: "/channel/{channelId}/publish"
tags: ["Channel"]
---

# Publish a message to a channel

`POST /channel/{channelId}/publish`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/channel/{channelId}/publish`
- Auth: HTTP bearer

Publish a message to a specific channel. The message will be broadcast
to all subscribers currently listening to this channel via the
subscribe endpoint.

## Path parameters

- `channelId` string, required: The ID of the channel to publish to (minimum 16 characters)

## Request body

- object
  - `message` object, required: The message to publish to the channel

## Response `200`

The message was published successfully

- object
  - `id` string, required: The ID of the channel the message was published to

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
