Skip to main content
POST
/
surveys
/
{survey_id_or_slug}
/
program-from-file
/
{fileId}
Program a survey from a file
curl --request POST \
  --url https://api.questra.ai/surveys/{survey_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>"
    }
  ],
  "started_responding_at": "2023-11-07T05:31:56Z",
  "response_completed_at": "2023-11-07T05:31:56Z"
}

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.

Path Parameters

survey_id_or_slug
string
required

Unique ID or slug of the survey to program

fileId
string
required

Unique ID of the file to use as the questionnaire source

Response

Programming job started. Returns the initial agent user message.

id
string
required

Unique ID of the user message

user_id
string
required

Unique ID of the user who sent the message

created_at
string<date-time>
required

The date and time the message was created

content
object[]
required

text

started_responding_at
string<date-time>

The date and time the message was received by the agent

response_completed_at
string<date-time>

The date and time the agent finished responding