Execute AI-powered study editing with auto-save.
This endpoint:
Error handling: Full transaction rollback if any mutation fails.
Args: study_id: Study ID to edit request: Agent edit request with message, language, and optional documents supabase: Supabase service account client (injected) organization_id: Organization ID from API key (injected)
Returns: AgentEditResponseV1 with updated questions, logic, settings, and change log
Raises: HTTPException: 404 if study not found, 403 if forbidden, 500 if error
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request for public v1 agent endpoint.