> ## 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.

# Undo approval

> Reverse an approval and return the loan to submitted state.

Reverses a prior approval. The loan returns to **submitted and pending
approval** so it can be modified or deleted. Cannot be used while the
loan is disbursed (which is the default state after
[`POST /v1/loans`](/loans/create)) — call
[Undo disbursal](/loans/undo-disbursal) first.

<Note>
  Because partners always create loans via the single-call `POST /v1/loans`,
  walking back to a pending state takes two steps: undo-disbursal, then
  undo-approval. This endpoint exists for admin/operational reversals and
  is part of the rollback sequence after a wallet failure.
</Note>

Two equivalent forms — prefer the externalId form for partner integrations.

```bash theme={null}
# By loan externalId (recommended)
curl -X POST "$BASE/v1/loans/external/loan-ext-12345/undo-approval" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"note":"Rolling back failed disbursal"}'

# Same effect, by LMS id
curl -X POST "$BASE/v1/loans/501/undo-approval" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"note":"Rolling back failed disbursal"}'
```

## Path parameters

<ParamField path="loan_id" type="string" required />

## Request body

<ParamField body="note" type="string">
  Optional free-text note explaining the reversal.
</ParamField>

The body is optional — POST with no body is valid.

## Example

```bash theme={null}
curl -sf -X POST "$BASE/v1/loans/501/undo-approval" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"note": "Compliance review pending"}'
```

## Response

`200 OK` returns the [loan object](/loans/overview) with status reset
to submitted.

## Errors

| Code        | When                                                   |
| ----------- | ------------------------------------------------------ |
| `not_found` | No loan with that ID                                   |
| `aborted`   | Loan was never approved, or has already been disbursed |
