# contractorOps.terms.hours.update

Apply the exact focused hour-limit preview with its basisTermsId, expectedBasisRevision, basisDate, effectiveFrom, reason and hours patch. Preserve rate, pay schedule, dates, clauses and original documents. Explicit mode record_existing records terms already agreed elsewhere; use it only when the person confirms the agreement already permits them. send_amendment sends a separate amendment and keeps existing limits until all required signers sign. A new weekly cap never implies a daily allocation or two-week pooling. Stale previews and waiting or later updates are refused. Returns saved version and actual current terms.

`POST /api/v1/accounting/contractorOps.terms.hours.update`

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

MCP tool: `accounting_contractor_ops_terms_hours_update`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `contractorId` | string (ID) | Yes | The ID of a contractor, from contractors.list. |
| `hours` | object | Yes | No other fields. |
| `hours.dailyMaxMinutes` | integer or null |  |  |
| `hours.weeklyMaxMinutes` | integer or null |  |  |
| `hours.monthlyMaxMinutes` | integer or null |  |  |
| `hours.totalMaxMinutes` | integer or null |  |  |
| `hours.enforcement` | enum |  | One of: `block`, `flag`. |
| `effectiveFrom` | string (date) | Yes |  |
| `mode` | enum | Yes | One of: `record_existing`, `send_amendment`. |
| `basisTermsId` | string (ID) | Yes | The ID of the related record. |
| `expectedBasisRevision` | integer | Yes | The related record's current revision, from the last time you read it. at most 9007199254740991; greater than 0. |
| `basisDate` | string (date) | Yes | A date, as YYYY-MM-DD. |
| `reason` | string | Yes | A short note saying why, kept in the record's history. 10–1000 characters. |
| `companySigner` | object |  | No other fields. |
| `companySigner.userId` | string | Yes | The ID of a person in your company. 1–200 characters. |
| `companySigner.name` | string | Yes | A display name. 1–200 characters. |
| `companySigner.email` | string (email) | Yes | An email address. at most 320 characters. |
| `companySigner.title` | string or null |  | A short title. |
| `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/contractorOps.terms.hours.update \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "contractorId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "hours": {
    "dailyMaxMinutes": 90
  },
  "effectiveFrom": "2026-09-01",
  "mode": "record_existing",
  "basisTermsId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "expectedBasisRevision": 3,
  "basisDate": "2026-09-01",
  "reason": "Synthetic example from the docs"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/contractorOps.terms.hours.update
