Update a staff member
Change a staff member's details, role or public profile from your own system.
Changes a person in your workspace: their details, their role, the public profile patients see on your clinic site, or any mix of the three in one call.
API-key only, gated on devapi_users_update.
Parameters
Path parameters
staffIdstringrequiredExample: MDU_K7Q2XB4NZP91Their MDU_… staff id, from POST /v1/staff or GET /v1/doctors.
Headers
x-api-keystringrequiredExample: mk_…Your Developer API key. Server-side only.
X-Acting-User-IdstringExample: MDU_A1B2C3D4E5F6The staff member the call is attributed to, as an MDU_… id. Omit it to attribute the call to the workspace admin.
Content-TypestringrequiredExample: application/jsonThe body is JSON. Anything else is a 415.
Body
firstNamestringUp to 100 characters.
middleNamestringUp to 100 characters.
lastNamestringExample: RaoUp to 100 characters.
countryCodestringExample: +91With phoneNumber: both or neither.
phoneNumberstringExample: 98765432104 to 15 digits, without the country code.
gender"MALE" | "FEMALE" | "OTHER"enumRequired to publish a profile.
dateOfBirthstringExample: 1985-04-12YYYY-MM-DD, not in the future.
rolestringExample: DOCTORA role by name, not ADMIN. DOCTOR or ALLIED_PROFESSIONAL is added wherever they work; any other replaces their role at addressIds.
addressIdsstringWith a role other than DOCTOR or ALLIED_PROFESSIONAL: the locations it applies at.
profilestringExample: {"prefix":"Dr.","specialization":"Dermatology","registrationNumber":"KMC-12345"}The public profile, published on the clinic's site. DOCTOR and ALLIED_PROFESSIONAL only; a doctor's needs registrationNumber.
- Send only what changes. Anything you leave out stays as it is, and an
empty body is a
400. staffIdis theMDU_…id fromPOST /v1/stafforGET /v1/doctors. An id outside your workspace is a404.emailcannot be changed here. Medos changes an email only through a link sent to the new address, in the Medos app.- Roles work as they do in the Medos app:
DOCTORorALLIED_PROFESSIONALis added wherever they already work, and their other roles stay.addressIdsis not used with it.- Any other role replaces their role at the
addressIdsyou send, which are then required. ADMINcannot be granted, and an admin's role cannot be changed through the API.
profileis published straight away. They must be aDOCTORorALLIED_PROFESSIONAL, already or by this same call'srole. If you send nogender, the one already on their record is used.
Responses
The 200 body is the member after the change, in the same shape as
POST /v1/staff. profile is the profile this call published, or null.
Several changes, several steps
Details, role and profile are saved in that order, one step each. If a later step fails, the earlier ones stay saved. Correct the request and send the part that failed again.