curl --request POST \
--url https://api.questra.ai/surveys/{id_or_slug}/program-from-file/{fileId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Org-Id: <x-org-id>'{
"id": "<string>",
"user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}Tell the AI to read the uploaded questionnaire file and program the survey. The survey ID (or slug) and file ID are both in the URL path — no request body is needed.
This kicks off an asynchronous job and returns a 201 with a confirmation object. The survey’s locked field becomes true while programming is in progress. Subscribe to the programming.finished webhook event to know when the job completes.
curl --request POST \
--url https://api.questra.ai/surveys/{id_or_slug}/program-from-file/{fileId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Org-Id: <x-org-id>'{
"id": "<string>",
"user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique ID or slug of the survey to program
ID of the uploaded questionnaire file to program from
Programming job queued successfully