I haven’t tested it with Python, but it would be worth trying to use the string "true" instead of the boolean True for the boolean parameters. Discourse will interpret the strings "true" and "false" as booleans.
I’m assuming you are able to get some API calls to work, and are just having trouble with this particular one. Let us know if that’s not the case.