Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

API Issue: Creating Issues with Multi-line Descriptions via REST API

Nick
December 3, 2025

Hi Jira Community,

I'm integrating Adobe Workfront with Jira Cloud using the REST API v3 (/rest/api/3/issue) and running into an issue when creating Spaces and Tasks with descriptions (Description field) that contain line breaks/newlines.

What works:

  • Single-line descriptions create successfully

What fails:

  • Descriptions with hard returns/newlines cause a 400 error: "There was an error parsing JSON"

Current approach: I'm using the Atlassian Document Format (ADF) structure:

json
"description": {  "type": "doc",  "version": 1,  "content": [    {      "type": "paragraph",      "content": [        {          "type": "text",          "text": "{{description}}"        }      ]    }  ]}

The problem: When {{description}} contains text with line breaks (e.g., from a multi-paragraph field in Workfront), the JSON fails to parse.

What I've tried:

  • Replacing newlines with spaces
  • Escaping special characters
  • Using stripHTML() functions

Questions:

  1. How should multi-line text be formatted in the ADF structure?
  2. Should I split paragraphs into separate ADF paragraph objects?
  3. Is there a recommended way to sanitize external text data before passing to the Jira API?

Any guidance would be greatly appreciated!

Thanks!
Nick
PS - I'm not a developer, but have been learning.

2 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 3, 2025

Hi @Nick 

Yes, and...to the suggestions from @Andy Rusnak 

Did you ensure the message was encoded so the line breaks / newlines send correctly?  I am not familiar with Adobe Workfront, but perhaps there is a function to do that encoding.

If the endpoint is called from an Atlassian Automation rule, that would be the jsonEncode function.

Kind regards,
Bill

0 votes
Andy Rusnak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2025

Hi Nick, 

I hope this post finds you well!  I hope your journey into development work has been enjoyable thus far too!  

I ran a quick test with the description field containing new line characters and didn't have any issues related to this.  This was a sample of what I used for the field: 

"description": { 
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello there\nfrom a new line"
}
]
}
]
}

Is that similar to how yours is formatted?  Would you be willing to share an actual sample of the request that fails?    

The JSON parser is also pretty strict, so if you have a comma for example after the last line it will also throw an error like that.  

Best, 

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events