> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish To Kafka

You can use QStash to forward a message to Kafka by using our
[Kafka REST API](/kafka/rest).

All you need is the `Webhook` url from the
[Upstash Console](https://console.upstash.com/kafka) and the Kafka topic to
publish to.

Here is a complete example: `<KAFKA_URL>`, `<USER>` and `<PASS>` will already be
filled in when you copy the url, but you need to replace `<TOPICNAME>` and
`<QSTASH_TOKEN>` with the correct values.

```
curl -XPOST 'https://qstash.upstash.io/v2/publish/<KAFKA_URL>/webhook?topic=<TOPICNAME>&user=<USER>&pass=<PASS>' \
    -H 'Authorization: Bearer <QSTASH_TOKEN>' \
    -d 'hello world'
```
