curl -X PUT https://api.getversive.com/api/v1/questions/q-456 \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "props": { "randomizeOrder": true } }'
curl -X PUT https://api.getversive.com/api/v1/questions/q-456 \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-F "[email protected]" \
-F "asset_layout=inline"
Questions
Update question
Update a single question
PUT
/
questions
/
{question_id}
curl -X PUT https://api.getversive.com/api/v1/questions/q-456 \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "props": { "randomizeOrder": true } }'
curl -X PUT https://api.getversive.com/api/v1/questions/q-456 \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-F "[email protected]" \
-F "asset_layout=inline"
Updates a question. Only the fields you send change, and
Property indices are zero-based. Invalid property names or indices return
props is merged with the existing props. Returns 204 No Content.
string
required
The question ID.
string
New question text.
{{Q:...}} references are validated (422 on invalid references).string
Private AI guidance.
integer
New position.
object
Settings to merge into the existing props. See Editing multiple-choice options for how exclusive options are kept in sync, and Checks against earlier answers for
number and allocation validation against an earlier answer.object[]
Replaces the media assets array. Keep each asset’s stable
url from List questions.
download_url and download_url_expires_at are read-only and are discarded if sent back.Adding an earlier answer
Mentions are stored directly incontent. Use {{Q:<question_id>}} for the complete earlier answer. For one response from a matrix, ranking, allocation, or card-sort question, first call List available references with before_question_id set to this question, then copy the returned property template verbatim.
For example, this inserts the rating for the first matrix item:
{
"content": "You rated speed {{Q:matrix-q-123.ratingForItem[0]}}. What influenced that rating?"
}
422.
Editing multiple-choice options
Multi-selectmultipleChoice questions can mark options such as “None of the above” as exclusive in props.exclusiveOptions. Entries are the option text and must exactly match an entry in props.options (case-sensitive), otherwise the request is rejected with 400.
You don’t need to resend exclusiveOptions when you edit options. If you omit it, or send it unchanged, the API keeps it in sync for you:
- Renaming one option keeps its exclusive marker (the marker follows the new text).
- Removing an option drops its marker.
- Setting
isMultiSelecttofalseclears all markers, since exclusivity only applies to multi-select.
exclusiveOptions list explicitly, matching the final options.
{
"props": {
"options": ["Red", "Blue", "None of the above"],
"exclusiveOptions": ["None of the above"]
}
}
Checks against earlier answers
number and allocation questions can carry checks of the answer against an earlier answer in props.earlierAnswerChecks. Each check has an operation (<, <=, ==, >=, or >) and a source: the earlier question’s questionId, plus option (the exact option text) when the earlier question is an allocation.
- A
numberquestion holds a list of checks. - An
allocationquestion holds either{"target": "total", "checks": [...]}— the total is compared, and the fixed limit (hasLimit) no longer applies — or{"target": "options", "checks": {"<option text>": [...]}}with one list per option of this question. Keys must exactly match entries inprops.options.
number or allocation question that comes before this one on every path a participant can take, and it must still have the option named; otherwise the request is rejected with 422 and an errors array. Renaming an option of the earlier question that a check names is rejected the same way — update the check first. When you edit this question’s own options, per-option checks follow a renamed option and are dropped for a removed one, like exclusiveOptions.
{
"props": {
"earlierAnswerChecks": {
"target": "total",
"checks": [{ "operation": "==", "source": { "questionId": "8d3b6a2f-1c4e-4f7a-b5d9-2e6c8a0f4b1d" } }]
}
}
}
Uploading an asset
Supported uploads are JPEG, PNG, GIF, WebP, and BMP images; MP4, WebM, and QuickTime videos; and PDFs, up to 50 MB per file. BMP uploads acceptimage/bmp and image/x-ms-bmp.
This endpoint also accepts multipart/form-data to attach a media file directly:
file— the media file.asset_layout—fullScreen(default) orinline.asset_sizing— optional sizing mode.asset_max_width_percent— optional, integer from 1 to 100 capping the width at that percent of the question column. Requiresasset_layout=inlineand an image or video. Omit or send100for full width.- Other fields (
content,propsas JSON strings, etc.) may be sent as form fields.
curl -X PUT https://api.getversive.com/api/v1/questions/q-456 \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "props": { "randomizeOrder": true } }'
curl -X PUT https://api.getversive.com/api/v1/questions/q-456 \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-F "[email protected]" \
-F "asset_layout=inline"