API reference
Close runs
Each close of each month: its tasks, who signed each off, and the sequence it closed at.
- GET
/v1/close_runsList every close of every month - GET
/v1/close_runs/{run_id}Get a close run and its tasks - POST
/v1/periods/{key}/close_runStart a month's close run
Guides: Close the month
List every close of every month
GET/v1/close_runs
client.closeRuns.list()
Every close of every month, newest first: the run being worked, and the record of each close before it.
Parameters
| Name | Type | Description |
|---|---|---|
periodQuery | string or null | Only the runs of this month, like 2026-09. |
statusQuery | string or null | Only runs in this state. open, closed, reopened |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
200CloseRunPage
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/close_runs" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Get a close run and its tasks
GET/v1/close_runs/{run_id}
client.closeRuns.get()
One close of one month, with its tasks: who signed each off, when, and what they wrote beside it.
Parameters
| Name | Type | Description |
|---|---|---|
run_idPath · Required | string | An id that starts with |
Response
200CloseRunOut
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/close_runs/{run_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Start a month's close run
POST/v1/periods/{key}/close_run· Idempotent
client.closeRuns.start()
Start a month's close: a run asking for every task on the checklist. A
month whose close is already being worked returns that run. Signing off a
task or closing the month starts it too. Refused with period_closed in
a closed month.
Parameters
| Name | Type | Description |
|---|---|---|
keyPath · Required | string |
Response
201CloseRunOut
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X POST "https://api.ledgerit.ai/v1/periods/{key}/close_run" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"Objects
The objects these operations take and return.
CloseRunPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of CloseRunSummaryOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
CloseRunOut
A close run with its tasks.
| Name | Type | Description |
|---|---|---|
created_atRequired | string (date-time) | When the run started. |
forcedRequired | boolean | Closed with the explicit override, with blocking tasks still open. |
idRequired | string | The run's id. |
periodRequired | string | The month it closes, like 2026-09. |
reopened_atRequired | string (date-time) or null | When the month was reopened after it. |
signed_off_atRequired | string (date-time) or null | When it was closed. |
signed_off_byRequired | string or null | An id that starts with |
statusRequired | string |
open, closed, reopened |
tasksRequired | array of ChecklistItemOut | Its tasks, in the checklist's order. |
tasks_doneRequired | integer | How many of its tasks are signed off. |
tasks_totalRequired | integer | How many tasks it asks for. |
through_sequenceRequired | integer or null | Once closed, the posting sequence its figures reflect: every entry up to it is in the close. Null while open. |
versionRequired | integer | Which close of the month this is: 1 the first time, 2 after one reopening, and so on. |
CloseRunSummaryOut
One close of one month.
| Name | Type | Description |
|---|---|---|
created_atRequired | string (date-time) | When the run started. |
forcedRequired | boolean | Closed with the explicit override, with blocking tasks still open. |
idRequired | string | The run's id. |
periodRequired | string | The month it closes, like 2026-09. |
reopened_atRequired | string (date-time) or null | When the month was reopened after it. |
signed_off_atRequired | string (date-time) or null | When it was closed. |
signed_off_byRequired | string or null | An id that starts with |
statusRequired | string |
open, closed, reopened |
tasks_doneRequired | integer | How many of its tasks are signed off. |
tasks_totalRequired | integer | How many tasks it asks for. |
through_sequenceRequired | integer or null | Once closed, the posting sequence its figures reflect: every entry up to it is in the close. Null while open. |
versionRequired | integer | Which close of the month this is: 1 the first time, 2 after one reopening, and so on. |
ChecklistItemOut
One task as one month's close asks for it.
| Name | Type | Description |
|---|---|---|
assignee_emailRequired | string or null | The owner's address in these books, when there is an owner. |
assignee_idRequired | string or null | An id that starts with |
blockingRequired | boolean | Whether the month's close waits on it. |
close_task_idRequired | string or null | An id that starts with |
depends_on_idsRequired | array of string | The tasks it waits on, by |
detailsRequired | string or null | How to do it, when the task says. |
due_daysRequired | integer or null | The task's due day, in days after each month ends, or null. |
due_onRequired | string (date) or null | The day it falls due for this month, or null for no due day. |
is_overdueRequired | boolean | Not signed off, and its due day has passed. |
noteRequired | string or null | What the person who signed it off wrote beside it: the evidence. |
signed_offRequired | boolean | Whether it is signed off for this month. |
signed_off_atRequired | string (date-time) or null | When it was signed off. |
signed_off_byRequired | string or null | An id that starts with |
signed_off_by_emailRequired | string or null | The address of whoever signed it off, while they are a member of these books. |
task_idRequired | string or null | An id that starts with |
titleRequired | string | The task's title; on a closed month, as it stood when the month closed. |
waits_on_idsRequired | array of string | Of those, the ones not yet signed off this month: until they are, it cannot be. |