Assigning a task to a group using the JavaScript REST and SharePoint API

I unfortunately found myself in an unfortunate position, unable to use SharePoint Designer to create workflows. So I have to recreate an approval workflow in JavaScript. I'm using REST to insert a new task item, but I need to expand it to assign the task to all users in a group and have the first to approve or reject the task set the status of the task.

Should I just replace the userId in AssignedToId: userId with groupId? Or would I use the REST API to get a list of users (and their identifiers) from the group name with the help of url: _spPageContextInfo.webAbsoluteUrl + "/ _api / web / sitegroups / getbyname (& # 39;" + strSPGroupName + ") / users" then create an array of user identifiers to use in this:

data: JSON.stringify ({
__metadata: {"type": "SP.Data.TasksListItem"},
Title: "Sample Task",
AssignedToId: {& # 39; results & # 39 ;: [11,22] }
DueDate: due,
Status: "In progress"
})

I have the AssignedTo column in the task list set to Allow multiple selections: yes and Allow selection of: people and groups