REST API does not turn on or off connected devices

I’m using post to http://hassio.local:8123/api/states/ to change the state of a Phillips hue light (turn it off).

I get the 200 OK response but HA does not actually do anything, light is still on.

Response of the post says state : off but, if I query the entity again, it is still on (and of course, light does not turn off).

Same thing goes with the attributes, I try to change brightness, I get 200 OK but nothing actually happens with the light itself.

Is REST API broken or am I doing something wrong?

How to control connected devices via REST API?

Thank you.

What is the full URL you’re posting to? What is the data payload you’re sending?

Should be something like:
URL: http://hassio.local:8123/api/services/light/turn_on
Payload: {“entity_id”:“light.[your entity]”}