Hello.
I was dealing with almost the same problem today, getting 415 response code. The problem was with sending the data as data parameter. The request needs it in the json parameter instead. So like this: requests.post(url=url, json=data, headers=headers)