# End Close - Documentation - [Introduction](https://endclose.com/docs/index.md): Learn everything you need to know to get started with End Close - [Concepts](https://endclose.com/docs/concepts.md): Learn about the core resources in End Close - [Authentication](https://endclose.com/docs/authentication.md) - [Exceptions review](https://endclose.com/docs/exceptions-review.md): Write a note and a suggested action for each overdue line your own matching engine leaves open - [List records](https://endclose.com/docs/api-reference/list-records.md): Returns a paginated list of records, newest first. At least one of `data_stream_key`, `reconciliation_match_id`, `reconciliation_id`, `external_id`, `import_batch_id`, or `bulk_request_id` is required. - [Retrieve a record](https://endclose.com/docs/api-reference/retrieve-a-record.md): Retrieve a single record by its unique ID. - [Create a record](https://endclose.com/docs/api-reference/create-a-record.md) - [Bulk create records](https://endclose.com/docs/api-reference/bulk-create-records.md): Submit up to 1,000 records for asynchronous processing. Returns immediately with a bulk request ID. Each record is validated and inserted independently, so some records can succeed while others fail. Use the `GET /bulk_requests/{id}` endpoint to poll for results. - [Update a record](https://endclose.com/docs/api-reference/update-a-record.md): Update a record's fields. The record **must have a status of `unreconciled`**. Records that are partially or fully reconciled cannot be modified. - [Delete a record](https://endclose.com/docs/api-reference/delete-a-record.md): Deletes a single record by its ID. The record **must have a status of `unreconciled`**. Records that are partially or fully reconciled cannot be deleted. - [Mark a record as overdue](https://endclose.com/docs/api-reference/mark-a-record-as-overdue.md): Flags a record as overdue within a specific reconciliation by setting the `overdue_at` timestamp on its reconciliation entry. The reconciliation and record are both named in the path — the subject is the (reconciliation, record) entry, so the same record can be overdue in one reconciliation and matc… - [Get bulk request status](https://endclose.com/docs/api-reference/get-bulk-request-status.md): Poll the status of an asynchronous bulk request. Returns the bulk request payload plus paginated per-row results. Results grow as processing continues, so only non-pending items are included. - [Cancel a bulk request](https://endclose.com/docs/api-reference/cancel-a-bulk-request.md): Sets `cancellation_requested_at` so the running job exits cleanly to `cancelled` on its next heartbeat. Idempotent — re-cancelling just bumps the timestamp. - [Retry a bulk request](https://endclose.com/docs/api-reference/retry-a-bulk-request.md): Creates a new bulk request that re-runs only the parent's failed and skipped items. The new request's `parent_bulk_request_id` points at the original. - [List file imports](https://endclose.com/docs/api-reference/list-file-imports.md): Returns a cursor-paginated list of file imports for a data stream, newest first. Rows on this stream-scoped route additionally carry the ClickHouse aggregates (record_count, total_credits, total_debits, net_amount, date_range_start, date_range_end, currency). - [List file imports](https://endclose.com/docs/api-reference/list-file-imports.md): Returns a cursor-paginated list of file imports for a data stream, newest first. Rows on this stream-scoped route additionally carry the ClickHouse aggregates (record_count, total_credits, total_debits, net_amount, date_range_start, date_range_end, currency). - [Retrieve a file import](https://endclose.com/docs/api-reference/retrieve-a-file-import.md): Retrieve a single file import by its unique ID. - [List records for a file import](https://endclose.com/docs/api-reference/list-records-for-a-file-import.md): Returns a paginated list of records belonging to a specific file import. - [Cancel a file import](https://endclose.com/docs/api-reference/cancel-a-file-import.md): Sets `cancellation_requested_at` so the running job exits cleanly to `cancelled` on its next heartbeat. Idempotent — re-cancelling just bumps the timestamp. - [Retry a file import](https://endclose.com/docs/api-reference/retry-a-file-import.md): In-place retry: resumes an unfinished main pass from `processed_offset` and re-runs the queued row errors. No child import is created. - [List data streams](https://endclose.com/docs/api-reference/list-data-streams.md) - [Retrieve a data stream](https://endclose.com/docs/api-reference/retrieve-a-data-stream.md): Retrieve a data stream using its unique immutable key. - [Create a data stream](https://endclose.com/docs/api-reference/create-a-data-stream.md) - [Update a data stream](https://endclose.com/docs/api-reference/update-a-data-stream.md): Update the name of a data stream. - [Delete a data stream](https://endclose.com/docs/api-reference/delete-a-data-stream.md): Permanently deletes a data stream and all associated records and property definitions. - [Reset a data stream](https://endclose.com/docs/api-reference/reset-a-data-stream.md): Asynchronously wipes all records on the stream while preserving stream config, property definitions, and reconciliation links. Always async. Poll the returned operation. - [Get data stream ingestion health](https://endclose.com/docs/api-reference/get-data-stream-ingestion-health.md): Cheap, indexed snapshot of ingestion health for the stream — record count, file import totals, orphan records, bulk request counters by status, and last ingestion time. Safe to poll from the UI. - [Get a data stream operation](https://endclose.com/docs/api-reference/get-a-data-stream-operation.md): Poll a delete or reset operation kicked off against this data stream. Returns the serialized `DataStreamOperation`. On a terminal status, `records_remaining` is the primary-database count of records left on the stream (`0` on `completed`), so callers can trust the operation instead of re-listing rec… - [List property definitions](https://endclose.com/docs/api-reference/list-property-definitions.md) - [Retrieve a property definition](https://endclose.com/docs/api-reference/retrieve-a-property-definition.md) - [Create a property definition](https://endclose.com/docs/api-reference/create-a-property-definition.md) - [Update a property definition](https://endclose.com/docs/api-reference/update-a-property-definition.md): Update the name or optional flag of a property definition. - [Delete a property definition](https://endclose.com/docs/api-reference/delete-a-property-definition.md) - [List reconciliations](https://endclose.com/docs/api-reference/list-reconciliations.md): Returns a paginated list of reconciliations with their associated data streams, newest first. - [Retrieve a reconciliation](https://endclose.com/docs/api-reference/retrieve-a-reconciliation.md) - [Create a reconciliation](https://endclose.com/docs/api-reference/create-a-reconciliation.md): Create a new reconciliation with optional side A and side B data stream associations. - [Update a reconciliation](https://endclose.com/docs/api-reference/update-a-reconciliation.md): Update reconciliation name, run type, or reassign data streams. If stream IDs are provided, all existing stream associations are replaced. - [Delete a reconciliation](https://endclose.com/docs/api-reference/delete-a-reconciliation.md): Permanently deletes a reconciliation and all associated rules, matches, and data stream associations. - [Get reconciliation agent status](https://endclose.com/docs/api-reference/get-reconciliation-agent-status.md): Returns the current status of the reconciliation agent, which automatically creates and refines matching rules. The agent runs automatically when records are uploaded or manually matched — no manual triggering is needed. - [List reconciliation rules](https://endclose.com/docs/api-reference/list-reconciliation-rules.md): Returns all rules for a reconciliation, ordered by priority. - [Retrieve a reconciliation rule](https://endclose.com/docs/api-reference/retrieve-a-reconciliation-rule.md) - [Create a reconciliation rule](https://endclose.com/docs/api-reference/create-a-reconciliation-rule.md) - [Update a reconciliation rule](https://endclose.com/docs/api-reference/update-a-reconciliation-rule.md) - [Delete a reconciliation rule](https://endclose.com/docs/api-reference/delete-a-reconciliation-rule.md) - [List reconciliation stories](https://endclose.com/docs/api-reference/list-reconciliation-stories.md): Returns all reconciliation stories in the environment, newest first. - [Retrieve a reconciliation story](https://endclose.com/docs/api-reference/retrieve-a-reconciliation-story.md) - [Create a reconciliation story](https://endclose.com/docs/api-reference/create-a-reconciliation-story.md): Create a story and attach a chain of reconciliations. The first link must use role `origin` and have no shared_data_stream_id; subsequent links must use role `continuation` and specify the shared data stream linking them to the previous reconciliation. - [Update a reconciliation story](https://endclose.com/docs/api-reference/update-a-reconciliation-story.md): Update the story name and/or replace its links. If `links` is provided, all existing links are replaced with the new chain. If `links` is omitted, only the name is updated. - [Delete a reconciliation story](https://endclose.com/docs/api-reference/delete-a-reconciliation-story.md): Permanently deletes a story and unlinks it from all reconciliations. The reconciliations themselves are not deleted. - [List reconciliation matches](https://endclose.com/docs/api-reference/list-reconciliation-matches.md): Returns a paginated list of matches, optionally filtered by reconciliation or status. Results are ordered by `created_at` descending, then `id` descending — a stable total order, so paging through the full list with `offset` returns every row exactly once even when many rows share a `created_at`. - [Retrieve a reconciliation match](https://endclose.com/docs/api-reference/retrieve-a-reconciliation-match.md) - [Create a reconciliation match](https://endclose.com/docs/api-reference/create-a-reconciliation-match.md): Manually match a set of records. All records must be unreconciled in the specified reconciliation (a record matched in a different reconciliation is fine) and belong to its data streams. - [Delete a reconciliation match](https://endclose.com/docs/api-reference/delete-a-reconciliation-match.md): Deletes a reconciliation match and resets all associated records to unreconciled status. - [List reconciliation exceptions](https://endclose.com/docs/api-reference/list-reconciliation-exceptions.md): Returns a paginated list of exceptions, optionally filtered by reconciliation or status. Each row includes data-stream metadata and an aggregates summary so you can render a queue without a follow-up request per row. Results are ordered by `created_at` descending, then `id` descending — a stable tot… - [Retrieve a reconciliation exception](https://endclose.com/docs/api-reference/retrieve-a-reconciliation-exception.md): Returns the exception with assignees, comments, recent investigation sessions, `aggregates` for the entire overdue slice, and `filtered_aggregates` restricted to the supplied filter query parameters. All filter parameters are optional. - [Create a reconciliation exception](https://endclose.com/docs/api-reference/create-a-reconciliation-exception.md): Create an exception for a reconciliation and data stream. Only one `open` or `investigating` exception can exist per (data stream, reconciliation) pair at a time. `title` defaults to `"{data_stream_name} — overdue records"`, and `status` defaults to `open`. The system automatically creates exception… - [Update a reconciliation exception](https://endclose.com/docs/api-reference/update-a-reconciliation-exception.md): Update the title, description, or status of an exception. - [Delete a reconciliation exception](https://endclose.com/docs/api-reference/delete-a-reconciliation-exception.md) - [Write findings for an exception's lines](https://endclose.com/docs/api-reference/write-findings-for-an-exceptions-lines.md): Upserts one finding per record of the exception — the note, status and suggested action your reviewers see on each open line. Findings are keyed on (exception, record), so sending the same record again replaces its finding. Up to 1,000 findings per request; each is validated independently and the re… - [Read the review of an exception](https://endclose.com/docs/api-reference/read-the-review-of-an-exception.md): Returns the exception's findings with each line's derived status, filtered and paged. Lines sort `to_look_at` first, then `looks_right`, then `done`; within a status, newest record date first. `sort` puts a column in front of that order. - [Write findings for a data stream's lines](https://endclose.com/docs/api-reference/write-findings-for-a-data-streams-lines.md): The same upsert as `PUT /reconciliation_exceptions/{id}/findings`, for an engine that runs before the sweeper has opened an exception. Opens the exception for the (reconciliation, data stream) pair if none is open, reuses it otherwise, and returns its id with the result. - [List bank accounts](https://endclose.com/docs/api-reference/list-bank-accounts.md): Returns all bank accounts for the current environment, ordered by name. - [Retrieve a bank account](https://endclose.com/docs/api-reference/retrieve-a-bank-account.md) - [Create a bank account](https://endclose.com/docs/api-reference/create-a-bank-account.md) - [Update a bank account](https://endclose.com/docs/api-reference/update-a-bank-account.md) - [Delete a bank account](https://endclose.com/docs/api-reference/delete-a-bank-account.md): Permanently deletes a bank account. Returns 409 Conflict if the bank account has linked data streams. - [List bank account balances](https://endclose.com/docs/api-reference/list-bank-account-balances.md): Returns all balances for a bank account, ordered by date descending. - [Create or update a bank account balance](https://endclose.com/docs/api-reference/create-or-update-a-bank-account-balance.md): Creates a balance for the specified bank account. If a balance already exists for the same date and balance type, it will be updated with the new amount (upsert behavior). - [Bulk create or update bank account balances](https://endclose.com/docs/api-reference/bulk-create-or-update-bank-account-balances.md): Submit up to 1,000 balances for a bank account in a single request. Each balance is upserted — if a balance already exists for the same date and balance type, it will be updated with the new amount. All balances are processed in a single transaction. - [List agents](https://endclose.com/docs/api-reference/list-agents.md): Returns a paginated list of the environment's agents, newest first. - [Retrieve an agent](https://endclose.com/docs/api-reference/retrieve-an-agent.md) - [Create an agent](https://endclose.com/docs/api-reference/create-an-agent.md): Create an agent in the environment. Only `name` and `instructions` are required — `cadence` defaults to `manual`, which runs only when triggered via `POST /agents/{id}/runs`. Scheduled cadences require their time fields: `minute` for hourly, plus `hour` for daily/weekdays, plus `day_of_week` for wee… - [Update an agent](https://endclose.com/docs/api-reference/update-an-agent.md): Update any subset of the agent's attributes. Accepts the same fields as create; omitted fields are left unchanged. - [Delete an agent](https://endclose.com/docs/api-reference/delete-an-agent.md): Deletes the agent and all of its runs, including their transcripts and files. - [List an agent's runs](https://endclose.com/docs/api-reference/list-an-agents-runs.md): Returns a paginated list of the agent's runs, newest first. Transcripts are omitted — fetch a single run to get its transcript. - [Retrieve a run](https://endclose.com/docs/api-reference/retrieve-a-run.md): Returns one run including its full event transcript. - [Run an agent](https://endclose.com/docs/api-reference/run-an-agent.md): Triggers a run of the agent immediately, regardless of its cadence or active flag. The run is created `pending` and executed asynchronously — poll `GET /agents/{id}/runs/{run_id}` for status, summary, and output files. Unlike the rest of the agent-management surface, this endpoint also accepts a run… - [Attach an input file](https://endclose.com/docs/api-reference/attach-an-input-file.md): Attaches one file to the agent's input files — the same files the app's agent form manages under "Files". Every run lists the agent's input files in its prompt and can download them, so this is how to hand an agent a mapping table, a prior statement, or any reference material. Send `multipart/form-d… - [Download an input file](https://endclose.com/docs/api-reference/download-an-input-file.md): Redirects (302) to a short-lived signed URL for the file's bytes; follow the redirect to download. This is the API-key-authenticated way to fetch an input file. The `url` on the file object reaches the same bytes through a signed link that needs no credentials. - [Remove an input file](https://endclose.com/docs/api-reference/remove-an-input-file.md): Detaches and deletes one of the agent's input files. Runs already in progress keep the copy they downloaded; later runs no longer see the file. - [Getting started](https://endclose.com/docs/webhooks/getting_started.md): Learn about the events that are available for webhooks - [record.reconciled](https://endclose.com/docs/webhooks/events/record_reconciled.md): When a record is reconciled - [record.reconciliation_overdue](https://endclose.com/docs/webhooks/events/record_reconciliation_overdue.md): When a record has gone beyond its expected reconciliation date ## OpenAPI Specs - [openapi](/docs/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.