Yes, most hotel booking APIs let you book several rooms in one go, although how far that stretches depends on the supplier you are using.
When you search, you normally tell the API how many rooms you need and who is staying in each one, so the rates that come back are already priced for the whole party. You then confirm all of those rooms together and receive a single booking reference. That keeps life simpler for you, because there is one record to look at, one set of cancellation terms to read, and one voucher to pass on to your customer.
There are limits worth knowing about. Suppliers usually cap how many rooms you can put into one booking, and once a party gets large the property often prefers to treat it as a proper group contract, which is arranged directly with them rather than through an online rate. Room types can differ too, so if part of your group wants twin rooms and the rest want doubles, some suppliers accept that in a single booking while others make you split it. Cancelling is the other thing to watch, because with certain suppliers the booking has to be cancelled as a whole, which is awkward when only one guest drops out.
Before you promise anything to a group, make a test booking with the number and mix of rooms you expect to sell, and check whether that supplier lets you cancel or amend one room on its own.