domains api handling