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

# Create an appointment

`POST /v1/appointments`

## Request

- Base URL: `https://scribe-api.telepatia.ai`
- URL: `https://scribe-api.telepatia.ai/v1/appointments`
- Auth: HTTP bearer

Create a scheduled consultation (idempotent on `consultationInternalId`).

**Required:** `consultationInternalId`, `start`, `end`, plus exactly one patient reference: `patientId`, `internalCode`, or the full inline identity (`name` + `idCountry` + `idType` + `idValue`).

**Optional:** the remaining scheduling fields (`minutesDuration`, `serviceType`, `appointmentType`, `reason`, `description`) and a template (`medicalRecordConfigurationId`) that seeds the consultation context before the visit.

Returns the appointment with its stable public id (`apt_...`).

## Request body

- AppointmentCreateRequest: Request body for creating (idempotent upsert) an appointment. The patient identity mirrors set-consultation-context: reference an existing patient by `patientId` (sp_) or `internalCode`, or send the inline identity to create one. Send a template (`medicalRecordConfigurationId`) to also seed the consultation context so it is ready before the visit.
  - `consultationInternalId` string, required: Your own consultation id. The booking join key: the consultation that fulfils this appointment carries the same id.
  - `name` string, nullable: Patient full name. Part of the inline identity. Provide the full inline identity (name + idCountry + idType + idValue), or reference an existing patient with patientId or internalCode: exactly one of the three is required.
  - `idCountry` 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CX' | 'CC' | 'CO' | 'KM' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'CD' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IQ' | 'IE' | 'IR' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'XK' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'KP' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PA' | 'PG' | 'PY' | 'CN' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'CG' | 'GM' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'KR' | 'SS' | 'ES' | 'LK' | 'PS' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TH' | 'MK' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'TZ' | 'UM' | 'US' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW': ISO 3166-1 alpha-2 country codes. Mirrors tanjiro's CountryCodes enum.
  - `idType` 'CC' | 'TI' | 'CE' | 'RC' | 'PASSPORT' | 'RG' | 'CPF' | 'OTHER_DOC': Supported patient identification document types.
  - `idValue` string, nullable: Patient document number. Part of the inline identity (see `name`).
  - `patientId` string, nullable: Public id of an existing patient (sp_...). One of the three patient references (exactly one required): patientId, internalCode, or the inline identity.
  - `internalCode` string, nullable: Your own patient code, unique per institution. Looks up an existing patient; when none matches, the inline identity creates one. One of the three patient references (exactly one required).
  - `doctorId` string, nullable: The doctor whose agenda this booking joins: an account publicId (acc_...) or your own internalCode for that account. Omit it to book into the calling key's own agenda. Naming another account requires an institutional key; a doctor key always books for itself.
  - `start` string, required: ISO-8601 start. Required.
  - `end` string, required: ISO-8601 end. Required.
  - `minutesDuration` integer, nullable: Duration in minutes.
  - `serviceType` string, nullable
  - `appointmentType` string, nullable
  - `reason` string, nullable
  - `description` string, nullable
  - `medicalRecordConfigurationId` string, nullable: Public id of a medical record configuration (mrc_...). When present, the consultation context is seeded.
  - `scribeSessionModality` 'IN_PERSON' | 'TELEMEDICINE' | 'DICTATION': Supported scribe session modalities.
  - `notes` string, nullable
  - `pastMedicalHistory` string, nullable

## Response `200`

Successful Response

- AppointmentResponse: A single appointment. `id` is the stable public id (apt_...).
  - `id` string, required: Stable public identifier.
  - `consultationInternalId` string, nullable
  - `status` string, required
  - `start` string, nullable
  - `end` string, nullable
  - `minutesDuration` integer, nullable
  - `serviceType` string, nullable
  - `appointmentType` string, nullable
  - `reason` string, nullable
  - `description` string, nullable
  - `scribeSessionModality` 'IN_PERSON' | 'TELEMEDICINE' | 'DICTATION': Supported scribe session modalities.
  - `medicalRecordConfigurationId` string, nullable: The template the booking opens on. Null when the booking names none, or when the template has been deleted since.
  - `createdAt` string, required: ISO-8601 timestamp when the appointment was created.

## Other responses

- `400`: Bad Request — invalid parameters, validation failures, or missing fields.
- `401`: Unauthorized — missing or invalid API key.
- `403`: Forbidden — the API key is not allowed to perform this operation.
- `404`: Not Found — the requested resource does not exist.
- `409`: Conflict — resource already exists or is in a conflicting state.
- `503`: Service Unavailable — an external dependency is down.

---

[API](https://skmtc.dev/telepatia/apis/scribe-public-api.md) - [All operations](https://skmtc.dev/telepatia/apis/scribe-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/telepatia/apis/scribe-public-api/revisions/be963942e472?raw)
