refactor: renamed :type from endpoint to api