Can't comment on a Jira issue with REST "Comment body is not valid!"

Hello,

When trying to add a comment to a jira issue with the REST API in python, I get the following error: requests.exceptions.HTTPError: comment: Comment body is not valid!

For testing, my comment body was taken right from an existing Jira comment:

payload = json.dumps( { "body" : {
      "version":1,
      "type":"doc",
      "content":[
         {
            "type":"paragraph",
            "content":[
               {
                  "type":"text",
                  "text":"boo"
               }
            ]
         }
      ]
   }
} )

and run with:

response = requests.request(
   "POST",
   url,
   data=payload,
   headers=headers
)

What is wrong with my comment body?

What’s the url you’re posting to?

https://{my_sandbox}.atlassian.net/rest/api/3/issue/{issueIdOrKey}/comment