title: Is there a way to produce Kafka messages with headers using Kafka Confluent REST API?
body: <p>I'm trying to send messages to Kafka with some custom headers, but I could't find a way to do it. According to the <a href="https://docs.confluent.io/current/kafka-rest/docs/api.html#topics" rel="nofollow noreferrer">documatation</a>, The <code>POST /topics/(string: topic_name)</code> API does not have a way to attach custom headers to messages.</p>
  
  <p>Does anyone know a way to send Kafka messages with custom headers through the confluent Kafka REST API?</p>
  
  <p>Here is my sample request body I sent to the REST proxy</p>
  
  <pre><code>POST /topics/stream.mycustomtopic
  
  {
      "records": [{
          "value": "{\"myFirstKey\":\"myFirstValue\"}"
      }]
  }
  </code></pre>