Add api for updating model