Description Format not maintained when creating ticket with API

The formatting of the description seems to be strip by the API.  I am interested in maintaining line breaks, but those seem to be striped away.

I am using the code from the php example.

3 people have this question

I'm using Microsoft flow which is also using the API and it seems the "description" field is stripping my line formatting as well. Anyone have a fix/solution for this? 


First, it seems like this discussion is at least 4 months old - is there any input from Freshdesk support?

I'm having the same issue. When using the api, newline characters get stripped from the description with no effect on the resulting description. So, for instance,

this: "Here is a new\n\n description"

becomes: "Here is a new description"

and this: "Here is a new\\n\\n description"

becomes: "Here is a new\n\n description"

Please change the API so that newline characters actually have an effect on ticket description.

Just emailed Freshdesk support and got this response: 

"Instead of passing it in that format -- try passing it in the HTML format where instead of \n use -- <br> Something <br> and check if that's doing the trick."

Worked for me!

Using <br> worked for me as well.

or better yet, wrap the description in <pre> .. </pre> tags then new-lines and indentations will be preserved.

Login or Signup to post a comment