internal/...: create new structure for api

Docstring?