curl --request POST \
--url https://api.questra.ai/surveys/{survey_id_or_slug}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Org-Id: <x-org-id>' \
--data '
{
"survey": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"user_id": "<string>",
"org_id": "<string>",
"first_page_id": "<string>",
"locked": false,
"paid_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pages": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"survey_id": "<string>",
"name": "<string>",
"locked": false,
"order": 1,
"blocks": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"page_id": "<string>",
"order": 1,
"config": {
"content": "<string>",
"type": "<string>",
"showIf": "<string>",
"attentionRequired": {
"reason": "<string>",
"dismissed": false
},
"content_type": "markdown"
}
}
],
"navigation_rules": [
{
"id": "<string>",
"source_page_id": "<string>",
"target_page_id": "<string>",
"order": 1,
"condition": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"assign_response_status": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"variables": [
{
"id": "<string>",
"name": "<string>",
"survey_id": "<string>",
"expression": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"programmed_from_file_id": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"programmed_from_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>",
"ai_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>"
}
}
}
}
'{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"user_id": "<string>",
"org_id": "<string>",
"first_page_id": "<string>",
"locked": false,
"paid_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pages": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"survey_id": "<string>",
"name": "<string>",
"locked": false,
"order": 1,
"blocks": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"page_id": "<string>",
"order": 1,
"config": {
"content": "<string>",
"type": "<string>",
"showIf": "<string>",
"attentionRequired": {
"reason": "<string>",
"dismissed": false
},
"content_type": "markdown"
}
}
],
"navigation_rules": [
{
"id": "<string>",
"source_page_id": "<string>",
"target_page_id": "<string>",
"order": 1,
"condition": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"assign_response_status": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"variables": [
{
"id": "<string>",
"name": "<string>",
"survey_id": "<string>",
"expression": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"programmed_from_file_id": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"programmed_from_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>",
"ai_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>"
}
}
}Replaces the contents of a survey by importing a full survey object. All pages, blocks, variables, and navigation rules are replaced with the imported data.
curl --request POST \
--url https://api.questra.ai/surveys/{survey_id_or_slug}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Org-Id: <x-org-id>' \
--data '
{
"survey": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"user_id": "<string>",
"org_id": "<string>",
"first_page_id": "<string>",
"locked": false,
"paid_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pages": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"survey_id": "<string>",
"name": "<string>",
"locked": false,
"order": 1,
"blocks": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"page_id": "<string>",
"order": 1,
"config": {
"content": "<string>",
"type": "<string>",
"showIf": "<string>",
"attentionRequired": {
"reason": "<string>",
"dismissed": false
},
"content_type": "markdown"
}
}
],
"navigation_rules": [
{
"id": "<string>",
"source_page_id": "<string>",
"target_page_id": "<string>",
"order": 1,
"condition": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"assign_response_status": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"variables": [
{
"id": "<string>",
"name": "<string>",
"survey_id": "<string>",
"expression": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"programmed_from_file_id": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"programmed_from_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>",
"ai_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>"
}
}
}
}
'{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"user_id": "<string>",
"org_id": "<string>",
"first_page_id": "<string>",
"locked": false,
"paid_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pages": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"survey_id": "<string>",
"name": "<string>",
"locked": false,
"order": 1,
"blocks": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"page_id": "<string>",
"order": 1,
"config": {
"content": "<string>",
"type": "<string>",
"showIf": "<string>",
"attentionRequired": {
"reason": "<string>",
"dismissed": false
},
"content_type": "markdown"
}
}
],
"navigation_rules": [
{
"id": "<string>",
"source_page_id": "<string>",
"target_page_id": "<string>",
"order": 1,
"condition": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"assign_response_status": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"variables": [
{
"id": "<string>",
"name": "<string>",
"survey_id": "<string>",
"expression": "<string>",
"attention_required": {
"reason": "<string>",
"dismissed": false
}
}
],
"programmed_from_file_id": "<string>",
"programming_started_at": "2023-11-07T05:31:56Z",
"programming_completed_at": "2023-11-07T05:31:56Z",
"programmed_from_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>",
"ai_file": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"mime_type": "<string>",
"org_id": "<string>",
"survey_id": "<string>",
"ai_file_id": "<string>"
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The survey ID or slug
The full survey object to import
Show child attributes
Survey imported
All properties from the survey object
Unique ID for the survey
Unique slug used for survey URLs
Human-readable name for the survey
Unique ID of the user who owns the survey
Unique ID of the organization who owns the survey
Unique ID of the first page of the survey
Whether or not the survey is locked by an AI agent for updates
Date and time the survey was paid for. Surveys that haven't been paid for cannot be exported.
Date and time the survey was created
Date and time the survey was updated
All pages found in the survey
Show child attributes
All variables found in the survey
Show child attributes
Unique ID of the file the survey was programmed from
Date and time the survey began programming
Date and time the survey finished programming
File the survey was programmed from (if applicable)
Show child attributes