Added debugging to api post