API endpoint for server