Docs

Update organization-scoped user details

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.

SDK method: patient.users.update() in TypeScript and Python. patient is the user-scoped client, client.forUser(userId) or client.for_user(user_id).

PATCH/users/

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.

The user ID and existing chats remain unchanged. Corrections apply to the profile and future bookings, not previously booked visits or historical clinical content. Return to the same completed chat to book after correcting missing demographics; address, chat readiness and availability are still checked. This does not verify ownership of a phone/email or change the supported-phone policy.

Retry temporary 503s after Retry-After, keeping the same Idempotency-Key, user ID and request body. Replayed responses reflect the original update; GET /users/ returns the current profile.

Authorization

HTTPBearer XDoctronicUserID
AuthorizationBearer <token>

In: header

X-Doctronic-User-ID<token>

Doctronic user ID returned as data.id by POST /users/. This value identifies the user in your organization scope; it is not an API token.

In: header

Header Parameters

Idempotency-Key?string

Unique key for safely retrying this mutation for 24 hours. Reuse the same key only with the same request payload.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Only explicitly supplied fields change; null clears a field.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "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"    ]  }}