Email json with \n does not produce a newline in yahoo or gmail

New just trying curl POST request like:

"subject": "Test email",
    "body": "Act: disco \ntest\ntest",
    "to": [{
      "name": "Stormy",
      "email": "<omitted>"
    }]'

it is sent OK, but, no new lines in both gmail or yahoo.. Tried \\n and \\\n all are printed on one line.

If trying with \nl in a bash variable like:

BODY=”test

test”

it returns such an error:

"error":{"type":"api.invalid_request_error","message":"we could not deserialize your request, incorrect request body format"}}

Question is how to construct a curl/POST with body having html or new lines in it..

Tried Content type text/html,. but it rejects wanting only application/json… or multipart/data.

Thanks.

Hello,

Could you try the same body and also pass this parameter as true: Nylas Email, Calendar, and Contacts API docs | Docs

Thank you,

–Sam Xavier,
Support Engineer, Nylas

Can you exactly say the parameter to set to true and full syntax? that url opens to a blank page for me.