put https://api.voicecreator.ai/api/v1/voice-assistants/
Update an existing voice assistant.
This endpoint will:
- Update the assistant in VC if json_data is provided
- Update our database record with the changes
Parameters:
assistant_id (int): The ID of the voice assistant to update.
assistant (VoiceAssistantUpdate): The updated voice assistant data.
request (Request): The FastAPI request object.
db (AsyncSession): The database session (injected).
organization_id (Optional[int]): The organization ID from the API key or request.
Returns:
VoiceAssistant: The updated voice assistant.
Raises:
HTTPException:
- 400: If organization ID is missing
- 404: If assistant not found or not accessible
- 422: If there's a validation error in the request body
- 500: If VC update fails or other unexpected errors occur