Set page branch

Route respondents from one page to another when a condition is met.

PUT https://cotlet.dev/api/v1/fillout/forms/{form_id}/page-branch

write

Adds a branch from one form page to another, with a condition on an earlier answer, the same as dragging a connector in the Logic view. Leave condition empty to set the default path. Page names come from get_form_logic. The change reaches respondents only after publish_form, and it is undone by the editor's edit history, so it runs without asking first.

Parameters

Parameters: set_page_branch
NameTypeDescription
form_id string required string Form ID from list_forms.
from_page string required string Name of the page respondents leave.
to_page string required string Name of the page, or ending page, they go to.
condition object object Branch condition: question_id, operator (as the condition editor offers it for that field), value. Empty means the default path.

Request

cURL
curl -X PUT https://cotlet.dev/api/v1/fillout/forms/form_8c41d2/page-branch \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from_page":"from page","to_page":"to page"}'
Python
result = client.call("fillout", "set_page_branch", {"form_id":"form_8c41d2","from_page":"from page","to_page":"to page"})
Node.js
const result = await cotlet.call('fillout', 'set_page_branch', {"form_id":"form_8c41d2","from_page":"from page","to_page":"to page"});
CLI
cotlet call fillout set_page_branch --data '{"form_id":"form_8c41d2","from_page":"from page","to_page":"to page"}'

Example response

JSON

{
  "form_id": "rK8mTn4vYb1C",
  "branch": {
    "from_page": "Info",
    "to_page": "Accepted",
    "condition": {
      "question_id": "q_company_type",
      "operator": "is",
      "value": "Student"
    }
  }
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.