Skip to main content
POST
/
api
/
v1
/
question-logic
Create Question Logic
curl --request POST \
  --url https://api.getversive.com/api/v1/question-logic \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "study_id": "study_123",
  "question_id": "q_123",
  "operation": "equals",
  "comparison_value": "yes",
  "comparison_value_type": "text",
  "next_question_id": "q_124",
  "action_type": "skip_to"
}
'
{
  "id": "logic_123",
  "study_id": "study_123",
  "question_id": "q_123",
  "operation": "equals",
  "comparison_value": "yes",
  "comparison_value_type": "text",
  "next_question_id": "q_124",
  "redirect_url": null,
  "end_interview": false,
  "action_type": "skip_to",
  "language": "English"
}
Add a logic rule to a question to control the flow of the interview (e.g., skip logic).

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
study_id
string
required
question_id
string
required
operation
string
required
comparison_value_type
string
required
action_type
string
required
comparison_value
string | null
next_question_id
string | null
redirect_url
string | null
end_interview
boolean
default:false
language
string
default:English

Response

Successful Response