Skip to main content
POST
Agendar una cita

Autorizaciones

Authorization
string
header
requerido

Clave API enviada como token Bearer

Cuerpo

application/json

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
requerido

Your own consultation id. The booking join key: the consultation that fulfils this appointment carries the same id.

Maximum string length: 128
Pattern: ^[a-zA-Z0-9_-]{1,128}$
Ejemplo:

"CONSULT-12345"

start
string
requerido

ISO-8601 start. Required.

Maximum string length: 64
Ejemplo:

"2026-09-01T14:00:00.000Z"

end
string
requerido

ISO-8601 end. Required.

Maximum string length: 64
Ejemplo:

"2026-09-01T14:30:00.000Z"

name
string | null

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.

Required string length: 1 - 500
Ejemplo:

"John Doe"

idCountry
enum<string> | null

Patient document country. Part of the inline identity (see name).

Opciones disponibles:
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
Ejemplo:

"CO"

idType
enum<string> | null

Patient document type. Part of the inline identity (see name).

Opciones disponibles:
CC,
TI,
CE,
RC,
PASSPORT,
RG,
CPF,
OTHER_DOC
Ejemplo:

"CC"

idValue
string | null

Patient document number. Part of the inline identity (see name).

Required string length: 1 - 50
Ejemplo:

"1024567890"

patientId
string | null

Public id of an existing patient (sp_...). One of the three patient references (exactly one required): patientId, internalCode, or the inline identity.

Pattern: ^sp_[a-z0-9]{16}$
Ejemplo:

"sp_a1b2c3d4e5f6g7h8"

internalCode
string | null

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

Required string length: 1 - 128
Ejemplo:

"MRN-000123"

doctorId
string | null

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.

Required string length: 1 - 128
Ejemplo:

"acc_a1b2c3d4e5f6g7h8"

minutesDuration
integer | null

Duration in minutes.

Rango requerido: x >= 1
Ejemplo:

30

serviceType
string | null
Maximum string length: 256
Ejemplo:

"cardiology"

appointmentType
string | null
Maximum string length: 256
Ejemplo:

"follow-up"

reason
string | null
Maximum string length: 2000
Ejemplo:

"Follow-up"

description
string | null
Maximum string length: 2000
Ejemplo:

"Routine check"

medicalRecordConfigurationId
string | null

Public id of a medical record configuration (mrc_...). When present, the consultation context is seeded.

Maximum string length: 128
Ejemplo:

"mrc_a1b2c3d4e5f6g7h8"

scribeSessionModality
enum<string> | null

Modalidades de sesión de scribe soportadas.

Opciones disponibles:
IN_PERSON,
TELEMEDICINE,
DICTATION
Ejemplo:

"IN_PERSON"

notes
string | null
Maximum string length: 10000
Ejemplo:

"Patient reports headache"

pastMedicalHistory
string | null
Maximum string length: 10000
Ejemplo:

"Hypertension"

Respuesta

Respuesta exitosa

A single appointment. id is the stable public id (apt_...).

id
string
requerido

Stable public identifier.

Ejemplo:

"apt_a1b2c3d4e5f6g7h8"

status
string
requerido
Ejemplo:

"booked"

createdAt
string
requerido

ISO-8601 timestamp when the appointment was created.

consultationInternalId
string | null
Ejemplo:

"CONSULT-12345"

start
string | null
Ejemplo:

"2026-09-01T14:00:00.000Z"

end
string | null
Ejemplo:

"2026-09-01T14:30:00.000Z"

minutesDuration
integer | null
Ejemplo:

30

serviceType
string | null
Ejemplo:

"cardiology"

appointmentType
string | null
Ejemplo:

"follow-up"

reason
string | null
Ejemplo:

"Follow-up"

description
string | null
Ejemplo:

"Routine check"