Good day, dear Jira Community! Could you tell me please - can i post, using ‘Add comment’ endpoint, formatted comment? For exaple here is my comment.
I can get this comment, using API, here is the ‘body’:
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "test comment "
},
{
"type": "text",
"text": "bold",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": " "
},
{
"type": "text",
"text": "italic",
"marks": [
{
"type": "em"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "new paragraph "
}
]
},
{
"type": "codeBlock",
"attrs": {},
"content": [
{
"type": "text",
"text": "code"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "test link",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-comments/#api-rest-api-2-issue-issueidorkey-comment-post"
}
}
]
},
{
"type": "text",
"text": " plain text"
}
]
}
]
}
Now i am trying to POST this comment, but i response is:
{
"errorMessages": [],
"errors": {
"comment": "Comment body is not valid!"
}
}
According to the documentation - “body” field in request has to be a “string”.
Is it possible to POST such formatted comment?
Thank You!