# invoices.schedules.update

Update a recurring invoice's name, template, cadence, next date, end, review lead days, or auto-send setting with its expectedRevision. Already prepared invoices are not changed.

`POST /api/v1/accounting/invoices.schedules.update`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required · Send `expectedRevision`

MCP tool: `accounting_invoices_schedules_update`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | string (ID) | Yes | The record's ID. |
| `expectedRevision` | integer | Yes | The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again. at most 9007199254740991; greater than 0. |
| `name` | string |  | A display name. 1–200 characters. |
| `template` | object |  | No other fields. |
| `template.title` | string |  | A short title. at most 200 characters. |
| `template.currency` | string |  | Three-letter currency code, such as CAD or USD. |
| `template.lines` | array of objects | Yes | 1–100 items. |
| `template.lines[].id` | string |  | The record's ID. at most 64 characters. |
| `template.lines[].description` | string | Yes | A short description. 1–500 characters. |
| `template.lines[].quantity` | string |  |  |
| `template.lines[].unitAmountMinor` | string |  | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. Whole number written as a string, may be negative. |
| `template.lines[].isHeader` | boolean |  |  |
| `template.lines[].taxCode` | enum |  | One of: `standard`, `exempt`, `zero_rated`. |
| `template.notes` | string |  | Notes kept with the record. at most 4000 characters. |
| `template.memo` | string |  | at most 4000 characters. |
| `template.paymentMethodIds` | array of strings (ID) |  | A list of record IDs. at most 10 items. |
| `template.taxTreatment` | enum or null |  | One of: `auto`, `hst`, `gst`, `gst_qst`, `zero_rated`, `exempt`, `none`, `custom`. |
| `template.taxRateCode` | enum or string or null |  |  |
| `template.terms` | object |  | No other fields. |
| `template.terms.code` | enum | Yes | One of: `due_on_receipt`, `net_7`, `net_15`, `net_30`, `net_45`, `net_60`, `custom`, `split_50_50`, `monthly`. |
| `template.terms.days` | integer or null |  |  |
| `template.payUrl` | string (uri) or null |  |  |
| `template.projectId` | string (ID) or null |  |  |
| `cadence` | object |  | No other fields. |
| `cadence.unit` | enum | Yes | One of: `week`, `month`, `year`. |
| `cadence.interval` | integer |  | 1 to 24. Default `1`. |
| `cadence.dayOfMonth` | integer or null |  |  |
| `nextRunDate` | string |  |  |
| `endDate` | string or null |  |  |
| `occurrencesRemaining` | integer or null |  |  |
| `reviewLeadDays` | integer |  | 0 to 60. |
| `autoSendAfterApproval` | boolean |  |  |
| `idempotencyKey` | string | Yes | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/invoices.schedules.update \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "expectedRevision": 3
}'
```

Reference page: https://app.getoatmilk.com/docs/api/invoices.schedules.update
