In this case I get the error response: Validation failed: emails: The value is not a valid ‘array’.; custom_fields: The value is not a valid ‘array’.; phones: The value is not a valid ‘array’.
I’m not sure if I’m formatting something wrong or if the endpoint has some issue?
I think in your first case whichever language/library you are using is treating the ‘3’ in your code as a double instead of an integer and actually passes it as ‘3.0’, which fails the API validation on Pipedrive side.
In the second example, the format of everything seems to be correct. I think you might be getting the validation errors because of some odd behavior with the commented out line in the JSON as JSON does not natively support comments, although I was unable to reproduce such an error. You could try removing the commented out line and seeing if it works then.