---
title: "Create an appointment (book)"
method: POST
path: "/v1/appointments"
tags: ["Appointments"]
---

# Create an appointment (book)

`POST /v1/appointments`

Requires the `appointments:write` scope.

## Request body

- object
  - `date` string, date, required — YYYY-MM-DD
  - `time` string, required — HH:MM:SS (seconds required — '10:30' is rejected). `until` is computed from the service duration.
  - `provider` integer, required — Provider id (from service.providers)
  - `service` integer, required — Service id (singular; not product id)
  - `patient` integer — Existing patient id (use this OR lead)
  - `lead` object — New person (auto-creates a patient). name + phone + ic required.
    - `name` string
    - `phone` string
    - `ic` string
    - `email` string
    - `status` string
    - `remarks` string
  - `preliminary_questions` object[]
    - `question_id` integer
    - `answer` string
  - `ignore_rules` string[]

## Response `201`

The booked appointment

## Other responses

- `400` — Validation / slot clash (human-readable)
- `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)
