Skip to main content
GET
/
surveys
/
{survey_id_or_slug}
/
variables
List variables in a survey
curl --request GET \
  --url https://api.questra.ai/surveys/{survey_id_or_slug}/variables \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Org-Id: <x-org-id>'
[
  {
    "id": "<string>",
    "name": "<string>",
    "survey_id": "<string>",
    "expression": "<string>",
    "attention_required": {
      "reason": "<string>",
      "dismissed": false
    }
  }
]

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 list variables for

Response

id
string
required

Unique ID of the variable

name
string
required

Unique name of the variable within the survey

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*[a-zA-Z0-9]$
Examples:

"isTeenager"

"wants_to_be_contacted"

survey_id
string
required

Unique ID of the survey the variable is from

expression
string
required

Expression that evaluates to a value that can be used for data analysis or routing logic

attention_required
object

Present when the AI flagged this variable as needing human review before export