Hello,
I am trying to create tickets with a comment that has markdown formatted text. I have found that if an author ID is attached to the comment the markdown formatting is ignored but without the author ID it is kept. Is this the way things should work? Is there any work around for this?
This ticket will display improperly.
{
"ticket": {
"description": "test ticket description",
"tags": [
"test"
],
"comment": {
"author_id": 123456,
"body": "**comment 1**\n__comment2__\n **comment3.**\n__comment4.__\n",
"public":true
}
}
}
This call will properly render the markdown as bold.
{
"ticket": {
"description": "test ticket description",
"tags": [
"test"
],
"comment": {
"body": "**comment 1**\n__comment2__\n **comment3.**\n__comment4.__\n",
"public":true
}
}
}
As an aside, it would be nice if this forum supported code blocks.
Thank you for posting your question to the Community! When creating a new ticket, the request body doesn't require the author id of the comment. That is typically set in the metadata at the time of creation from the requester and with any subsequent updates.
It could also have something to do with the comment getting flagged and that is disrupting the formatting. I suggest checking out this documentation on [setting the Author ID](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#author-id) and see if any of these flags are being applied.
Hope this helps!
Best,
Erica - Dev Support