Skip to main content
POST
/
files
/
create-upload
Create a presigned upload URL
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>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Org-Id
string
required

The ID of the organization to make requests against. Found on your Settings page.

Body

application/json
filename
string
required

Original name of the file (e.g. questionnaire.docx)

content_type
string
required

MIME type of the file (e.g. application/vnd.openxmlformats-officedocument.wordprocessingml.document)

size
integer
required

File size in bytes

Required range: x >= 1
survey_id
string

ID of the survey to attach this file to. Omit to upload without a survey association.

Response

file_id
string
required

ID of the file record created in Questra

upload_url
string<uri>
required

Presigned PUT URL. Upload the raw file body here with the same Content-Type you specified in the request.