# How to add new line in webhook?

**URL:** <https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595>\
**Category:** Development\
**Created:** [June 27, 2022, 11:24am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595 "2022-06-27T11:24:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammad01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammad01/32/543_2.png) [@mohammad01](https://forum.mautic.org/u/mohammad01)\
**Post date:** [June 27, 2022, 11:24am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/1 "2022-06-27T11:24:21Z")

</div>

Hi guys.  
I would like to send message in separate line. But all string sent in single line.  
I used before   
 tag and \n and \r\n and issue still exist.  
please take look at my screenshot.  
thanks

 ![mautic01](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/6dc1eeca5cc61fe0e4c896185355a61ef220be9a.jpeg)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 27, 2022, 3:01pm UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/2 "2022-06-27T15:01:46Z")

</div>

What are you sending to? Can the ‘other party’ understand what you want? Can it parse the new lines?

---

<div class="post-metadata">

**Author:** ![mohammad01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammad01/32/543_2.png) [@mohammad01](https://forum.mautic.org/u/mohammad01)\
**Post date:** [June 28, 2022, 5:21am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/3 "2022-06-28T05:21:20Z")

</div>

thanks for your reply.  
Yes, when I tried 3rd party (SMS Gateway) with Postman, everything is fine, But in Mautic all text sent in one line.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 28, 2022, 5:51am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/4 "2022-06-28T05:51:33Z")

</div>

How can you have multiple lines in an SMS?

---

<div class="post-metadata">

**Author:** ![mohammad01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammad01/32/543_2.png) [@mohammad01](https://forum.mautic.org/u/mohammad01)\
**Post date:** [June 28, 2022, 6:03am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/5 "2022-06-28T06:03:50Z")

</div>

I send multi line message to users, and broke the line with /n  
As I said, in Postman everything is fine.  
msg: “Hi user /n How are you?”  
received in phone when sent by Postman:

> Hi user  
> How are you?

received in phone when sent by Mautic:

> “Hi user /n How are you?”

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [June 28, 2022, 6:13am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/6 "2022-06-28T06:13:43Z")

</div>

Oh okay. So we know, that Mautic will not allow you to do this. This could be an encoding issue. Maybe you wanna add a middleware to re-encode. So you’ll pass the data to your own php, and do the connection with the right encoding from there.

---

<div class="post-metadata">

**Author:** ![mohammad01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammad01/32/543_2.png) [@mohammad01](https://forum.mautic.org/u/mohammad01)\
**Post date:** [July 3, 2022, 8:58am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/8 "2022-07-03T08:58:35Z")

</div>

do you have any other solution? 😕 😕

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 3, 2022, 9:10am UTC](https://forum.mautic.org/t/how-to-add-new-line-in-webhook/24595/9 "2022-07-03T09:10:11Z")

</div>

Other then creating your own php, that reformats the code and posting there first?  
I mean your webhook can call your middleware php, which forwards the well formatted request.
