Which markdown/format is supported for pull request comment via rest api and how to add it

In some situation i need to post a comment on PR from my app, the comment includes bullets, links and more,
Using RestApi v2.0 i success to Post a raw data as comment with the following payload

{"content":{"raw":"change identified :  \\nWORKFLOW - 1 · PR test:  \\n* extra data added to a test or documentation file (1)  \\n  * 1. ssl - lines: [#1](https://bitbucket.org/workspace/repo/commits/0fa2cb53ad1c063bd86769abe374c467672862b0#LsslT1)  \\n[View in my app](https://localhost:5001/release/xxxxxxxx)"}

But I want it to be shown “pretty”/formate for the user,
is it possible? How?
also how can i show the App name as the commenter?

i try to send the content payload with some other fields like:

   "raw":"sldfsds\n\nsdg\n\ndfg\n\n[http://www.ynet.co.il](http://www.ynet.co.il){: data-inline-card='' } ",
   "html":"<p>sldfsds</p>\n<p>sdg</p>\n<p>dfg</p>\n<p><a data-inline-card=\"\" data-is-external-link=\"true\" href=\"http://www.ynet.co.il\" rel=\"nofollow\">http://www.ynet.co.il</a> </p>"

but i am getting the following error as response:

    "type": "error",
    "error": {
        "message": "Bad request",
        "fields": {
            "content.type": "extra keys not allowed",
            "content.markup": "extra keys not allowed",
            "content.html": "extra keys not allowed"

Welcome to the Atlassian developer community @MotiLahiani,

To interpret the error message, don’t send the content with “some other fields”. Specifically, don’t send type, markup, or html. I realize the docs are quite confusing in this regard; however, the raw attribute should be fine the way you are sending it, as long as it is valid Markdown (Bitbucket will attempt to “taste” it to see what format it is). Maybe start with a simpler test case like:

  "content": {
    "raw" : "# Header 1"

Thanks a lot

1 Like