api: use text/json content-type
use text/json content-type in a few more places