add api endpoint and document it