# Save the preview response's mutations array to mutations.json first:
# { "mutations": [ ... ] }
curl -X POST https://api.getversive.com/api/v1/studies/9b2f7c1e-4a4b-4f6e-9a1d-1c2d3e4f5a6b/agent/apply \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d @mutations.json
Studies
Apply agent mutations
Persist mutations from a previewed agent edit
POST
/
studies
/
{study_id}
/
agent
/
apply
# Save the preview response's mutations array to mutations.json first:
# { "mutations": [ ... ] }
curl -X POST https://api.getversive.com/api/v1/studies/9b2f7c1e-4a4b-4f6e-9a1d-1c2d3e4f5a6b/agent/apply \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d @mutations.json
Applies a
mutations list previously returned by Edit study with AI agent with auto_save: false. All mutations are applied transactionally — if any fail, everything rolls back.
string
required
The study ID.
Mutation[]
required
The mutations array from the agent response, unchanged.
Response
Same shape as the agent edit response — the appliedmutations, resulting questions and logic, study_settings, and any broken_mentions.
# Save the preview response's mutations array to mutations.json first:
# { "mutations": [ ... ] }
curl -X POST https://api.getversive.com/api/v1/studies/9b2f7c1e-4a4b-4f6e-9a1d-1c2d3e4f5a6b/agent/apply \
-H "Authorization: Bearer $VERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d @mutations.json