> ## Documentation Index > Fetch the complete documentation index at: https://learn.servitly.com/llms.txt > Use this file to discover all available pages before exploring further. # Update a user > Update a user.

Required permissions: READ_USER, WRITE_USER.
Optional permissions: READ_USER_PERMISSIONS, WRITE_USER_PERMISSIONS, WRITE_USER_STATUS, WRITE_USER_NOTIFICATION_SETTINGS. ## OpenAPI ````json PUT /identity/users/{userId} { "openapi": "3.1.0", "info": { "title": "Servitly DPS API", "version": "1.0.0" }, "servers": [ { "url": "https://api.servitly-sandbox.com", "description": "[AWS SANDBOX]" }, { "url": "https://api.servitly.com", "description": "[AWS PRODUCTION Ireland]" }, { "url": "https://api-ap.servitly.com", "description": "[AWS Hong Kong]" }, { "url": "https://azapi.servitly-dev.com", "description": "[AZURE DEV Frankfurt]" }, { "url": "https://azapi.servitly-staging.com", "description": "[AZURE STAGING Frankfurt]" }, { "url": "https://azapi.servitly.com", "description": "[AZURE PRODUCTION Frankfurt]" } ], "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "ACTIONS" }, { "name": "ALERTS" }, { "name": "API GATEWAY" }, { "name": "AUTHENTICATION" }, { "name": "AUTHORIZATIONS" }, { "name": "CUSTOMERS" }, { "name": "DATA IMPORT / EXPORT" }, { "name": "EVENTS" }, { "name": "LOCATIONS" }, { "name": "MAINTENANCE" }, { "name": "MAPPING" }, { "name": "METRIC DATA" }, { "name": "MOBILE APP" }, { "name": "ORGANIZATION" }, { "name": "PARTNERS" }, { "name": "PRODUCT MODELS" }, { "name": "SPARE PARTS" }, { "name": "STATISTICS" }, { "name": "STORE ORDERS" }, { "name": "SUBSCRIPTIONS" }, { "name": "SUBSCRIPTIONS (OLD)" }, { "name": "THING CONTROL" }, { "name": "THING DEFINITIONS" }, { "name": "THING MANAGEMENT" }, { "name": "THINGS" }, { "name": "TICKETS" }, { "name": "USER TYPES" }, { "name": "USERS" }, { "name": "WORK SESSIONS" } ], "paths": { "/identity/users/{userId}": { "put": { "summary": "Update a user", "description": "Update a user.

Required permissions: READ_USER, WRITE_USER.
Optional permissions: READ_USER_PERMISSIONS, WRITE_USER_PERMISSIONS, WRITE_USER_STATUS, WRITE_USER_NOTIFICATION_SETTINGS.", "tags": [ "USERS" ], "parameters": [ { "$ref": "#/components/parameters/tenantNameHeader" }, { "in": "path", "name": "userId", "required": "true", "schema": { "$ref": "#/components/schemas/ObjectId" }, "description": "The id of the user to update." } ], "requestBody": { "description": "The details of the user being updated.", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "responses": { "200": { "description": "Successfully updated." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/NotAuthenticated" }, "403": { "$ref": "#/components/responses/NotAuthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/ApiLimit" }, "500": { "$ref": "#/components/responses/IntError" } } } } }, "components": { "parameters": { "tenantNameHeader": { "in": "header", "name": "X-Servitly-Tenant", "required": "true", "schema": { "type": "string", "example": "{{tenantName}}" }, "description": "The name of the tenant (e.g. acme)." } }, "schemas": { "ObjectId": { "type": "string", "example": "abcd1234", "minimum": "1", "description": "The object identifier (e.g. 6620e4bb42541977c406b984)." }, "User": { "type": "object", "description": "The bean providing user details.", "properties": { "id": { "type": "string", "description": "The user object identifier.", "readOnly": "true" }, "email": { "type": "string", "description": "The user registration email address." }, "firstName": { "type": "string", "description": "The user first name." }, "lastName": { "type": "string", "description": "The user last name." }, "devices": { "readOnly": "true", "type": "array", "items": { "$ref": "#/components/schemas/Device" }, "description": "The list of devices used by the user to access the application REST API." }, "userTypeName": { "description": "The name of the user type associated with the user.", "type": "string", "readOnly": "true" }, "organizationId": { "description": "The organization identifier the user belong to (required only for creation).", "type": "string" }, "partnerId": { "description": "The partner identifier the user belong to (required only for creation).", "type": "string" }, "customerId": { "description": "The customer identifier the user belong to (required only for creation).", "type": "string" }, "locationId": { "description": "The location identifier the user belong to (required only for creation).", "type": "string" }, "timezone": { "type": "string", "description": "The timezone used for date/times localization (e.g. Europe/Rome)." }, "language": { "type": "string", "description": "The language used for page localization (e.g. EN, ES)." }, "termsOfServiceAcceptedTimestamp": { "description": "The last timestamp the user has accepted the terms of service.", "type": "integer", "format": "int64", "readOnly": "true" }, "privacyPolicyAcceptedTimestamp": { "description": "The last timestamp the user has accepted the privacy policy.", "type": "integer", "format": "int64", "readOnly": "true" }, "firstAccessTimestamp": { "description": "The timestamp the user has accessed the application the first time.", "type": "integer", "format": "int64", "readOnly": "true" }, "lastAccessTimestamp": { "description": "The timestamp the user has accessed the application the last time.", "type": "integer", "format": "int64", "readOnly": "true" }, "creationTimestamp": { "type": "integer", "format": "int64", "description": "The timestamp at which the object was created." }, "alertActivatedInformationalEmailEnabled": { "description": "The flag indicating whether an email must be sent on informational alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedInformationalEmailEnabled": { "description": "The flag indicating whether an email must be sent on informational alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedWarningEmailEnabled": { "description": "The flag indicating whether an email must be sent on warning alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedWarningEmailEnabled": { "description": "The flag indicating whether an email must be sent on warning alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedCriticalEmailEnabled": { "description": "The flag indicating whether an email must be sent on critical alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedCriticalEmailEnabled": { "description": "The flag indicating whether an email must be sent on critical alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedEmergencyEmailEnabled": { "description": "The flag indicating whether an email must be sent on emergency alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedEmergencyEmailEnabled": { "description": "The flag indicating whether an email must be sent on emergency alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedInformationalSmsEnabled": { "description": "The flag indicating whether an SMS must be sent on informational alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedInformationalSmsEnabled": { "description": "The flag indicating whether an SMS must be sent on informational alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedWarningSmsEnabled": { "description": "The flag indicating whether an SMS must be sent on warning alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedWarningSmsEnabled": { "description": "The flag indicating whether an SMS must be sent on warning alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedCriticalSmsEnabled": { "description": "The flag indicating whether an SMS must be sent on critical alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedCriticalSmsEnabled": { "description": "The flag indicating whether an SMS must be sent on critical alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedEmergencySmsEnabled": { "description": "The flag indicating whether an SMS must be sent on emergency alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedEmergencySmsEnabled": { "description": "The flag indicating whether an SMS must be sent on emergency alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedInformationalPushEnabled": { "description": "The flag indicating whether a push notification must be sent on informational alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedInformationalPVoicenabled": { "description": "The flag indicating whether a push notification must be sent on informational alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedWarningPushEnabled": { "description": "The flag indicating whether a push notification must be sent on warning alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedWarningPushEnabled": { "description": "The flag indicating whether a push notification must be sent on warning alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedCriticalPushEnabled": { "description": "The flag indicating whether a push notification must be sent on critical alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedCriticalPushEnabled": { "description": "The flag indicating whether a push notification must be sent on critical alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedEmergencyPushEnabled": { "description": "The flag indicating whether a push notification must be sent on emergency alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedEmergencyPushEnabled": { "description": "The flag indicating whether a push notification must be sent on emergency alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedInformationalVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on informational alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedInformationalVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on informational alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedWarningVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on warning alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedWarningVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on warning alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedCriticalVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on critical alert activation.", "type": "boolean", "deprecated": "true" }, "alertClearedCriticalVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on critical alert clearing.", "type": "boolean", "deprecated": "true" }, "alertActivatedEmergencyVoiceEnabled": { "description": "The flag indicating whether a phone call must be made on emergency alert activation.", "type": "boolean", "deprecated": "true" } } }, "Device": { "type": "object", "description": "Details about the device on which the API client is currently running (e.g., PC, Mobile Device).
When created/updated, you need to provide the mandatory properties. Please note that, for mobile apps, you must specify all properties, as they are required for managing push notifications. ", "properties": { "deviceId": { "type": "string", "description": "The unique identifier which is used to match the device among different logins.", "mandatory": "true", "example": "4c60d031f4d07c01" }, "appId": { "type": "string", "description": "The identifier/package-name of the mobile app used to log in.", "example": "com.acme.dps-mobile" }, "os": { "type": "string", "description": "The device operating system.", "example": "Android_9, iOS_11" }, "model": { "type": "string", "description": "The mobile device model.", "example": "Pixel 10" }, "platform": { "type": "string", "enum": [ "Android", "iOS" ], "description": "The mobile platform name.", "example": "Android" }, "browser": { "type": "string", "description": "The information of the browser (navigator.userAgent) used to access the DPS.
An optional property useful for debugging purposes. " }, "notificationDeviceId": { "type": "string", "description": "The device notification identifier obtained from the platform provider during the device registration for notifications.", "example": "4w3rY1qRd8:APA91bCue8jas2h64ENFiTePAB5GZ1tK....." }, "token": { "type": "string", "description": "The refresh token associated to this decice.", "readOnly": "true", "example": "61cae9d2-704c-3cc7-a030-32b24a367a9e" } } } }, "responses": { "BadRequest": { "description": "Request data not valid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Bad request" } } } } } }, "NotAuthenticated": { "description": "User not authenticated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authenticated" } } } } } }, "NotAuthorized": { "description": "User not authorized.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "User not authorized" } } } } } }, "NotFound": { "description": "Resource was not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Resource not found" } } } } } }, "ApiLimit": { "description": "API call rate limit exceeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "API call rate limit exceeded" } } } } } }, "IntError": { "description": "Internal server error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The error response.", "example": "Internal Server Error" } } } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } } ````