How do you enter a line break in a REST API POST

Andrew Catchpol
Giga Contributor

How do you enter a line break in a REST API POST e.g. to the Incident table description field?

There are several suggestions but none work!

e.g. \n\r \\n\\r

 

 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Andrew,

so you want to enter new line to incident short description when incident gets created?

this worked for me:

Request Body: {
"short_description":"test",
"description": "UserA\nCompany"
}

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader