> 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/mcp/tool-reference/borrowers.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.hengelending.com/~gitbook/mcp).

# Borrowers

Borrower (client) records and portal invitations.

{% hint style="info" %}
Generated from the MCP server's code. Do not edit this page in GitBook: changes are overwritten on the next sync.
{% endhint %}

## create\_client

Create a Henge client (borrower) record owned by you, or by a loan officer within your access scope (ownerId). firstName, lastName and email are required. In a company with the client portal, an owner who already has a client with that email gets that client back unchanged (alreadyExists is true) and nothing is created; elsewhere it is refused when the owner already has a client with that email, so use the existing client instead. This sends NO email: the borrower is not told the record exists until you call send\_client\_invitation, or until a loan application is created for them with create\_loan\_application, which does email them. Returns the new client.

**Who can call it:** Admin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** writes

| Input         | Type               | Description                                                                                                                                 |
| ------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `ownerId`     | string (uuid)      | The loan officer (user GUID) who will own the client. Defaults to you. Must be a user within your access scope; get one from search\_users. |
| `firstName`   | string             | First name.                                                                                                                                 |
| `lastName`    | string             | Last name.                                                                                                                                  |
| `email`       | string             | Email address. This is where the borrower's invitation and loan emails go.                                                                  |
| `mobilePhone` | string             | Mobile phone number.                                                                                                                        |
| `homePhone`   | string             | Home phone number.                                                                                                                          |
| `workPhone`   | string             | Work phone number.                                                                                                                          |
| `address1`    | string             | Mailing address, first line.                                                                                                                |
| `address2`    | string             | Mailing address, second line.                                                                                                               |
| `city`        | string             | Mailing address city.                                                                                                                       |
| `state`       | string             | Mailing address state, as a two-letter code, e.g. FL.                                                                                       |
| `zipCode`     | string             | Mailing address ZIP code.                                                                                                                   |
| `birthDate`   | string (date-time) | Date of birth, ISO 8601 (yyyy-MM-dd).                                                                                                       |
| `externalId`  | string             | The client's id in an external system, if the caller keeps one.                                                                             |

## get\_client

Return one Henge client (borrower) by id: name, email, phones, mailing address, date of birth, owning loan officer, external id, and whether the client is silenced (receives no email) or archived. Only clients within your access scope can be read; see search\_clients for the scope. To see the client's loans, use search\_loan\_applications.

**Who can call it:** Admin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** reads only

| Input      | Type          | Description                                                                                                                     |
| ---------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `clientId` | string (uuid) | REQUIRED. The Henge client (borrower) id, a GUID. Get it from search\_clients, or from the borrowers on get\_loan\_application. |

## report\_clients

Count the Henge clients (borrowers) you have access to, grouped by up to two of Month (created month, UTC), Company (the owning loan officer's company), Owner (the owning loan officer) and State (mailing-address state). Use it for client growth and mix: net new clients per month per company (\["Month","Company"]), clients per loan officer (\["Owner"]), where clients live (\["State"]). Deleted clients are never counted; archived ones only with includeArchived. Clients owned by test users are excluded unless you are a test user. Same scope as search\_clients: Admin and Processor count every client, everyone else the clients owned by self, assisted users and (ConciergeKey) managed agents. Buckets are sorted by month, then count descending.

**Who can call it:** Admin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** reads only

| Input             | Type                   | Description                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `groupBy`         | array of string        | Up to two dimensions to group by, from: Month (the client's created month, UTC, as yyyy-MM), Company (the owning loan officer's company), Owner (the owning loan officer), State (the client's mailing-address state). Omit or pass \[] for a single total. Two dimensions give one bucket per combination, e.g. \["Month","Company"] for net new clients per company per month. |
| `createdFrom`     | string (date-time)     | Only clients created on or after this UTC date-time.                                                                                                                                                                                                                                                                                                                             |
| `createdTo`       | string (date-time)     | Only clients created before this UTC date-time (exclusive), so the first of the next month ends a month.                                                                                                                                                                                                                                                                         |
| `companyIds`      | array of string (uuid) | Only clients whose owning loan officer is in one of these companies.                                                                                                                                                                                                                                                                                                             |
| `ownerIds`        | array of string (uuid) | Only clients owned by these loan officers (user GUIDs from search\_users). Each must be within your access scope; it can only narrow the result, never widen it.                                                                                                                                                                                                                 |
| `includeArchived` | boolean                | Also count archived clients. Default false. Deleted clients are never counted.                                                                                                                                                                                                                                                                                                   |
| `includeSilenced` | boolean                | Also count silenced clients (those who receive no email). Default true.                                                                                                                                                                                                                                                                                                          |

## search\_clients

Search the Henge clients (borrowers) you have access to by free-text matching their first name, last name, or email, optionally narrowed to one owning loan officer. Agents and DualLicensedAgents see their own and their assisted users' clients, ConciergeKey also sees its managed agents' clients, Admin and Processor see every client. Returns up to 10 clients ordered by last name, each with its id, contact details and owning loan officer. Pass the id as clientId to get\_client, update\_client, send\_client\_invitation and create\_loan\_application.

**Who can call it:** Admin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** reads only

| Input        | Type          | Description                                                                                                                                                                                                                                                            |
| ------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `searchText` | string        | Free-text search. Matches (case-insensitive, partial) against a client's first name, last name, and email. Whitespace-separated tokens must all match, so "jane doe" matches first name Jane and last name Doe. Optional when ownerId is supplied; otherwise required. |
| `ownerId`    | string (uuid) | Optional. Narrow to the clients owned by this loan officer (user GUID from search\_users). Must be a user within your access scope; it can only narrow the result, never widen it.                                                                                     |

## send\_client\_invitation

THIS EMAILS THE BORROWER. Send a Henge client (borrower) the invitation (welcome) email that invites them to the borrower portal, from their owning loan officer, the same email the web app's Invite action sends. Because the email carries a login link, you must be the client's owner, the owner's assistant, the ConciergeKey managing the owner, a Processor of the owner's company or of the company of one of the client's loans, an Admin, or the loan officer or processor on one of the client's loans (referring the client or loan is not enough). Optionally copy yourself with copyType 'cc' or 'bcc'. Refused for a silenced or archived client, and when the owning loan officer has not gone live with email. The company's notification settings can still suppress borrower email; in that case nothing is sent and no error is raised. Only send it when the user asks for it.

**Who can call it:** Admin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** writes; can delete, cost money or reach someone outside, so a client should ask first

**Availability:** only for companies with the borrower portal; hidden from callers in other companies.

| Input      | Type          | Description                                                                                         |
| ---------- | ------------- | --------------------------------------------------------------------------------------------------- |
| `clientId` | string (uuid) | REQUIRED. The Henge client id (GUID) to invite, from search\_clients or get\_client.                |
| `copyType` | string        | Optional. 'cc' or 'bcc' to copy you on the invitation email; omit to send it to the borrower alone. |

## update\_client

Update a Henge client (borrower) within your access scope. Send only the fields to change: an omitted or null field is left as it is. An empty string clears an optional text field; firstName, lastName and email cannot be blanked. The owning loan officer cannot be changed here. Changing the email changes where the borrower's emails go; in a company with the client portal an email another of the owner's clients already holds is refused. Returns the updated client.

**Who can call it:** Admin, Processor, DualLicensedAgent, ConciergeKey, Agent

**Reads or writes:** writes; can delete, cost money or reach someone outside, so a client should ask first

| Input         | Type               | Description                                                                          |
| ------------- | ------------------ | ------------------------------------------------------------------------------------ |
| `clientId`    | string (uuid)      | REQUIRED. The Henge client id (GUID) to update, from search\_clients or get\_client. |
| `firstName`   | string             | First name.                                                                          |
| `lastName`    | string             | Last name.                                                                           |
| `email`       | string             | Email address. This is where the borrower's invitation and loan emails go.           |
| `mobilePhone` | string             | Mobile phone number.                                                                 |
| `homePhone`   | string             | Home phone number.                                                                   |
| `workPhone`   | string             | Work phone number.                                                                   |
| `address1`    | string             | Mailing address, first line.                                                         |
| `address2`    | string             | Mailing address, second line.                                                        |
| `city`        | string             | Mailing address city.                                                                |
| `state`       | string             | Mailing address state, as a two-letter code, e.g. FL.                                |
| `zipCode`     | string             | Mailing address ZIP code.                                                            |
| `birthDate`   | string (date-time) | Date of birth, ISO 8601 (yyyy-MM-dd).                                                |
| `externalId`  | string             | The client's id in an external system, if the caller keeps one.                      |


---

# 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/mcp/tool-reference/borrowers.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.
