> ## Documentation Index
> Fetch the complete documentation index at: https://bytebeam.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pushing data to Bytebeam

> Learn how you can push data to Bytebeam console.

To push data to Bytebeam you need to first create a stream. You can do this by following the [Creating a Stream](https://bytebeamio.mintlify.app/platform-guide/streams-tables/creating-a-stream) guide. Once you have created a stream you can use the `publishToStream` method to publish data to the stream.

```cpp theme={null}

// Publish data to the bytebeam stream

//
// streamName: Name of the stream to publish the payload
// payload: Data to be published
//

bool Bytebeam.publishToStream(char* streamName, const char* payload);
```

Bytebeam expects the payload to be in the <a href="https://en.wikipedia.org/wiki/JSON" target="_blank">JSON</a> format. Have a look at the <a href="https://github.com/bytebeamio/bytebeam-arduino-sdk/tree/main/examples/ESP32/PushData" target="_blank">PushData</a> example sketch for a full fledged example showing how to use this function.
