saving api object