curl --request POST \
--url https://api.questra.ai/files/create-upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Org-Id: <x-org-id>' \
--data '
{
"filename": "<string>",
"content_type": "<string>",
"size": 2,
"survey_id": "<string>"
}
'{
"file_id": "<string>",
"upload_url": "<string>"
}Returns a presigned URL for uploading a file directly to storage. This is the recommended way to upload files — it bypasses server body-size limits and supports files of any size.
The flow is:
file_id.PUT the file body directly to the returned upload_url.POST /files/{id}/complete-upload to finalize the record.curl --request POST \
--url https://api.questra.ai/files/create-upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Org-Id: <x-org-id>' \
--data '
{
"filename": "<string>",
"content_type": "<string>",
"size": 2,
"survey_id": "<string>"
}
'{
"file_id": "<string>",
"upload_url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Original name of the file (e.g. questionnaire.docx)
MIME type of the file (e.g. application/vnd.openxmlformats-officedocument.wordprocessingml.document)
File size in bytes
x >= 1ID of the survey to attach this file to. Omit to upload without a survey association.