# hours.create

Log time: a date (not in the future, and not in a pay period that was already paid), minutes and a description, as a draft to submit with your timesheet. A day can't add up to more than 24 hours. The same work on the same day twice is refused unless confirmDuplicate is true.

`POST /api/v1/contractor/hours.create`

Permissions: `contractor:read`, `contractor:write` · Roles: contractor · Idempotency key required

MCP tool: `contractor_hours_create`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `date` | string (date) | Yes | A date, as YYYY-MM-DD. |
| `minutes` | integer | Yes | 1 to 1440. |
| `description` | string | Yes | A short description. 1–2000 characters. |
| `confirmDuplicate` | 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–150 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/contractor/hours.create \
  -H "Authorization: Bearer $OATMILK_OAUTH_TOKEN" \
  -H "X-Accounting-Organization: $OATMILK_ORGANIZATION_ID" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "date": "2026-09-01",
  "minutes": 90,
  "description": "Synthetic example from the docs"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/contractor/hours.create
