Survey Q&A is an optional pre-flight step before programming. Use it when you want researchers to clarify ambiguous questionnaire instructions before Questra generates the survey IR. Q&A is stateless on the server until programming starts. Your app streams questions from a file, stores answers locally, and sends the final Q&A snapshot toDocumentation Index
Fetch the complete documentation index at: https://docs.questra.ai/llms.txt
Use this file to discover all available pages before exploring further.
POST /surveys/{id}/start-programming.
How the flow works
Create the survey
Upload the questionnaire with
POST /surveys. The response includes both surveyId and fileId.The survey starts in status: "pending" and stays pending during Q&A.Stream questions
Call
POST /files/{fileId}/qa with any answered prior questions in priorQa.The response is a server-sent event stream. Each discrepancy event is a question to show the user. The final done event includes the number of questions emitted in that stream.Store answers client-side
Store each streamed question and its answer in client storage, such as
localStorage.Do not create backend Q&A records. The server uses priorQa only as request context until you start programming.Run follow-up rounds
Once the user answers the current questions, call
POST /files/{fileId}/qa again with the answered snapshot in priorQa.This prevents Questra from re-asking resolved questions and lets it detect any follow-up ambiguity.Request shapes
CallPOST /files/{fileId}/qa with answered prior questions:
POST /surveys/{surveyId}/start-programming with the final snapshot:
TypeScript example
Endpoint reference
POST /files/{id}/qastreams Q&A questions for a questionnaire file.POST /surveys/{id}/start-programmingpersists the final Q&A snapshot and starts programming.
Q&A is optional. To skip it, call
POST /surveys/{id}/start-programming with no qa body or with {"qa":[]}.