Create Survey Option
Creates a new option for the specified survey question.
Endpoint
PUT
v5/survey/{survey_id}/surveypage/{page_id}/surveyquestion/{question_id}/surveyoption
Requires authentication
Path Parameters
Identifies the survey, page, and question to add the option to.
survey_id
string
required
The ID of the survey containing the question.
page_id
string
required
The ID of the page the question belongs to.
question_id
string
required
The ID of the question to add the option to.
Query Parameters
title
string
required
The display text of the option.
value
string
required
The reporting value of the option.
after
string
The ID of the option this new option should follow. Use to control insertion order.
properties
object
Additional configuration properties for the option.
child attributes
disabled
boolean
Set to
true to disable this option and hide it from respondents.dependent
string
Comma-separated question IDs for trigger questions this option depends on.
other
boolean
Set to
true to add an open-text “Other” field to this option.requireother
boolean
Set to
true to require a response in the “Other” text field when this option is selected.na
boolean
Set to
true to designate this option as a “Not Applicable” choice.none
boolean
Set to
true to designate this option as a “None” choice.all
boolean
Set to
true to designate this option as a “Select All” choice.fixed
boolean
Set to
true to pin this option to a fixed position when randomization is enabled.heatmap-color
string
Hex color code (without
#) used to represent this option in heatmap reports. Example: ff0000.Response
Returns the result of the creation request and the newly created option object.
result_ok
boolean
Whether the request succeeded.
data
object
The newly created survey option object.
child attributes
id
string
The unique ID (SKU) assigned to the newly created option.
title
string
The display text of the option.
value
string
The reporting value of the option.
properties
object
Configuration properties set on the option.
child attributes
dependent
string
Trigger question IDs, if set.
other
boolean
Whether an open-text “Other” field is attached.
requireother
boolean
Whether the “Other” field is required.
na
boolean
Whether the option is a “Not Applicable” choice.
none
boolean
Whether the option is a “None” choice.
all
boolean
Whether the option is a “Select All” choice.
fixed
boolean
Whether the option is pinned to a fixed position.
heatmap-color
string
Hex color code for heatmap reports, if set.
Examples
Request (cURL)
curl -X PUT "https://api.alchemer.com/v5/survey/YOUR_SURVEY_ID/surveypage/YOUR_PAGE_ID/surveyquestion/YOUR_QUESTION_ID/surveyoption?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET&title=Maybe&value=Maybe"
Response
{
"result_ok": true,
"data": {
"id": 10016,
"title": {
"English": "Maybe"
},
"value": "Maybe",
"properties": {
"disabled": false,
"other": false
}
}
}