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

# Close a customer

> Permanently close an active customer.

Closes a customer. The customer can no longer hold new loans or
accounts but historical records remain queryable. Closure cannot be
undone — there is no "reopen" endpoint.

<Warning>
  Customers with **open loans or active savings accounts cannot be
  closed.** Close those first.
</Warning>

Two equivalent forms — see [Addressing a customer](/customers/overview#addressing-a-customer).

## Path parameters

<ParamField path="customer_id" type="string" required>
  LMS id, or the externalId on the
  `/external/{customer_external_id}/close` form.
</ParamField>

## Request body

<ParamField body="closureDate" type="string" required>
  ISO-8601 `YYYY-MM-DD`. The effective date of closure.
</ParamField>

<ParamField body="closureReasonId" type="integer" required>
  Closure reason code. Valid values are configured per deployment.
</ParamField>

## Examples

```bash theme={null}
# By LMS id
curl -sf -X POST "$BASE/v1/customers/42/close" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"closureDate": "2026-12-31", "closureReasonId": 17}'

# By externalId
curl -sf -X POST "$BASE/v1/customers/external/ext-ada-001/close" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"closureDate": "2026-12-31", "closureReasonId": 17}'
```

## Response

`200 OK` returns the [customer object](/customers/overview) with
`status="Closed"`.

## Errors

| Code               | When                                                   |
| ------------------ | ------------------------------------------------------ |
| `not_found`        | No customer with that ID                               |
| `aborted`          | Customer has open loans/accounts, or is already closed |
| `invalid_argument` | Missing `closureDate` or `closureReasonId`             |
