This depends on the current state of the invoice and the edits you're looking to make.
Posted invoices cannot be changed. They are considered completed financial transactions and only new transactions can be added to the customer's balance moving forward.
Pending draft and Projected invoices can be changed by modifying the subscription that will generate them. The pending state is waiting on user input around a draft purchase or subscription, so changes to that purchase or subscription will change the pending invoice.
Ready draft invoices can be modified either through the Admin UI or through the API. The ready state indicates that the invoice is in the final stages before you can post it. Changes to a subscription or purchase do not modify a ready invoice. Charge information such as quantity, unit price, discounts, PO number, proration, service dates, and labels can be modified while in this state.