api: refactor create task and push notify.