Shouldn’t that be form-data instead?
I’m not sure then, as far as API is concerned files
is the only required parameter in this call.
I wonder if it would be easier for you in a long run to use oauth2 and our wrappers for that, alternatively perhaps look here as well