How to create a markup comment on a pull request?

I am using this API call to create a comment on a PR:
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-comments-post

This is my body payload:

{
    "content": {
        "raw": "##test comment"
    }
}

Unfortunately the markdown is not applied. I have tried also this payload:

{
    "content": {
        "markup": "markup"
        "raw": "##test comment"
    }
}

but I am getting this error:

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

How can I add markup comment on a PR? The documentation is really bad and it does not provide any examples.

Welcome to the Atlassian community @MikoajWaniewski,

Your first payload is the correct structure. I think the problem is the Markdown syntax (or “flavor”). I recommend using ## test comment (space after the header symbols). For more information on what Markdown syntax is available, see:

For a more comprehensive set of example markdown text, see:
https://bitbucket.org/tutorials/markdowndemo/src/master/README.md

And the backing raw file:
https://bitbucket.org/tutorials/markdowndemo/raw/5b6c39df3196eeeb8a36684beb9a3df854a0b5f3/README.md

Thanks @ibuchanan, it’s working after I have added a space after header symbol.