Create a staff user
Add a member of staff to the workspace directly, without an invitation email.
POST /v1/usersCreates a staff account and attaches it to one or more locations, skipping the invitation flow — for provisioning from an HR system or an internal admin tool.
Body
| Field | Type | Required | Description |
|---|---|---|---|
firstName | string | Yes | Must not be blank. |
middleName | string | No | |
lastName | string | No | |
email | string | Yes | Must be a valid address, and unique in the workspace. It is the account's identity. |
countryCode | string | No | Dial code with the +. |
phoneNumber | string | No | |
roleId | number | Yes | The role to grant. From Workspace Settings → Roles in the dashboard. |
workspaceId | number | Yes | Your workspace. |
addressIds | number[] | Yes | The locations this person works at. At least one. |
Try it
/v1/usersBody
POST /v1/users{
"addressIds": [
1
]
}https://api.medos.oneUse a dedicated test key, and put your browser's address on its allowlist
A Developer API key authenticates on its own, so it only works from the addresses registered against it — and this page calls from your browser, not your servers. Unless your own public address is on the list you get a 403 naming it, which is the allowlist doing its job. Your browser may also reach us over IPv6 even when your server does not, so the address in the error is often not the one you expected. The key here is kept in memory only and never written to storage, but create a test key for it and deactivate that key when you are done.
Request
curl -sX POST "https://api.medos.one/v1/users" \
-H "x-api-key: $MEDOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Nikhil",
"lastName": "Shetty",
"email": "nikhil@clinic.example.com",
"countryCode": "+91",
"phoneNumber": "9812300011",
"roleId": 2,
"workspaceId": 1,
"addressIds": [1, 2]
}'Response
The created user's profile, in the shape
list staff returns for each
row — including the id you would use as doctorId if the role is a
practitioner one.
Common failures
| Status | Cause |
|---|---|
400 | firstName blank, email missing or malformed, roleId absent, or addressIds empty. |
4xx | An email that already has an account here, a roleId the workspace has not configured, or an address outside it. The upstream message names which. |
These sit on Medos's internal staff surface
The endpoints behind this route and list staff are internal ones, exposed here for integrations that provision staff. They are the likeliest part of this surface to gain a per-customer access check, so tell us if you depend on them.
Creating a user does not create a bookable doctor
A practitioner also needs consultation fees, availability and a location mapping before slots appear for them. Those are configured in the dashboard, not on this surface.