posting a task in asana through API won't accept line breaks for "notes"

69 Views Asked by At

when creating a task in Asana through API it won't accept line breaks for the "notes" parameter. Is there any workaround for this?

1

There are 1 best solutions below

0
On

You can create a task using JSON and using \n to specify a line break. Here is some code to edit a task's notes, but this should also work when creating a task.

curl -H "Authorization: Bearer " -X PUT "https://app.asana.com/api/1.0/tasks/" -H "content-type: application/json" -d "{\"data\": { \"notes\": \"test\nhello\" }}"

I've verified the above to work.

If it doesn't work you'll need to provide more detail on the query you are making.