---
title: "Recover a deposit"
method: POST
path: "/deposits/recover"
tags: ["Processing"]
---

# Recover a deposit

`POST /deposits/recover`

## Request

- Base URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor`
- URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/recover`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/docs/deposits/recover/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns funds from a failed or rejected deposit.

## Headers

- `x-api-key` string: API key for authentication

## Request body

- RecoverDepositRequestBody
  - `depositId` string, required: Deposit id, as returned by `GET /deposits`. Identifies the row directly: one transaction can produce several deposits, so a {chain, txHash, account, token} tuple does not.
  - `destination` string, required: Address to receive the recovered tokens on the deposit's source chain. Covered by the signature, so the caller cannot redirect an authorized recovery.
  - `signature` string, required: Signature by the deposit recipient over the RecoverDeposit typed data, in whatever form that account verifies: raw ECDSA (EOA), ERC-1271 (deployed smart account), or ERC-6492-wrapped (undeployed).

## Response `200`

Deposit recovered; funds returned on the source chain

- RefundDepositResponse
  - `message` string, required
  - `transactionHash` string, required
  - `amount` string, required

## Other responses

- `400`: Deposit not recoverable (DEPOSIT_NOT_RECOVERABLE) or unsupported for signed recovery (RECOVERY_UNSUPPORTED)
- `401`: Authentication required or invalid
- `403`: API key lacks the deposits:write scope
- `409`: The refund may have been submitted and is held for reconciliation (REFUND_RECONCILIATION_REQUIRED), or an earlier bridge intent of this deposit may still be settling or already moved its funds (SETTLEMENT_UNRESOLVED); reconcile instead of re-signing
- `422`: The signature does not authorize this recovery (SIGNATURE_INVALID)
- `500`: Recovery transfer failed (REFUND_FAILED)
- `503`: Smart-account signature verification is temporarily unavailable (VERIFICATION_UNAVAILABLE), or settlement evidence is unreadable (REFUND_UNAVAILABLE); retry the same signature (see Retry-After)

## Changes

- **2026-11-06** `aa1767d704fa`: 10 warning, 3 info
  - added the new `REFUND_UNAVAILABLE` enum value to the `code` response property for the response status `400`
  - added the new `REFUND_UNAVAILABLE` enum value to the `code` response property for the response status `409`
  - added the new `REFUND_UNAVAILABLE` enum value to the `code` response property for the response status `422`
  - added the new `REFUND_UNAVAILABLE` enum value to the `code` response property for the response status `500`
  - …9 more
- **2026-09-17** `676300ac19ff`: 2 info
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `403` status
- **2026-09-11** `b49146029e5a`: 1 breaking, 1 warning
  - the `header` request parameter `x-api-key` became required
  - deleted the `header` request parameter `authorization`
- **2026-08-06** `ce4e0abfe33a`: 3 breaking, 8 warning, 5 info
  - added the new required request property `depositId`
  - added the new required request property `destination`
  - the `signature` request property's minLength was increased from `0` to `132`
  - the `signature` request property's maxLength was set to `8194`
  - …12 more
- **2026-07-22** `c7c79ef5fe6b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/changes/deposits/recover/post.md)

---

[API](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api.md) - [All operations](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/revisions/aa1767d704fa?raw)
