Create a user
Create a user inside the organization identified by the Bearer token.
SDK method: client.users.create() in TypeScript and Python. client is the base client, which needs no user ID.
/users/Create a user inside the organization identified by the Bearer token.
All fields are optional at creation time. firstName, lastName, dateOfBirth, and phoneNumber are required before appointment booking. When provided, dateOfBirth must represent an age from 18 through 120. The response lists any fields still needed for booking in missingAppointmentFields; add them later with PATCH /users/. This operation requires an organization Bearer token.
Authorization
HTTPBearer In: header
Header Parameters
Unique key for safely retrying this mutation for 24 hours. Reuse the same key only with the same request payload.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for a user in your organization. All fields are optional at creation time. firstName, lastName, dateOfBirth, and phoneNumber are required later for appointment booking. When provided, dateOfBirth must represent an age from 18 through 120.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/users/" \ -H "Content-Type: application/json" \ -d '{}'{ "code": "success", "message": "Request successful", "data": { "id": "string", "createdAt": "2019-08-24T14:15:22Z", "firstName": "string", "lastName": "string", "dateOfBirth": "2019-08-24", "email": "string", "phoneNumber": "string", "sex": "male", "appointmentDemographicsComplete": true, "missingAppointmentFields": [ "string" ] }}Get user details GET
Retrieve the user account for the authenticated organization.
Update organization-scoped user details PATCH
Update the active user identified by `X-Doctronic-User-ID` within the authenticated organization's realm. Only supplied fields change; omitted fields are preserved and explicit null clears a field. Empty/blank names or phone numbers are rejected. Email/phone conflicts never merge or transfer accounts. Organization servers must authenticate their member and derive this user ID server-side.