> ## Documentation Index
> Fetch the complete documentation index at: https://endclose.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# End Close API

> Learn how the End Close REST API is organized: base URL, environments, API keys, IDs, timestamps, amounts and the available resources.

The End Close API is a REST API for sending financial records into End Close and working with the reconciliations, matches and exceptions built from them. It accepts and returns JSON, authenticates with an API key in the `X-API-Key` header, and covers everything from creating data streams to running agents.

## Base URL and versioning

Every endpoint lives under one base URL:

```text Base URL theme={"dark"}
https://api.endclose.com/v1
```

The version is part of the path. All endpoints in this reference are `v1`.

Send request bodies as JSON with `Content-Type: application/json`. The only exception is attaching a file to an agent, which takes a multipart upload.

```bash cURL theme={"dark"}
curl https://api.endclose.com/v1/reconciliations \
  -H "X-API-Key: $ENDCLOSE_API_KEY"
```

An unknown path returns `404` with a JSON body that points you back to the [OpenAPI specification](https://www.endclose.com/docs/openapi.json).

## Environments and API keys

Each End Close organization starts with two environments, **Sandbox** and **Production**. Data never crosses between them: a record created in Sandbox is invisible to Production, and the reverse.

Each environment has its own API key, and the key decides which environment a request reads and writes. Sandbox keys start with `sk_test_` and Production keys start with `sk_live_`. Find them in the End Close app under **Settings > API keys**, switching environment to see the other key.

See [Authentication](https://endclose.com/docs/api-reference/authentication.md) for how to send the key.

## Conventions

| Topic | Convention |
| - | - |
| IDs | Resources are identified by UUIDs in an `id` field. Data streams are addressed in paths by their `key`, a string you choose. |
| Client-supplied IDs | `POST /records` accepts an optional `id`. It must be a UUID (uuidv7 recommended), and retrying with the same `id` returns the original record instead of creating a second one. |
| Timestamps | Fields ending in `_at` are ISO 8601 date-times, such as `2026-11-03T14:22:05Z`. |
| Dates | Transaction dates, such as a record's `date`, are ISO 8601 calendar dates: `2026-11-03`. |
| Amounts | Integers in the currency's minor unit. For USD, `1234` is \$12.34. Records also carry `decimal_places` (2 for USD). |
| Direction | Records carry a `direction` of `credit` or `debit`. Amounts are not signed. |
| Currency | Three-letter ISO 4217 codes. On records, `currency` defaults to `USD` when omitted, is case-insensitive on input and always returned uppercase. |
| Lists | List endpoints return a `data` array and paginate. See [Pagination](https://endclose.com/docs/api-reference/pagination.md). |
| Retries | Many write endpoints accept an `Idempotency-Key` header. See [Idempotency](https://endclose.com/docs/api-reference/idempotency.md). |
| Errors | Error responses carry a `message` field. See [Errors](https://endclose.com/docs/api-reference/errors.md). |

## Resources

> [card] [Records](https://endclose.com/docs/api-reference/list-records.md)
>
> The individual transactions End Close reconciles, one per line of source data.

> [card] [Bulk requests](https://endclose.com/docs/api-reference/get-bulk-request-status.md)
>
> Track, cancel and retry asynchronous uploads of up to 1,000 records.

> [card] [File imports](https://endclose.com/docs/api-reference/list-file-imports.md)
>
> Files loaded into a data stream, with their progress and row errors.

> [card] [Data streams](https://endclose.com/docs/api-reference/list-data-streams.md)
>
> The sources records arrive from, such as a bank account or a processor.

> [card] [Property definitions](https://endclose.com/docs/api-reference/list-property-definitions.md)
>
> Named, typed properties you define for a data stream's records.

> [card] [Reconciliations](https://endclose.com/docs/api-reference/list-reconciliations.md)
>
> Pairs of data streams End Close matches against each other.

> [card] [Reconciliation rules](https://endclose.com/docs/api-reference/list-reconciliation-rules.md)
>
> The matching and rollup rules a reconciliation applies.

> [card] [Reconciliation stories](https://endclose.com/docs/api-reference/list-reconciliation-stories.md)
>
> Ordered chains of reconciliations that trace money end to end.

> [card] [Reconciliation matches](https://endclose.com/docs/api-reference/list-reconciliation-matches.md)
>
> Groups of records End Close or a person matched together.

> [card] [Reconciliation exceptions](https://endclose.com/docs/api-reference/list-reconciliation-exceptions.md)
>
> Unmatched or overdue records that need review, and their findings.

> [card] [Bank accounts](https://endclose.com/docs/api-reference/list-bank-accounts.md)
>
> The bank accounts your data streams belong to.

> [card] [Bank account balances](https://endclose.com/docs/api-reference/list-bank-account-balances.md)
>
> Balances for a bank account by date and balance type.

> [card] [Agents](https://endclose.com/docs/api-reference/list-agents.md)
>
> Create agents, run them and read their runs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.