> ## 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. # Save device information > Save the device used in the current navigation session.
This API can be invoked to update the device information at any application start with a valid token. In case the device with the same deviceId is already present, it is merged with the information included in the request body (null and read-only properties are discarded). ## OpenAPI ````json POST /identity/users/me/devices { "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/me/devices": { "post": { "summary": "Save device information", "description": "Save the device used in the current navigation session.
This API can be invoked to update the device information at any application start with a valid token. In case the device with the same deviceId is already present, it is merged with the information included in the request body (null and read-only properties are discarded). ", "tags": [ "USERS" ], "parameters": [ { "$ref": "#/components/parameters/tenantNameHeader" } ], "requestBody": { "description": "The device information.", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Device" } } } }, "responses": { "200": { "description": "Successful updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Device" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/NotAuthenticated" }, "403": { "$ref": "#/components/responses/NotAuthorized" }, "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": { "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" } } } } } }, "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" } } } } ````