---
title: "Replace credit note metadata"
method: POST
path: "/credit_notes/{lago_id}/metadata"
tags: ["credit_notes"]
---

# Replace credit note metadata

`POST /credit_notes/{lago_id}/metadata`

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

## Path parameters

- `lago_id` string, uuid, required

## Request body

- CreditNoteMetadataResponse
  - `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`

Credit note metadata replaced

- CreditNoteMetadataResponse
  - `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

---

[API](https://skmtc.net/getlago/apis/lago-api-documentation.md) · [All operations](https://skmtc.net/getlago/apis/lago-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getlago/lago-api-documentation/versions/6e969ef3bb45/schema)
