Saltar al contenido principal
POST
Agendar una cita

Autorizaciones

Authorization
string
header
requerido

API key enviada como token Bearer

Cuerpo

application/json

Cuerpo de solicitud para crear una cita (upsert idempotente).

La identidad del paciente funciona igual que en set-consultation-context: referencia un paciente existente por patientId (sp_) o internalCode, o envía la identidad inline para crear uno. Envía una plantilla (medicalRecordConfigurationId) para precargar también el contexto de consulta, de modo que esté listo antes de la visita.

consultationInternalId
string
requerido

Tu propio id de consulta. Es la clave que une la reserva: la consulta que cumple esta cita lleva el mismo id.

Maximum string length: 128
Pattern: ^[A-Za-z0-9_-]{1,128}$
Ejemplo:

"CONSULT-12345"

start
string
requerido

Inicio en ISO-8601. Obligatorio.

Maximum string length: 64
Ejemplo:

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

end
string
requerido

Fin en ISO-8601. Obligatorio.

Maximum string length: 64
Ejemplo:

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

name
string | null

Nombre completo del paciente. Forma parte de la identidad inline. Envía la identidad inline completa (name + idCountry + idType + idValue) o referencia un paciente existente con patientId o internalCode: se requiere exactamente una de las tres opciones.

Required string length: 1 - 500
Ejemplo:

"John Doe"

idCountry
enum<string> | null

País del documento del paciente. Forma parte de la identidad inline (consulta 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

Tipo de documento del paciente. Forma parte de la identidad inline (consulta name).

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

"CC"

idValue
string | null

Número de documento del paciente. Forma parte de la identidad inline (consulta name).

Required string length: 1 - 50
Ejemplo:

"1024567890"

patientId
string | null

Id público de un paciente existente (sp_...). Una de las tres referencias al paciente (se requiere exactamente una): patientId, internalCode o la identidad inline.

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

"sp_a1b2c3d4e5f6g7h8"

internalCode
string | null

Tu propio código de paciente, único por institución. Busca un paciente existente; si ninguno coincide, la identidad inline crea uno. Una de las tres referencias al paciente (se requiere exactamente una).

Required string length: 1 - 128
Ejemplo:

"MRN-000123"

doctorId
string | null

El médico a cuya agenda se agrega esta reserva: el publicId de una cuenta (acc_...) o tu propio internalCode para esa cuenta. Omítelo para reservar en la agenda de la API key que hace la llamada. Indicar otra cuenta requiere una API key institucional; una API key de médico siempre agenda para sí misma.

Required string length: 1 - 128
Ejemplo:

"acc_a1b2c3d4e5f6g7h8"

minutesDuration
integer | null

Duración en minutos.

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

Id público de una configuración de historia clínica (mrc_...). Si está presente, se precarga el contexto de consulta.

Maximum string length: 128
Ejemplo:

"mrc_a1b2c3d4e5f6g7h8"

scribeSessionModality
enum<string> | null

Modalidades de sesión de scribe admitidas.

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

Una cita. id es el id público estable (apt_...).

id
string
requerido

Identificador público estable.

Ejemplo:

"apt_a1b2c3d4e5f6g7h8"

status
string
requerido
Ejemplo:

"booked"

createdAt
string
requerido

Fecha y hora ISO-8601 en que se creó la cita.

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"

scribeSessionModality
enum<string> | null

Cómo se realiza la consulta. Null en una reserva creada antes de que existiera este campo, que la app de Scribe trata como presencial.

Opciones disponibles:
IN_PERSON,
TELEMEDICINE,
DICTATION
Ejemplo:

"TELEMEDICINE"

medicalRecordConfigurationId
string | null

La plantilla con la que se abre la reserva. Null cuando la reserva no indica ninguna o cuando la plantilla se eliminó después.

Ejemplo:

"mrc_a1b2c3d4e5f6g7h8"