# Supply (Custodial Wallet)

> Coming soon, upon request — this feature is turned on for your tenant by the Aurea team. [Contact us](https://www.aureahub.com/contact)

Supply EUR.e from the user's custodial wallet to the lending pool. Aurea signs and sends, and answers once the supply is mined.

## Overview

- `weiAmount`: digits only, in EUR.e's smallest unit (18 decimals). The chain and the wallet are picked for you ([Chain and Wallet](https://docs.aureahub.com/docs/guide-lending.md)), among the user's wallets whose key the platform holds for your tenant: with none, `400` — prepare the supply instead ([Prepare a Supply](https://docs.aureahub.com/docs/lending-prepare-supply.md)).
- When the allowance falls short, the pool's approval is sent first and waited for ([Approvals of the Token](https://docs.aureahub.com/docs/guide-lending.md)). The answer is the supply's `txHash`, after its receipt.
- The wallet must hold the amount, and the native coin for gas: a supply the chain refuses answers its error.

> Note: **Institutional tenants only.** For a tenant on the institutional security profile, this route needs an `Idempotency-Key`, and the tenant's policy decides before anything is signed or handed out to sign. A rule that asks for an approval holds the operation: the route answers `202` with the operation to follow (the **202** tab below), and nothing is signed or sent until the rule's approvers approve it — [Approvals](https://docs.aureahub.com/docs/guide-approvals.md). The policy's other refusals: [Policy Sets](https://docs.aureahub.com/docs/guide-policy-sets.md). Every other tenant gets the answers below, unchanged.

> Note: **Your institution callback** [Coming soon, upon request](https://docs.aureahub.com/docs/feature-availability.md): before anything is signed or handed out to sign, your own endpoint is asked, and its refusals answer here — `403` `INSTITUTION_CALLBACK_REJECTED` or `INSTITUTION_CALLBACK_ANSWER_INVALID`, `503` `INSTITUTION_CALLBACK_UNAVAILABLE`. Its `RETRY` holds the operation of a tenant on the institutional security profile — `202`, `PENDING_AUTHORIZATION` `awaiting_callback`, the **Held for your callback** tab below — until it approves (then, for a client-side or MPC wallet, read what to sign with [Get Its Callback](https://docs.aureahub.com/docs/operation-callback.md)), and answers any other tenant `409` `INSTITUTION_CALLBACK_PENDING`: [Institution Callback & Co-Signer](https://docs.aureahub.com/docs/guide-institution-callback.md).

## Endpoint

### `POST /v1/lending/supply`

Authentication: bearer token required.

Supplies EUR.e from the user's custodial wallet. Needs the user's access token and the tenant signature (or a server token).

**Headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional — required for a tenant on the institutional security profile (`400` `IDEMPOTENCY_KEY_REQUIRED` without it). Up to 255 letters, digits, - or _. The same key with the same request answers with the first answer (`idempotency-replayed: true`) instead of running it again; see [Idempotency](https://docs.aureahub.com/docs/idempotency.md) |
| `X-External-Tx-Id` | string | no | Optional — your own id for the operation this call starts: 1 to 255 letters, digits, `_`, `.`, `:` or `-`, unique in your tenant for ever. Read where your tenant has operation records [Coming soon, upon request](https://docs.aureahub.com/docs/feature-availability.md); otherwise it is not read. An id another operation of your tenant holds answers `409` `EXTERNAL_TX_ID_REUSED` before anything is signed or sent; see [Idempotency](https://docs.aureahub.com/docs/idempotency.md) › Your Own Operation Id |

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `weiAmount` | string | yes | The amount, digits only, in the smallest unit |
| `isTestnet` | boolean | yes | `true` testnet, `false` mainnet |

**Responses**

`200` Supplied

```json
{
  "txHash": "0x8e3f…c41a"
}
```

`202` Held for approval

```json
{
  "operationId": "1d7a3c52-8e4b-4f19-a0c6-2b9e7d5f3a18",
  "state": "PENDING_AUTHORIZATION",
  "subState": "awaiting_approval",
  "approval": {
    "id": "c3e1a9f4-6b2d-4e8a-9f17-5d0c2b8e4a63",
    "ruleId": "e2b6d9f1-7a3c-4c58-8b0e-5f1a4d2c9b73",
    "ruleName": "Large transfers need two approvers",
    "threshold": 2,
    "expiresAt": null
  }
}
```

`202` Held for your callback

```json
{
  "operationId": "1d7a3c52-8e4b-4f19-a0c6-2b9e7d5f3a18",
  "state": "PENDING_AUTHORIZATION",
  "subState": "awaiting_callback",
  "callback": {
    "requestId": "8a3e5c71-2d9b-4f06-b1e8-4c7a9d2f6e15",
    "nextPollAt": "2026-10-14T09:21:00.000Z",
    "deadlineAt": "2026-10-16T09:20:00.000Z"
  }
}
```

`400` No Custodial Wallet

```json
{
  "error": "BadRequestError",
  "message": "No signable wallet found. Use /v1/lending/prepare-supply for non-custodial wallets."
}
```

**Example request**

```bash
curl -X POST https://api.aureahub.com/v1/lending/supply \
  -H "Authorization: Bearer USER_ACCESS_TOKEN" \
  -H "x-tenant-api-key: YOUR_API_KEY" \
  -H "x-timestamp: UNIX_SECONDS" \
  -H "x-signature: HMAC_SHA256_HEX" \
  -H "Idempotency-Key: supply-7c1e" \
  -H "Content-Type: application/json" \
  -d '{"weiAmount": "50000000000000000000", "isTestnet": false}'
```

---

Web version: https://docs.aureahub.com/#lending-supply
