Device Toggle API returning "Internal Server Error" when trying to turn on the switch

URL: https://backend.tinxy.in/v2/devices/<device-id>/toggle

{
	"request": {
		"state": 1
	},
    "deviceNumber": 3
}

This request is returning Internal Server Error.

While this request:

{
	"request": {
		"state": 0
	},
    "deviceNumber": 3
}

is returning a valid response:

{
    "state": "OFF"
}

Device: WIFI_4SWITCH

Firmware version: 3.2

Please call customer care and upgrade firmware to v6.5, then try

Closing this thread as things are working after upgrade to 5.2