Manage survey questions. Add, update, reorder, and delete questions from your surveys.
Note: Changing questions on a live survey needs an explicit acknowledgement. Everyone who answers after the change is answering a different questionnaire from the people who already have, and the results will not distinguish them. Pause the survey first, or send acknowledgeConsequence: true (on DELETE, ?acknowledgeConsequence=true) to change it while it is collecting.
/surveys/:id/questionsRetrieve all questions for a survey, ordered by position.
curl -X GET "https://surventrics.ai/api/v1/surveys/SURVEY_ID/questions" \
-H "Authorization: Bearer YOUR_API_KEY"{
"data": [
{
"id": "q_550e8400-e29b-41d4-a716-446655440000",
"type": "single_choice",
"title": "How satisfied are you with our service?",
"description": "Please select the option that best describes your experience",
"required": true,
"position": 0,
"config": {
"options": [
{ "id": "opt_1", "label": "Very Satisfied" },
{ "id": "opt_2", "label": "Satisfied" },
{ "id": "opt_3", "label": "Neutral" },
{ "id": "opt_4", "label": "Dissatisfied" },
{ "id": "opt_5", "label": "Very Dissatisfied" }
],
"randomize": false,
"allowOther": false
}
},
{
"id": "q_550e8400-e29b-41d4-a716-446655440001",
"type": "nps",
"title": "How likely are you to recommend us?",
"description": null,
"required": true,
"position": 1,
"config": {
"lowLabel": "Not at all likely",
"highLabel": "Extremely likely"
}
}
]
}questions:read/surveys/:id/questionsAdd a new question to a survey. The question will be added at the end unless a position is specified.
| Name | Type | Description |
|---|---|---|
type | string | Question type (required) |
title | string | Question text (required, max 500 chars) |
description | string | Help text (max 2000 chars) |
required | boolean | Whether answer is required (default: true) |
config | object | Type-specific configuration |
position | integer | Question order (0-indexed) |
Surventrics supports 38 question types. Common types include:
single_choicemultiple_choicedropdownlikertnpsstarsslidermatrix_singlerankingshort_textlong_textdatecurl -X POST "https://surventrics.ai/api/v1/surveys/SURVEY_ID/questions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "single_choice",
"title": "How did you hear about us?",
"required": true,
"config": {
"options": [
{ "id": "opt_1", "label": "Search Engine" },
{ "id": "opt_2", "label": "Social Media" },
{ "id": "opt_3", "label": "Friend/Colleague" },
{ "id": "opt_4", "label": "Advertisement" }
],
"allowOther": true
}
}'curl -X POST "https://surventrics.ai/api/v1/surveys/SURVEY_ID/questions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "nps",
"title": "How likely are you to recommend our product to a friend?",
"required": true,
"config": {
"lowLabel": "Not at all likely",
"highLabel": "Extremely likely"
}
}'curl -X POST "https://surventrics.ai/api/v1/surveys/SURVEY_ID/questions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "matrix_single",
"title": "Rate the following aspects of our service:",
"required": true,
"config": {
"rows": [
{ "id": "r1", "label": "Response Time" },
{ "id": "r2", "label": "Staff Friendliness" },
{ "id": "r3", "label": "Problem Resolution" }
],
"columns": [
{ "id": "c1", "label": "Poor" },
{ "id": "c2", "label": "Fair" },
{ "id": "c3", "label": "Good" },
{ "id": "c4", "label": "Excellent" }
]
}
}'questions:write/surveys/:id/questions/:questionIdRetrieve a single question by ID.
questions:read/surveys/:id/questions/:questionIdUpdate an existing question. All fields are optional - only include fields you want to change.
curl -X PUT "https://surventrics.ai/api/v1/surveys/SURVEY_ID/questions/QUESTION_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated question text",
"position": 0
}'questions:write/surveys/:id/questions/:questionIdRemove a question from the survey. Returns 204 No Content on success.
curl -X DELETE "https://surventrics.ai/api/v1/surveys/SURVEY_ID/questions/QUESTION_ID" \
-H "Authorization: Bearer YOUR_API_KEY"questions:write