Studies
Edit study with AI agent
Edit a study with natural-language instructions
POST
Sends a natural-language instruction to Versive’s study-editing agent. The agent can add, edit, delete, and reorder questions, change logic rules, and update study settings and messages. By default changes are saved immediately (with automatic rollback if anything fails); set
auto_save: false to preview the mutations and apply them separately.
string
required
The study ID.
string
required
The editing instruction, e.g. “Add an NPS question after the intro and screen out anyone who scores under 3 on Q2.”
boolean
default:"true"
Persist changes before returning. Set
false to preview.string
default:"smart"
smart (higher quality) or fast (lower latency).string
Language context for the edit.
Response
string | null
The agent’s natural-language summary of what it did.
Mutation[]
The structured change list. Each mutation has
id, entity_type (question | logic_rule | study_settings | study_messages), operation (create | update | delete | reorder), entity_id, before, after, and timestamp.object[]
The study’s questions after the edit, each including a resolved
mentions array.object[]
The study’s logic rules after the edit.
object | null
Updated study settings, when changed.
object[]
Any
{{Q:...}} references broken by the edit: question_id, placeholder, error, newly_broken.