Skip to main content
POST
/
files
Upload a file
curl --request POST \
  --url https://api.questra.ai/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Org-Id: <x-org-id>' \
  --form file='@example-file' \
  --form 'survey_id=<string>'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "mime_type": "<string>",
  "org_id": "<string>",
  "survey_id": "<string>",
  "ai_file_id": "<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

multipart/form-data
file
file
required

Contents of the file to upload

survey_id
string

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

Response

id
string
required

Unique ID of the uploaded file

created_at
string<date-time>
required

Date and time the file was uploaded

name
string
required

Original name of the uploaded file

mime_type
string
required

Mime type of the file

org_id
string
required

Unique ID of the organization that owns this file

survey_id
string

Unique ID of the survey the file was uploaded with

ai_file_id
string

Unique ID of an AI ready copy of the file that was generated and cached to expedite AI processing