> For the complete documentation index, see [llms.txt](https://api-docs.hengelending.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.hengelending.com/api/guides/limits-and-reliability.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.hengelending.com/~gitbook/mcp).

# Limits and reliability

## Rate limits

The API code applies no general rate limit. Three things throttle you:

* **Filing support reports.** `POST /user-reports` allows 10 an hour per partner client. The 11th returns `429` with `Retry-After`. Reads are not limited.
* **Plaid balance refresh.** `POST /loan-applications/{id}/accounts/plaid/refresh` runs at most once per loan in 48 hours by default, because each refresh is billed. A second call inside the window returns `429` with the code `PlaidRefreshThrottled`, a `Retry-After` header in seconds, and `lastRefreshedAt` and `nextRefreshAt` (UTC) in the body. `Retry-After` can be hours, so do not sleep on it in a request path: schedule the next refresh for `nextRefreshAt`.
* **The services behind us.** When the LOS, the pricing engine or another service throttles a call, you get `503` with `Retry-After: 10`. The token endpoint passes through the authorization server's own throttle as `429` with `Retry-After`.

Do not rely on there being no limit. Back off on `429`, `502` and `503`, and cache your token (see below).

## Tokens

The token response's `expires_in` is the token's lifetime in seconds. It is set on the authorization server, not by this API, so read it from each response rather than assuming a number.

* Cache the token and send it on every call for `expires_in` seconds.
* Request a new one shortly before it expires, for example when less than a minute remains.
* If a call returns `401`, request one new token and retry the call once. If the retry also returns `401`, stop and check the credential: it may have been rotated or revoked.

Do not fetch a token per call or in a loop: the token endpoint is throttled.

## Size limits

* `POST /loan-applications/import/mismo` and `PUT /loan-applications/{id}/mismo` accept a file of up to 20 MB. A larger file is rejected.
* `POST /user-reports` accepts up to 5 files. Each file may be up to 5 MB and the files together up to 15 MB. A file over 5 MB, or files over 15 MB together, return `400`. A request over 20 MB is rejected by the server before the API reads it.
* **Page size.** Every list that pages takes `skip` (how many to pass over, default 0) and `top` (how many to return), except `GET /clients` and `GET /users`, which page with `$skip` and `$top` (below). A `top` above the route's maximum is lowered to the maximum, and a negative `skip` counts as 0. The response says how many items match across every page: `totalCount` in the body, or the `X-Total-Count` header where the body is a plain array.

  | Route                                          | Default `top` | Maximum `top` | Total                  | Older parameters, still accepted |
  | ---------------------------------------------- | ------------- | ------------- | ---------------------- | -------------------------------- |
  | `GET /loan-applications`                       | 25            | 100           | `totalCount`           | none                             |
  | `GET /loan-applications/{id}/activity`         | 25            | 100           | `totalCount`           | none                             |
  | `GET /loan-applications/{id}/notes`            | 50            | 200           | `totalCount`           | `page`, `pageSize`               |
  | `GET /clients`, `GET /users` (`$top`, `$skip`) | 50            | none          | `count`                | none                             |
  | `GET /user-reports`                            | 50            | 50            | `X-Total-Count` header | `page`                           |
  | `GET /reports/loan-tasks`                      | 25            | none          | `count`                | none                             |

  The older parameters are deprecated. They keep working as before. `skip` replaces `page`, and `top` replaces `pageSize`: when you send the new one, its older twin is ignored, and an older parameter whose twin you do not send still applies. Do not mix the two styles. On `GET /clients` and `GET /users`, send `$skip` and `$top` with the dollar sign: without it, `skip` is applied twice and `top` also limits `count`. `GET /loan-applications` pages only a search (search text or a filter). Without one it returns the acting user's loans, or with `clientId` the client's loans, in one response and ignores `skip` and `top`. `fromPage` and `toPage` on `GET /loan-applications/{id}/documents/{documentId}/text` choose which pages of one document to read; they are not paging.
* Other uploads have no limit of our own. The hosting default applies.

## Timeouts

The API sets no request timeout of its own. A call that waits on the LOS or a vendor, such as a submit, a credit order or an automated underwriting run, can take a while, so set your client timeout generously. If your client gives up, the call may still finish on our side. Read the state before you repeat a billed call. An automated underwriting run the LOS did not answer in time comes back as `Submitted`. Use `POST .../aus/du/status-check` to finish it. Do not submit it again.

## Webhooks

A webhook is a notification, sent once:

* The `POST` carries ids: `eventId`, `occurredAt`, `companyId`, `entityId`, `objectType` and `eventType`, the last two as `{ id, name }` objects (see [the payload](https://api-docs.hengelending.com/api/guides/loan-lifecycle.md#webhooks)). It has no loan data.
* We send it once. We do not read your response, retry, or guarantee order, and there is no delivery log or redelivery. `eventId` is the same if the same event ever reaches you twice, so you can drop a repeat.
* An optional `x-api-key` header carries the key you set. Once you create a signing secret, a `Henge-Signature` header lets you check that the delivery came from Henge (see [verifying a delivery](https://api-docs.hengelending.com/api/guides/loan-lifecycle.md#verifying-a-delivery)).

So treat a webhook as a hint to look. When one arrives, read the object. And poll to catch what you missed: list your loans with the filters on `GET /loan-applications`, for example `statusDateFrom`, and read the tasks and documents of any loan that looks changed. A status change that comes from the LOS sends no webhook at all, so poll for it.

Loan reads return Henge's stored copy of the LOS loan. It is refreshed when the LOS reports a change and again on a read once it is older than a set age (15 minutes by default), so a value changed in the LOS can show up on a later read.

## Retrying billed calls

| Call                         | Safe to retry?                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Send an e-sign package       | Yes. A package that was already sent is refused with `422`, so a retry cannot send twice.                                                                                                                                                                                                                                                                                                                                     |
| Create an e-sign draft       | No. It is billed, and each call makes a new draft. List the loan's packages before you repeat it.                                                                                                                                                                                                                                                                                                                             |
| Request a rate lock          | Yes. Once a lock is requested a second request is refused with `409`. It is not billed by a vendor.                                                                                                                                                                                                                                                                                                                           |
| Order a credit report        | Not in every case. A retry after a completed order is refused, so a sequential retry is safe once the order succeeded. A retry after a timeout or an error can bill again if the first call reached the vendor. Do not retry a credit order that timed out; check the loan's credit report first. If the credit report task has a report number, the order went through, so import its liabilities instead of ordering again. |
| Order an income verification | An open or completed order for the borrower comes back with `alreadyOrdered` and the vendor is not called again.                                                                                                                                                                                                                                                                                                              |
| Submit a loan                | Yes after a refusal or a failure. A loan already in the LOS is refused with `422`.                                                                                                                                                                                                                                                                                                                                            |

## What to send support

Send the `traceId` from the error body, the method and path, the time, and the loan `id`. Without a `traceId` we have to search by time and path. If you report through `POST /user-reports`, put the `traceId` in the text.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-docs.hengelending.com/api/guides/limits-and-reliability.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
