This is possible in API v3. POST /surveys with a title to create the survey (the response carries the survey id), then POST /surveys/{survey_id}/pages to add pages, and add questions and options under those pages. Build the survey top-down through the v3 endpoints.

Context: Stack Overflow question: the v2 API only had create_flow for existing surveys/templates; the question is whether surveys with new questions and options can be created programmatically at all.