Server-side APIEndpointsStaff

Create a staff user

Add a member of staff to the workspace directly, without an invitation email.

POST /v1/users

Creates 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

FieldTypeRequiredDescription
firstNamestringYesMust not be blank.
middleNamestringNo
lastNamestringNo
emailstringYesMust be a valid address, and unique in the workspace. It is the account's identity.
countryCodestringNoDial code with the +.
phoneNumberstringNo
roleIdnumberYesThe role to grant. From Workspace Settings → Roles in the dashboard.
workspaceIdnumberYesYour workspace.
addressIdsnumber[]YesThe locations this person works at. At least one.

Try it

POST/v1/users

Body

Request
POST /v1/users
{
  "addressIds": [
    1
  ]
}
to https://api.medos.one
Use 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

StatusCause
400firstName blank, email missing or malformed, roleId absent, or addressIds empty.
4xxAn 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.

On this page