There is a much better way of doing that
APIFunction["d" -> RepeatingElement["Integer"], Max[#d] &]["d__json" -> "[1,2,3,4]"]
Look at the documentation of AllowedCloudParameterExtensions, to see why that works, and what else can be made to work.
Or another way of doing it is to use DelimitedSequence to define a JSON list parser for you:
APIFunction["d" -> DelimitedSequence["Integer", {"[", ",", "]"}], Max[#d] &]["d" -> "[1,2,3,4]"]