Pretty simple one

A post request too:

http://192.168.8.1/cgi-bin/api/safe_mode/set

Param to pass in is:

enable=true

(obviously your need to pass in the authorisation token too)