Improve API to return id instead of a boolean