---
title: "Create a custom field"
method: POST
path: "/v1/patient_custom_fields"
tags: ["Custom fields"]
---

# Create a custom field

`POST /v1/patient_custom_fields`

Requires the `patient_custom_fields:write` scope.

## Request body

- object
  - `field_name` string, required
  - `datatype` 'string' | 'number' | 'date' | 'time' | 'text' | 'selection' | 'phone' | 'email' | 'address', required
  - `status` string
  - `order` integer
  - `extra_options` object — For 'selection': { choices: [...] }

## Response `201`

Created

## 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)
