API for SPA