# Quarantine an Operation

Hold one pending operation of your tenant before anything of it is signed or sent, until the quarantine is lifted.

## Overview

- `operation`: `earn_operation`, `bank_payout` or `agent_execution`; `id`: the operation's id — the Earn operation's, the wallet payout's `payoutId`, the agent execution's. What counts as pending and where it is held: [Quarantine an Operation](https://docs.aureahub.com/docs/guide-freezes.md).
- `201` with the quarantine; `walletId` is the wallet that would sign the operation. From then on, that signature or send answers `423` `OPERATION_QUARANTINED`.
- Refusals: `404` `OPERATION_NOT_FOUND` (`No such operation here.`); `409` `OPERATION_NOT_PENDING` (`Only a pending operation can be quarantined: this one is not waiting for anything.`, with `details.state`), `OPERATION_NOT_QUARANTINABLE` (with `details.reason`), `ALREADY_QUARANTINED` (`This operation is already quarantined.`).
- Same roles as [Freeze](https://docs.aureahub.com/docs/freezes-create.md).

## Endpoint

### `POST /v1/admin/tenants/{id}/quarantines`

Authentication: bearer token required.

Quarantines a pending operation of the tenant.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Tenant UUID |

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | `earn_operation`, `bank_payout` or `agent_execution` |
| `id` | string | yes | The operation's id |
| `reason` | string | yes | 1–500 characters |

**Responses**

`201` Quarantined

```json
{
  "id": "f1c8a2e6-0d4b-4b97-8e3c-5a9d2f7b1c40",
  "operation": "bank_payout",
  "operationId": "3b9f6d2a-7e1c-4a85-b0d4-8c2e5f1a9b37",
  "tenantId": "6f1e2d3c-4b5a-4968-8776-a5b4c3d2e1f0",
  "walletId": "7c1e9b24-3f5a-4d8e-9b6c-1a2f3e4d5c6b",
  "reason": "Beneficiary under review",
  "quarantinedBy": "5d2c1b0a-9e8f-4a7b-8c6d-5e4f3a2b1c0d",
  "quarantinedByRole": "tenantadmin",
  "quarantinedByPlatform": false,
  "quarantinedAt": "2026-10-06T11:05:12.640Z",
  "active": true,
  "liftedAt": null,
  "liftedBy": null,
  "liftedByRole": null,
  "liftReason": null
}
```

`409` Not pending

```json
{
  "statusCode": 409,
  "error": "ConflictError",
  "message": "Only a pending operation can be quarantined: this one is not waiting for anything.",
  "details": { "code": "OPERATION_NOT_PENDING", "state": "completed" }
}
```

---

Web version: https://docs.aureahub.com/#quarantines-create
