Skip to main content
POST
/
pages
/
{source_page_id}
/
navigation-rules
Create a navigation rule for a page
curl --request POST \
  --url https://api.questra.ai/pages/{source_page_id}/navigation-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Id: <x-org-id>' \
  --data '
{
  "target_page_id": "<string>",
  "condition": "<string>",
  "order": 1
}
'
{
  "id": "<string>",
  "source_page_id": "<string>",
  "target_page_id": "<string>",
  "order": 1,
  "sourcePage": {
    "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,
    "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
    }
  },
  "targetPage": {
    "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,
    "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
    }
  },
  "condition": "<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

source_page_id
string
required

The source page of the rules to list

Body

application/json
target_page_id
string
required

Unique ID of the page to route to

condition
string

Condition under which this rule will be followed

order
integer

The order in which this rule should be followed compared to the others from the source page

Required range: x >= 0

Response

Expanded source and target page information

id
string
required

Unique ID of the navigation rule

source_page_id
string
required

Unique ID of the page this rule routes traffic from

target_page_id
string
required

Unique ID of the page this rule routes traffic to

order
integer
required

Order in which this rule should be evaluated to determine which one should be followed (0 is first, 1 is second, etc.)

Required range: x >= 0
sourcePage
object
required

Details of the source page for the rule

targetPage
object
required

Details of the target page for the rule

condition
string

If the condition evaluates to true, this condition should be used and the user should be sent to the target page

attention_required
object

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