---
title: "Update User Wallet"
description: "Use PUT /users/{user_id}/wallets/{wallet_id} to update a user's wallet lock state."
canonical: https://docs.ordering.co/api-reference/guides/update-wallet-by-user/
---

# Update User Wallet

> **API operation:** [Open the endpoint in Scalar](https://docs.ordering.co/api-reference/#tag/users/PUT/users/{user_id}/wallets/{wallet_id})

Use `PUT /users/{user_id}/wallets/{wallet_id}` to update a user's wallet lock state. The current public operation is `Wallet.update`.

Only administrators and agents can update a wallet. The request must identify the user and wallet and include `locked`. Unlocking clears `locked_reason` and `locked_at`; locking records the time and creates a zero-amount audit event attributed to the authenticated caller.

The `locked` field is required. See [Wallet model](https://docs.ordering.co/api-reference/guides/wallet-model/).

## OpenAPI reference

**Operation:** `PUT /users/{user_id}/wallets/{wallet_id}`

**Path parameters**

| Name        | Type    | Required | Description |
| ----------- | ------- | -------- | ----------- |
| `user_id`   | integer | Yes      | —           |
| `wallet_id` | integer | Yes      | —           |

**Header parameters**

| Name              | Type   | Required | Description |
| ----------------- | ------ | -------- | ----------- |
| `User-Agent`      | string | No       | —           |
| `X-Forwarded-For` | string | No       | —           |

**Request body fields**

| Name            | Type    | Required |
| --------------- | ------- | -------- |
| `locked`        | boolean | Yes      |
| `locked_reason` | any     | No       |

**Responses**

| Code | Description                           |
| ---- | ------------------------------------- |
| 200  | OK (Envelope)                         |
| 400  | Bad Request (ErrorResponse)           |
| 401  | Unauthorized                          |
| 404  | Not Found                             |
| 429  | Too Many Requests (ErrorResponse)     |
| 500  | Internal Server Error (ErrorResponse) |
| 503  | Service Unavailable (ErrorResponse)   |

[Open this operation in the API reference](https://docs.ordering.co/api-reference/#tag/users/PUT/users/{user_id}/wallets/{wallet_id})
