> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # publish > publish method for the PubSub.Client class. ### publish * **publish**(`params`): `Promise` Publish a message into the specified channel. #### Parameters **`params`** `object` — required Configuration object for publishing a message --- **`params.channel`** `string` — required Channel in which to send the message. --- **`params.content`** `any` — required The message to send. This can be any JSON-serializable object. --- **`params.meta`** `Record` Metadata associated with the message. There are no requirements on the content of metadata. --- #### Returns `Promise` #### Examples Publishing a message as a string: ```js await pubSub.publish({ channel: "my-channel", content: "Hello, world." }); ``` Publishing a message as an object: ```js await pubSub.publish({ channel: "my-channel", content: { field_one: "value_one", field_two: "value_two" }, }); ``` > publish method for the PubSub.Client class.