Creates an Invoice Schedule
Required permission: Recurring Invoices - New
Accepts every settable field on a schedule, so a schedule can be fully configured in one call. Add its line items afterwards with POST /schedules/{id}/line_items, or seed them from an existing invoice by passing invoice_id.
id, account_id, created_at, updated_at and last_run are read-only. So are subscription_status and recurring_type_id, which are maintained for you: the first is recomputed from the linked contract and the unpaid invoice count on every run, and the second is what selects the billing engine for the whole schedule.
Every id in the request is checked against your account before anything is written, so a rejected request changes nothing. Errors come back as {"error": ["Location can't be found", ...]} with status 422.
Request body
Response
Fully configured in a single call