register via api (json format)