This introduces the API flow. (DON'T MERGE, JUST REVIEW)

Is this gonna be added in another branch or chunk of work? (cc @matharden)