some initial work for integrating an API. Separate API from website, since we would probably want different behaviour between them going forward