Questra’s API lets you build a fully whitelabeled AI survey-programming workflow inside your own product. This guide walks through the complete lifecycle: uploading a questionnaire, answering clarification questions, starting AI programming, and accessing the finished platform-native survey.Documentation Index
Fetch the complete documentation index at: https://docs.questra.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Every request requires your API key as a Bearer token and your organization ID in theX-Org-Id header. All endpoints live at api.questra.ai. You can create API keys and find your organization ID from the Questra dashboard. See the Authentication guide for details.
Survey lifecycle
Create a survey from a questionnaire
Upload your questionnaire file with
POST /surveys and save the id from the response.Reference: POST /surveysAnswer clarifying questions (optional)
After upload, your app can run a stateless Q&A pass against the uploaded file. Call Send answered items back as
POST /files/{fileId}/qa and read the server-sent events as questions are detected. Store the questions and answers client-side until you are ready to start programming.priorQa on later Q&A calls so Questra does not re-ask resolved questions. If the stream finishes with count: 0, Q&A is done.Reference: Survey Q&ASet the destination
Tell Questra which platform and integration to target with
PUT /surveys/{id}/destination. This can be called before or after start-programming.Reference: PUT /surveys/{id}/destinationStart programming
Kick off the AI programming pipeline with Reference:
POST /surveys/{id}/start-programming. This is idempotent and safe to retry. Include the full Q&A snapshot when you collected clarifications:POST /surveys/{id}/start-programmingWait for completion
Poll
GET /surveys/{id} until status reaches reviewing, or use webhooks to avoid polling.Reference: GET /surveys/{id}Access the platform survey
Once
status is reviewing, retrieve the connected platform survey via GET /integrations/{id}/surveys and create participant sources (distribution links) with POST /integrations/{id}/surveys/{surveyId}/sources.References: GET /integrations/{id}/surveys · POST /integrations/{id}/surveys/{surveyId}/sourcesNext steps
Webhooks
Receive HTTP notifications when events happen in your organization.
Authentication
Set up API keys and authenticate requests.
Survey Q&A
Implement optional clarification Q&A before programming starts.
History
Track every IR change with changesets and revert to any previous state.