Skip to content

Update mobile device

PUT/devices/{id}

Mobile API · Devices

Update a mobile device.

Required permissionmobile.device:update

Parameters

Name In Type Required Description
id path string (uuid) Yes Unique object identifier.
X-Tenant-ID header string (uuid) Yes Tenant ID.
fields query array of string No The fields to return in a partial response.
view query string No Type of view to be returned in response.
Must be one of: basic, summary, full.

Request body

Content type: application/json

Request body fields

namestringrequired
Name of the mobile device.
Must be at most 255 characters long.
descriptionstring
Description of the mobile device.
Must be at most 500 characters long.
phoneNumberstring
Phone number of the user assigned to the mobile device.
Must match the pattern ^(\+?\d+|.{0})$. Must be at most 50 characters long.
emailstring
The email address assigned to the device if there's no user assigned.
Must be at most 255 characters long.
assignedPersonIdstring (uuid)
ID of the user assigned to the device.
ownershipTypestring (enum)required
The ownership type of the mobile device.
Must be one of: corporate, employee.
logLevelstring (enum)
The verbosity of the Sophos Mobile app logging.
Must be one of: error, warn, info, debug, trace.
groupIdstring (uuid)required
ID of a device group.

Request samples

curl -X PUT "https://api-<data-region>.central.sophos.com/mobile/v1/devices/<id>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
  \"name\": \"My device\",
  \"ownershipType\": \"corporate\",
  \"groupId\": \"1c9146a4-43f9-43c7-ae39-8f7708dfa65f\"
}"

import requests

response = requests.put(
    "https://api-<data-region>.central.sophos.com/mobile/v1/devices/<id>",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Tenant-ID": "<tenant-id>",
        "Content-Type": "application/json",
    },
    json={   'name': 'My device',
    'ownershipType': 'corporate',
    'groupId': '1c9146a4-43f9-43c7-ae39-8f7708dfa65f'},
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Tenant-ID" = "<tenant-id>"
    "Content-Type" = "application/json"
}
$body = '{
  "name": "My device",
  "ownershipType": "corporate",
  "groupId": "1c9146a4-43f9-43c7-ae39-8f7708dfa65f"
}'
Invoke-RestMethod -Method PUT -Uri "https://api-<data-region>.central.sophos.com/mobile/v1/devices/<id>" -Headers $headers -Body $body -ContentType "application/json"

package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    req, err := http.NewRequest("PUT", "https://api-<data-region>.central.sophos.com/mobile/v1/devices/<id>", strings.NewReader(`{
  "name": "My device",
  "ownershipType": "corporate",
  "groupId": "1c9146a4-43f9-43c7-ae39-8f7708dfa65f"
}`))
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Tenant-ID", "<tenant-id>")
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api-<data-region>.central.sophos.com/mobile/v1/devices/<id>", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "name": "My device",
  "ownershipType": "corporate",
  "groupId": "1c9146a4-43f9-43c7-ae39-8f7708dfa65f"
}),
});
const data = await response.json();
console.log(data);

Responses

200 — The updated mobile device.

Response fields

idstring (uuid)required
ID of the mobile device.
tenantobjectrequired
Tenant this resource belongs to.
Show child attributesHide child attributes
idstring (uuid)required
namestring
availableActionsarray of string
List of actions that can be performed for the mobile device.
namestring
Name of the mobile device.
Must be at most 255 characters long.
descriptionstring
Description of the mobile device.
Must be at most 500 characters long.
phoneNumberstring
Phone number of the user assigned to the mobile device.
Must match the pattern ^(\+?\d+|.{0})$. Must be at most 50 characters long.
emailstring
The email address assigned to the device if there's no user assigned.
Must be at most 255 characters long.
assignedPersonobject
Assigned user to a mobile device.
Show child attributesHide child attributes
idstring (uuid)required
The user's ID in Sophos Central.
namestring
The user's name.
Must be at most 255 characters long.
emailstring
The user's email address.
Must be at most 255 characters long.
healthStateobject
Health status of a mobile device.
Show child attributesHide child attributes
statestring (enum)
The health status of a mobile device.
Must be one of: green, amber, red.
modestring (enum)
The health status mode.
Must be one of: automatic, manual.
ownershipTypestring (enum)
The ownership type of the mobile device.
Must be one of: corporate, employee.
createdByobject
Principal reference.
Show child attributesHide child attributes
idstring (uuid)
Principal ID.
typestring (enum)required
Principal type.
Must be one of: user, service, system.
accountIdstring (uuid)
Account ID.
accountTypestring (enum)
Account type.
Must be one of: partner, tenant, organization.
namestring
Principal name or email.
updatedByobject
Principal reference.
Show child attributesHide child attributes
idstring (uuid)
Principal ID.
typestring (enum)required
Principal type.
Must be one of: user, service, system.
accountIdstring (uuid)
Account ID.
accountTypestring (enum)
Account type.
Must be one of: partner, tenant, organization.
namestring
Principal name or email.
createdAtstring (date-time)
The time when the device was created.
updatedAtstring (date-time)
The time when the device was last updated.
lastSeenAtstring (date-time)
The last time the device contacted Sophos Mobile.
smcAppLastSeenAtstring (date-time)
The last sync time of the Sophos Mobile Control app.
ixmAppLastSeenAtstring (date-time)
The last sync time of the Intercept X for Mobile app.
complianceobject
Mobile device compliance status.
Show child attributesHide child attributes
compliantbooleanrequired
Whether the device is compliant.
severitystring (enum)
The highest severity of a compliance violation.
Must be one of: low, medium, high.
modelNamestring
Model name of the mobile device.
Must be at most 255 characters long.
externalIdstring
External ID of the mobile device.
Must be at most 255 characters long.
managementTypestring
The management type of the mobile device.
Must be at most 255 characters long.
supervisedboolean
Whether the device is supervised.
managedStatestring (enum)
The management status of a mobile device.
Must be one of: notManaged, managed, decommissioned, checkedOut, wiped, enrolling.
logLevelstring (enum)
The verbosity of the Sophos Mobile app logging.
Must be one of: error, warn, info, debug, trace.
osobject
Mobile operating system object.
Show child attributesHide child attributes
idstring (uuid)required
ID of the operating system.
versionstringrequired
The operating system version.
namestringrequired
The name of the operating system.
platformstring (enum)required
The device platform, i.e. the operating system.
Must be one of: iOS, macOS, android, chrome, windows.
majorVersionstring
OS major version.
minorVersionstring
OS minor version.
patchVersionstring
OS patch version.
deviceGroupobject
A device group reference.
Show child attributesHide child attributes
idstring (uuid)required
Unique ID of the device group.
namestring
The device group name.
scanResultSummaryobject
Overview of IXM scan results.
Show child attributesHide child attributes
lastScannedAtstring (date-time)
The time of the scan.
suspiciousCountinteger
The number of suspicious elements.
maliciousCountinteger
The number of malicious elements.
puaCountinteger
The number of potentially unwanted elements.
lowReputationCountinteger
The number of low reputation elements.

Errors

Status Meaning
400 Invalid request.
401 Unauthorized.
403 Forbidden.
404 Request contains no object.
409 Conflicting modification.
429 Too many requests. See Retry-After header.
500 Internal server error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "id": "c9c9b03c-5cf7-4fe1-93bb-246afc9044d2",
  "tenant": {
    "id": "b8a75c7d-7492-4009-9f95-8c815551dc55",
    "name": "The name of the tenant"
  },
  "availableActions": [
    "unenroll",
    "sync",
    "get-logs",
    "send-message"
  ],
  "assignedPerson": {
    "id": "9f059011-84c7-4849-ae2e-d0563743e485",
    "internalId": "670e793648a7e63f0443ba93",
    "name": "Peter Smith",
    "email": "peter.smith@example.org"
  },
  "name": "My device",
  "compliance": {
    "compliant": false,
    "severity": "high"
  },
  "managedState": "managed",
  "ownershipType": "corporate",
  "healthState": {
    "state": "amber",
    "mode": "automatic"
  },
  "managementType": "ixm",
  "os": {
    "id": "c9c9b03c-5cf7-4fe1-93bb-246afc9044d2",
    "version": "12.0.1",
    "name": "iOS 12.0.1",
    "platform": "ios",
    "majorVersion": 12,
    "minorVersion": 0,
    "patchVersion": 1
  }
}

See the guide for a narrative walkthrough of this API.