Save DATETIME using API

I am using the PHPMaker API to save records and everything works well until the point when i want to save a datetime value into PHPMaker.

For example the datetime im trying to pass is 2020-11-04 15:26:27.783
When passing the api using the url it turns to 2020-11-04%2015:26:27.783 (Space turns to %20 as normal)
Then SQL thrown an error as its not in datetime format "Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Conversion failed when converting date and/or time from character string."I would have through the API would have done a urldecode on the date before attempting to insert into SQL?Any ideas how to get around this issue?

If you pass data via URL, you need to URL-encode your data, e.g.

"...&datefield=" + encodeURIComponent("2020-11-04 15:26:27.783")

(Assume you use API with JavaScript.)