add api and example