Server-side APIEndpoints

Endpoints

Every route a server-side key can call, one page each.

Each route below has its own page: what it is for, every parameter, what comes back, and the mistakes that produce a 400.

What every request needs

x-api-key: mk_…
x-end-user-id: <patient id>      # OTP and 🔒 routes only

The API key is the credential — there is nothing to sign — so it belongs on your server and nowhere else. Requests are refused unless they come from an address on the key's IP allowlist. OTP and 🔒 routes also need x-end-user-id, naming the patient the request is for; see OTP-gated routes.

Two things are decided for you and cannot be sent:

  • workspaceId comes from the key. Every route is scoped to the workspace the key is registered against, so a workspaceId in a query string or body is either ignored or overwritten.
  • The admin identity. The gateway calls the Medos core as your workspace's admin, which is why routes that read a patient's own records are scoped server-side rather than by anything you send.

🔒 marks a route that additionally needs an OTP-verified phone, and the same x-end-user-id that verification was made under.

This list is the whole surface

API keys can call these routes and no others. The gateway has routes of its own for the widget that are not on this list; an API key gets a 403 on those, and an unknown path is a 404. Nothing is forwarded on to the Medos core. If you need something that is missing, ask us to open it rather than probing for it.

Appointments

MethodPathWhat it does
GET/v1/appointments/available-slotsBookable slots for a doctor on a date
GET/v1/appointments/doctors/:doctorId/available-slotsSame grid, doctor in the path
POST/v1/appointments/book-appointment 🔒Book a scheduled slot
POST/v1/appointments/book-appointment-unified 🔒Book, buy a pack, or spend one
POST/v1/appointments/reserve-slot 🔒Hold a slot unpaid, optionally with checkout
POST/v1/appointments/confirm-paymentsSettle an online payment on return
POST/v1/appointments/:appointmentId/rescheduleMove to a new slot
PATCH/v1/appointments/:appointmentId/statusChange the appointment's status
POST/v1/appointments/:appointmentId/cancelCancel, with optional refund

Booking without OTP

There is no separate set of paths for this. The 🔒 booking routes above skip the one-time code when you call them with an API key instead of a widget session — see Booking without OTP.

QMS (queue)

MethodPathWhat it does
GET/v1/qms-appointments/doctor/shiftsA doctor's queue shifts for a date
POST/v1/qms-appointments/pre/book 🔒Reserve a token for a future shift
POST/v1/qms-appointments/immediate/book 🔒Take a token in the running queue

Session packs

MethodPathWhat it does
GET/v1/session/packsThe clinic's pack catalog
POST/v1/session/packs 🔒Buy a pack standalone → checkout
POST/v1/session/packs/confirmSettle a pack payment

Patients

MethodPathWhat it does
POST/v1/patients/send-phone-verification-otpSend a verification code
POST/v1/patients/verify-phone-verification-otpVerify, open the gate, return the patient's records
GET/v2/patients/search-by-phone 🔒Patients, active packs and catalog for a phone
PUT/v1/patients/:patientId/basic-detailsEdit name, contact, address, form values

Workspace

MethodPathWhat it does
GET/v2/workspacesThe whole clinic: addresses, doctors, profiles, pricing
GET/v2/workspaces/patient-formThe patient-form schema
PATCH/v2/workspaces/patient-formReplace the schema

Public profiles

MethodPathWhat it does
GET/v1/public-profiles/:profileIdThe one enriched read — slug, gallery, faqs, seo
POST/v1/public-profiles/add-updateCreate or update a profile, with an optional image
DELETE/v1/public-profiles/:profileIdDelete a profile

Staff

MethodPathWhat it does
POST/v1/usersAdd a staff user to the workspace
GET/v1/usersList staff at an address

OTP

MethodPathWhat it does
POST/v1/otp/sendSend a code
POST/v1/otp/verifyVerify it, opening the OTP gate

Other

MethodPathWhat it does
POST/v1/inbox/createFile an enquiry or message, with attachments
GET/v1/healthLiveness. No credentials needed.

Back office (HMS)

For a hospital or clinic system keeping its own records in step with medos. Every route here is API-key only — a widget session is refused — and gated on your plan, one entitlement per operation. See Entitlements, and Acting user for the header every write needs.

Each page carries its own runnable request, so you can try an endpoint on the page that documents it.

Appointment and queue read-back

MethodPathWhat it does
GET/v1/appointments/{appointmentId}Read one appointment back
POST/v1/appointments/searchFiltered appointment list. Answers 200
GET/v1/appointments/schedule-slotsA practitioner's shaped day
GET/v1/qms-appointments/visitsPaged queue history
GET/v1/qms-appointments/day-visitsOne day's queue
GET/v1/qms-appointments/shift/statusWhere the queue has reached
GET/v1/qms-appointments/{id}One queue visit

Patients

MethodPathWhat it does
GET/v1/patients/search-by-mrnFind a patient by medical record number
GET/v1/patients/search-by-emailFind a patient by email
GET/v1/patientsThe workspace roster. Granted separately
GET/v1/patients/{patientId}One patient
GET/v1/patients/{patientId}/visitsVisit history
POST/v1/patientsCreate or update a patient

Clinical records

MethodPathWhat it does
GET/v1/prescriptions/{id}One prescription
POST/v1/prescriptionsWrite a prescription
PATCH/v1/prescriptions/{id}Amend one
GET/v1/prescriptions/{appointmentId}/pdfThe rendered PDF. Keyed by appointment
GET/v1/patients/{patientId}/prescriptionsA patient's, for given appointments
POST/v1/patients/{patientId}/vitalsRecord vitals
DELETE/v1/patients/{patientId}/vitals/{vitalId}Remove a reading
POST/v1/patients/{patientId}/medical-historyAdd medical history
GET/v1/patients/{patientId}/documentsDocuments, with presigned urls
DELETE/v1/patients/{patientId}/documents/{documentId}Remove a document
GET/v1/medicines/searchMedicine catalogue

Locations and configuration

MethodPathWhat it does
GET/v1/addressesLocations
GET/v1/addresses/{addressId}/roomsRooms at a location
GET/v1/addresses/{addressId}/follow-up-policyFollow-up rules
GET/v1/doctorsPractitioners, and their medos user ids
GET/v1/practitioner-shiftsWho is working, where, when
GET/v1/appointment-configsScheduled-appointment configuration
GET/v1/qms-configsQueue configuration
GET/v1/booking-policyBooking windows and cancellation rules
GET/v2/workspaces/payment-methodsWhat the clinic accepts

Not exposed, by decision

The service and price list (/v1/offerings) is deliberately absent. Upstream filters it by the user who created each offering rather than by workspace, so served through an API key it would return an arbitrary subset of the clinic's catalogue — a silently incomplete price list is worse than none. It needs a change on the medos side first.

Document upload is a multipart endpoint and needs its own size and streaming policy; listing and deleting ship first. Consultation sessions (notes and audio) are not exposed either: consultation audio is the most sensitive payload in medos, and it deserves a deliberate decision rather than arriving as part of a batch.

There are no outbound webhooks. A cancellation made by clinic staff in the medos dashboard reaches you when you next search, so poll on a schedule rather than waiting for a callback.

Conventions used on every page

Base URLhttps://api.medos.one
IDsNumeric and workspace-scoped. addressId is a workspace address (a clinic location), not a patient address.
DatesYYYY-MM-DD in the clinic's own timezone
TimesPrefer the offset-bearing fromDateTimeIso / toDateTimeIso. The HH:mm pair is deprecated and ambiguous outside India.
Unknown fieldsRejected, not ignored — a typo'd body key is a 400 — except on POST /v1/patients, which drops them silently.
ErrorsAuth failures are listed in Errors; business errors come from the Medos core unchanged.

On this page