---
title: "Upsert custom data"
method: POST
path: "/v1/patients/{id}/custom_data"
tags: ["Patients"]
---

# Upsert custom data

`POST /v1/patients/{id}/custom_data`

Submit only the fields to set/update; others untouched.

Requires the `patients:write` scope.

## Path parameters

- `id` integer, required

## Request body

- object
  - `custom_data` object[], required
    - `id` integer — Custom field id
    - `datatype` 'string' | 'number' | 'date' | 'time' | 'text' | 'selection' | 'phone' | 'email' | 'address'
    - `value` unknown

## Response `200`

Updated custom data

## Other responses

- `401` — Missing or invalid API key
- `402` — Monthly quota exceeded
- `403` — Insufficient scope, inactive subscription, or the clinic hasn't authorized API access
- `429` — Rate limit exceeded — see Retry-After header
- `502` — Upstream unavailable

---

[API](https://skmtc.dev/yezza/apis/yezza-clinic-api-external-access.md) · [All operations](https://skmtc.dev/yezza/apis/yezza-clinic-api-external-access/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/yezza/yezza-clinic-api-external-access/revisions/fb0639413542/schema)
