---
title: "Replace wallet metadata"
method: POST
path: "/customers/{external_customer_id}/wallets/{wallet_code}/metadata"
tags: ["wallets"]
---

# Replace wallet metadata

`POST /customers/{external_customer_id}/wallets/{wallet_code}/metadata`

## Request

- Base URL: `https://api.getlago.com/api/v1`
- URL: `https://api.getlago.com/api/v1/customers/{external_customer_id}/wallets/{wallet_code}/metadata`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/getlago/apis/lago-api-documentation/docs/customers/:external_customer_id/wallets/:wallet_code/metadata/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint replaces all existing metadata on a wallet with the provided key-value pairs.
Any existing metadata keys not included in the request will be removed.

## Request body

- WalletMetadataResponse
  - `metadata` MetadataObject, nullable, required: Custom metadata stored as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.

## Response `200`

Wallet metadata replaced

- WalletMetadataResponse
  - `metadata` MetadataObject, nullable, required: Custom metadata stored as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.

## Other responses

- `401`: Unauthorized error
- `404`: Not Found error
- `422`: Unprocessable entity error

## Changes

- **2026-11-03** `5d26657495a3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getlago/apis/lago-api-documentation/changes/customers/:external_customer_id/wallets/:wallet_code/metadata/post.md)

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) - [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/getlago/apis/lago-api-documentation/revisions/b216574b9612?raw)
