> ## 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 [JSON](https://en.wikipedia.org/wiki/JSON) format. Have a look at the [PushData](https://github.com/bytebeamio/bytebeam-arduino-sdk/tree/main/examples/ESP32/PushData) example sketch for a full fledged example showing how to use this function.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.