CREATE

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.

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.

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
    }
  }
}