# Change an Asset's Metadata

Replace, or clear, your own keys and values on one of your tenant's assets — an ISIN, a desk, an internal code.

## Overview

- `metadata` **replaces the whole object**: send every key you keep. `null` clears it (the asset's `metadata` reads `null`); `{}` leaves an empty object.
- **The rules**: at most 20 keys; a key is 1 to 40 of `a–z 0–9 _`, starting with a letter; a value is a text — never a number, a boolean or an object — of 1 to 200 characters, with no space at either end. Else `400` `ASSET_REQUEST_INVALID`, each problem in `details.errors`. The object is stored up to 8 KB: plain ASCII within the rules always fits; values in characters of two to four bytes can pass it, and such a request answers `500` and writes nothing.
- **Any asset of your tenant's own**: a native coin, a Solana mint, one added with the token routes or registered here. A catalogue asset, another tenant's, or an id that names none: `404` `ASSET_NOT_FOUND`. Nothing else of the asset changes here — its other fields are the token routes'.
- `200` with the asset, its `updatedAt` moved. Aurea stores your metadata and answers it on the asset routes only; nothing else reads it.
- For `owner`, `tenantadmin`, `non_signing_admin` and `editor`, on their own tenant, with their access token. Written to your audit trail [Coming soon, upon request](https://docs.aureahub.com/docs/feature-availability.md), as `asset.metadata_changed`, with the names of the keys before and after — never a value.

## Endpoint

### `PATCH /v1/assets/{assetId}`

Authentication: bearer token required.

Replaces, or clears, your tenant's metadata of one of its assets.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `assetId` | string (uuid) | yes | The asset's id |

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `metadata` | object \| null | yes | Your own keys and values: at most 20 keys of 1 to 40 of `a–z 0–9 _` starting with a letter, each value a text of 1 to 200 characters with no space at either end; `null` clears it |

**Responses**

`200` Changed

```json
{
  "assetId": "7e5df737-88f9-4c90-8fc8-0f70429c2d17",
  "assetKey": "evm:8453:0xdbfbe194c514a645bb0fcb5230adaf85efea3fe7",
  "policyAsset": "base:0xdbfbe194c514a645bb0fcb5230adaf85efea3fe7",
  "family": "evm",
  "chain": "base",
  "chainId": 8453,
  "isTestnet": false,
  "type": "token",
  "address": "0xdBfbe194c514a645Bb0FCb5230aDaF85EFea3fe7",
  "symbol": "GBND31",
  "name": "Green Bond 2031",
  "decimals": 6,
  "logoUri": "https://cdn.example.com/tokens/gbnd31.png",
  "coingeckoId": null,
  "isActive": true,
  "source": "tenant",
  "registeredVia": "registry",
  "metadata": {
    "desk": "treasury",
    "isin": "XS2964021187",
    "internal_code": "TB-0417"
  },
  "contractCheck": {
    "result": "matched",
    "checkedAt": "2026-10-14T09:12:40.517Z"
  },
  "createdAt": "2026-10-14T09:12:40.517Z",
  "updatedAt": "2026-10-14T10:41:07.733Z"
}
```

`400` Form

```json
{
  "statusCode": 400,
  "error": "BadRequestError",
  "message": "Invalid request",
  "details": {
    "code": "ASSET_REQUEST_INVALID",
    "errors": ["metadata.ISIN: a key is 1 to 40 of a–z 0–9 _"]
  }
}
```

`404` Not found

```json
{
  "statusCode": 404,
  "error": "NotFoundError",
  "message": "No such asset here.",
  "details": { "code": "ASSET_NOT_FOUND" }
}
```

**Example request**

```bash
curl -X PATCH https://api.aureahub.com/v1/assets/7e5df737-88f9-4c90-8fc8-0f70429c2d17 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "metadata": { "desk": "treasury", "isin": "XS2964021187", "internal_code": "TB-0417" } }'
```

---

Web version: https://docs.aureahub.com/#asset-metadata-update
