Skip to main content
POST
/
api
/
v1
/
studies
/
{study_id}
/
agent
Agent Edit Study
curl --request POST \
  --url https://api.getversive.com/api/v1/studies/{study_id}/agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "Change the theme to dark mode and add a question about hobbies."
}
'
{
  "message": "I have updated the study as requested.",
  "questions": [
    {
      "id": "q_123",
      "content": "Updated content?",
      "type": "text"
    }
  ],
  "logic": [],
  "study_settings": {
    "primaryColor": "#000000"
  },
  "changes": [
    {
      "question_id": "q_123",
      "change_type": "edited",
      "description": "Changed question text."
    }
  ],
  "deleted_question_ids": []
}
Use an AI agent to perform complex edits on a study, including modifying logic and settings. The agent will execute changes and return a summary.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

study_id
string
required

Body

application/json

Request for public v1 agent endpoint.

message
string
required

Response

Successful Response

Response from public v1 agent endpoint.

message
string
required
questions
Questions · object[]
required
logic
Logic · object[]
required
changes
QuestionChange · object[]
required
deleted_question_ids
string[]
required
study_settings
Study Settings · object