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

# Merge wallet metadata

`PATCH /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/patch.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint merges the provided metadata with existing metadata on the wallet.
Existing keys not in the request are preserved. New keys are added, existing keys are updated.

## 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 merged

- 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/patch.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)
