---
title: "Update metadata"
method: PATCH
path: "/core/{entity}/{entityId}/metadata"
tags: ["Metadata"]
---

# Update metadata

`PATCH /core/{entity}/{entityId}/metadata`

## Request

- Base URL: `https://api.enterprise.sandbox.uphold.com`
- URL: `https://api.enterprise.sandbox.uphold.com/core/{entity}/{entityId}/metadata`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/core/oauth2/token`
- TypeScript: <https://skmtc.dev/uphold/apis/core-api/docs/core/:entity/:entityId/metadata/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update existing metadata for a given entity.

## Path parameters

- `entity` 'accounts' | 'external-accounts' | 'files' | 'transactions' | 'users', required
- `entityId` string, required

## Headers

- `If-Match` string
- `X-On-Behalf-Of` string
- `X-Uphold-User-Ip` union
  - string, ipv4
  - string, ipv6
- `X-Uphold-User-Agent` string
- `X-Uphold-User-Origin` string
- `X-Uphold-User-Country` string
- `X-Uphold-User-Subdivision` string
- `X-Uphold-User-City` string

## Request body

- union[]: An array of RFC 6902 JSON Patch operations.
  - union
    - object
      - `op` 'add' | 'replace' | 'test', required
      - `path` string, required
      - `value` union, required
        - string
        - number
        - boolean
        - object
        - unknown[]
          - unknown
    - object
      - `op` 'move' | 'copy', required
      - `path` string, required
      - `from` string, required
    - object
      - `op` 'remove', required
      - `path` string, required

## Response `200`

Metadata updated.

- object
  - `metadata` Metadata, required

## Other responses

- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Resource not found.
- `412`: Precondition failed.
- `413`: Payload too large.
- `422`: Unprocessable entity.
- `429`: Too Many Requests.

---

[API](https://skmtc.dev/uphold/apis/core-api.md) - [All operations](https://skmtc.dev/uphold/apis/core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uphold/apis/core-api/revisions/6c663575c57a?raw)
