---
title: "Update Resource Metadata (JSON Patch)"
description: "/metadata/update lets you modify specific metadata fields without replacing the entire object. It accepts RFC 6902 JSON Patch documents, so you can add, replace, or remove individual fields atomically."
stack: "Enterprise Stack (commercial) — version 0.21.0"
stack_version: "0.21.0"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/enterprise-stack/administration/services/metadata/update
generated: 2026-07-20
---
# Update Resource Metadata (JSON Patch)

`/metadata/update` lets you modify specific metadata fields without replacing the entire object. It accepts [RFC 6902 JSON Patch documents](https://www.rfc-editor.org/rfc/rfc6902), so you can add, replace, or remove individual fields atomically.

## Patch metadata (KMS key example)

**Option: CURL**

Endpoint: `/v1/{target}/kms-service-api/keys/metadata/update` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Key%20Management/post_v1__target__kms_service_api_metadata_update)

**Example Request**

```bash
curl -X 'POST' \
  'https://{orgHost}.enterprise-sandbox.waltid.dev/v1/{target}/kms-service-api/keys/metadata/update' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "op": "replace",
    "path": "/description",
    "value": "Updated description"
  }
]'
```

**Path Parameters**

- `orgHost`: _String_ - Organization host alias to call against. In sandbox, `test` maps to `https://test.enterprise-sandbox.waltid.dev`.
- `target`: _resourceIdentifier_ - Full path to the KMS key (or other resource) whose metadata you want to patch, e.g. `test.tenant1.kms-eu.key-auth`.

**Body**

```json
[
  {
    "op": "replace",
    "path": "/description",
    "value": "Updated description"
  }
]
```

**Body Parameters**

- `patch`: _JSON object_ - A single JSON Patch operation (`op`, `path`, `value`, etc.). To apply multiple operations, send an array (per RFC 6902).

**Response Codes**

- `200` – Patch applied successfully.
- `400` – Invalid JSON Patch document or patch could not be applied.
- `401/403` – Authentication or authorization failure.
