Cannot allocate machine via API - 'dict' object has no attribute 'lists'

I am using c# to invoke the maas rest api. I can authenticate fine (proven by the fact i can call the api endpoint to get all machines), but when I try to allocate a machine, I get this error:

‘dict’ object has no attribute ‘lists’

I have request like so:






























What am I missing? I get this error too in C# but the same request format works fine for provisioning DNS records.