---
title: "Edit fields of an own draft; a released entry refuses every field"
method: PATCH
path: "/v1/entries/{id}"
tags: ["entries"]
---

# Edit fields of an own draft; a released entry refuses every field

`PATCH /v1/entries/{id}`

## Request

- Base URL: `https://api.sixminute.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sixminute.ai/v1/entries/{id}`
- Auth: HTTP bearer

The first change by a person sets `edited_at`, and from that moment the engine may not replace the row. Every refusal carries a `code` and, per field, its `rule` and `params` (`entry.*`, `duration.*`, `narrative.*`, `matter.*`). **Nothing is edited after release** (D-164): every field a patch would move on a released entry is a 409 `entry.released`, each on its own path; a draft being released, or one the practice system may hold a line for, is a 409 `entry.releasing`; a deleted draft a 409 `entry.deleted`; an entry that is not the caller's a 404 `entry.not_found`. A local-only field is a 422 (D-85). A `narrative` over the limit (the firm's length, else 240, never above the practice system's ceiling or 1,023, measured trimmed) is a 422 `narrative.too_long` at `narrative`. `matter_id` may be null; a matter the caller may not name is a 422 `matter.missing`. `reason` is accepted and not stored. **The time** is `parts`, the whole new set of spans, or `t_start` and `t_end`, the one-span case, which on a draft of two spans or more is a 409 `entry.changed` on `t_start`. On a draft each span is a 422 `urn:six-minute:problem:block` whose `detail` is one sentence, on `parts.N.t_start` or `parts.N.t_end` (`t_start` or `t_end` for the one-span case): "An entry starts and ends on the day's interval lines." (`entry.off_grid`: each edge the patch moves is a stored cell's edge or a line of the day's unit, never inside a stored cell; D-219; the stored intervals are those of the device the entry was generated on (its `device_id`), or, for a hand-made entry and one generated on the asking device, those of the device X-Six-Minute-Device names and the earlier ids X-Six-Minute-Device-Known names; with no device of the caller's named, every device's for a hand-made entry), "An entry ends after it starts." (`entry.empty`) or "An entry stays inside its day." (`entry.crosses_day`). A span over another live entry of the person is a 409 with the same urn and "This time overlaps another entry." (`entry.overlap`). A time edit writes the row only (D-216). **A change to the spans clears `override_seconds`**; `override_seconds` alone sets the hours a person typed (whole units of the day's unit, at most a day, else a 422 `duration.*`) or clears them.

## Path parameters

- `id` string, required

## Request body

- object
  - `narrative` string
  - `internal_note` string, nullable
  - `attributes` object
  - `matter_id` string, nullable
  - `t_start` string, date-time
  - `t_end` string, date-time
  - `parts` object[]
    - `t_start` string, date-time, required
    - `t_end` string, date-time, required
  - `override_seconds` integer, nullable
  - `reason` string, nullable

## Response `200`

The entry after the patch.

- object
  - `id` string, required
  - `day` string, required
  - `time_zone` string, required
  - `timekeeper_id` string, required
  - `t_start` string, date-time, required
  - `t_end` string, date-time, required
  - `parts` object[]
    - `t_start` string, date-time, required
    - `t_end` string, date-time, required
  - `narrative` string, required
  - `matter_id` string, nullable
  - `attributes` object
  - `internal_note` string, nullable
  - `status` 'draft' | 'released'
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `released_at` string, date-time, nullable
  - `edited_at` string, date-time, nullable
  - `override_seconds` integer, nullable
  - `device_id` string, nullable

## Other responses

- `400`: The body, query or path did not validate; `errors` lists the fields.
- `401`: No bearer token, or one that does not verify or has expired.
- `403`: The token verified but may not do this: no organisation, not provisioned, wrong role, or a device problem.
- `404`: No such row for this tenant.
- `409`: The id or the email already belongs to something else.
- `422`: The request is well-formed but cannot be carried out as it stands.

---

[API](https://skmtc.dev/sixminute/apis/sixminute-api.md) - [All operations](https://skmtc.dev/sixminute/apis/sixminute-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sixminute/apis/sixminute-api/revisions/605577eadc10?raw)
