There's a direct endpoint without /24 limitation for those who know what they are doing.
The endpoint is /hub/advanced/switchToStaticIp, and it accepts the following query string parameters (names are self-descriptive):
- address
- netmask <- use 255.255.254.0 for /23 subnet.
- gateway
- nameserver