Get simply message in main template item create variants time

Hello, I want to simply msg with variants item_name after main template item from create single and multiple variants time using client script with api call not using server script because server script after insert it is possible but i want to perform using client script with api so how it is possible?