Sprig interview question

API design for a practical use case