Skip to main content
PATCH
/
surveys
/
{id}
Update survey
curl --request PATCH \
  --url https://api.questra.ai/surveys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Id: <x-org-id>' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "order": 1
}
'
{
  "id": "<string>",
  "slug": "<string>",
  "name": "<string>",
  "user_id": "<string>",
  "org_id": "<string>",
  "first_page_id": "<string>",
  "locked": false,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "programmed_from_file_id": "<string>",
  "programming_started_at": "2023-11-07T05:31:56Z",
  "programming_completed_at": "2023-11-07T05:31:56Z",
  "status_changeset": {
    "id": "<string>",
    "survey_id": "<string>",
    "idempotency_key": "<string>",
    "user_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "user_name": "<string>",
    "file_id": "<string>",
    "title": "<string>",
    "metadata": {},
    "change_count": 123,
    "last_change_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.questra.ai/llms.txt

Use this file to discover all available pages before exploring further.

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

id
string
required

Unique ID or slug of the survey

Body

application/json
name
string

A new, human-readable name for the survey

slug
string

A new, unique slug for the survey

Pattern: ^[a-zA-Z][a-zA-Z0-9_-]*[a-zA-Z]$
order
integer
Required range: x >= 0

Response

id
string
required

Unique ID for the survey

slug
string
required

Unique slug used for survey URLs

name
string
required

Human-readable name for the survey

user_id
string
required

Unique ID of the user who owns the survey

org_id
string
required

Unique ID of the organization who owns the survey

first_page_id
string
required

Unique ID of the first page of the survey

locked
boolean
default:false
required

Whether or not the survey is locked by an AI agent for updates

created_at
string<date-time>
required

Date and time the survey was created

updated_at
string<date-time>
required

Date and time the survey was updated

programmed_from_file_id
string

Unique ID of the file the survey was programmed from

programming_started_at
string<date-time>

Date and time the survey began programming

programming_completed_at
string<date-time>

Date and time the survey finished programming

status_changeset
object

The changeset that determines the survey's displayed status. Selected by priority: any in_progress changeset wins outright; otherwise the changeset with the highest type priority (sync > initial_programming > ai_prompt > manual/revert) is chosen.