---
title: "Join an own draft with other own drafts of its day, into this one"
method: POST
path: "/v1/entries/{id}/merge"
tags: ["entries"]
---

# Join an own draft with other own drafts of its day, into this one

`POST /v1/entries/{id}/merge`

## 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}/merge`
- Auth: HTTP bearer

The inverse of the split. The other rows are named in exactly one of two fields: `with` is one row, and `with_all` is one or more rows, as many as the day holds (D-282 without its fifty-row cap). Both fields, neither, or an id twice in `with_all` is a 400, and this row's own id among them is a 422. Every row is the caller's own draft on this row's day, cut in its time zone, else a 422 (`day`); they need not touch and their order is not a rule. The joined row's `parts` are the union of the rows' parts, parts that touch joined, and its `t_start` and `t_end` their first start and last end: the time between two rows stays in no entry. Their matters are not a rule, and any drafts of one day merge (D-214), whatever grid each was cut on (D-219). The joined row starts on the first row's matter, a matter or none; an optional matter_id moves it, and null moves it to no matter, as a PATCH does. A `billable` in the body is dropped by the parse. A released row is a 409 and a row the caller cannot see is a 404. THIS ROW KEEPS ITS ID; its recorded time is the sum of its parts, and no `override_seconds` survives the merge. `narrative` and `attributes` are the words the person confirmed on the review before this call, and the attributes replace the map rather than merging into it; a narrative longer than the firm's length (`narrative.max_chars`, else 240) is a 422 at `narrative` (D-230). The merge writes the rows only: the intervals of every row stay where they are and the joined parts cover them (D-216). The other rows are DELETED in the same transaction, and the survivor is stamped `edited_at`, so the engine never replaces it again. A row whose release is with the practice system, or for which the practice system holds or may hold a line from a release that did not finish, is not merged: 409 (the latter on `connector.pending`). One row that may not be merged refuses the whole merge, and nothing is written. An error about a row that follows is on the path of the field that named it, `with` or `with_all`.

## Path parameters

- `id` string, required

## Request body

- object
  - `matter_id` string, nullable
  - `with` string
  - `with_all` string[]
  - `narrative` string, required
  - `attributes` object, required

## Response `200`

The joined row, which is this row.

- 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)
