Skip to content

Set up IXM auto-enrollm

POST/settings/ixm-auto-enrollment

Mobile API · Settings

Create settings for Intercept X for Mobile auto enrollments. A post with the same values results in an error, as it is already configured.

Required permissionmobile.settings:create

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.

Request body

Content type: application/json

Request body fields

deviceGroupIdstring (uuid)required
ID of the device group.
ownershipTypestring (enum)required
The ownership type of the mobile device.
Must be one of: corporate, employee.
androidPolicyIdstring (uuid)
ID of the android security policy.
iosPolicyIdstring (uuid)
ID of the iOS security policy.

Request samples

curl -X POST "https://api-<data-region>.central.sophos.com/mobile/v1/settings/ixm-auto-enrollment" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
  \"deviceGroupId\": \"d602034d-a509-4c93-ade0-61f5b496c963\",
  \"ownershipType\": \"corporate\",
  \"androidPolicyId\": \"8ef59086-c490-4c73-a7ed-6c17e4a417ad\",
  \"iosPolicyId\": \"f78afaa2-91d5-4f1d-8696-399af29a3941\"
}"

import requests

response = requests.post(
    "https://api-<data-region>.central.sophos.com/mobile/v1/settings/ixm-auto-enrollment",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Tenant-ID": "<tenant-id>",
        "Content-Type": "application/json",
    },
    json={   'deviceGroupId': 'd602034d-a509-4c93-ade0-61f5b496c963',
    'ownershipType': 'corporate',
    'androidPolicyId': '8ef59086-c490-4c73-a7ed-6c17e4a417ad',
    'iosPolicyId': 'f78afaa2-91d5-4f1d-8696-399af29a3941'},
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Tenant-ID" = "<tenant-id>"
    "Content-Type" = "application/json"
}
$body = '{
  "deviceGroupId": "d602034d-a509-4c93-ade0-61f5b496c963",
  "ownershipType": "corporate",
  "androidPolicyId": "8ef59086-c490-4c73-a7ed-6c17e4a417ad",
  "iosPolicyId": "f78afaa2-91d5-4f1d-8696-399af29a3941"
}'
Invoke-RestMethod -Method POST -Uri "https://api-<data-region>.central.sophos.com/mobile/v1/settings/ixm-auto-enrollment" -Headers $headers -Body $body -ContentType "application/json"

package main

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

func main() {
    req, err := http.NewRequest("POST", "https://api-<data-region>.central.sophos.com/mobile/v1/settings/ixm-auto-enrollment", strings.NewReader(`{
  "deviceGroupId": "d602034d-a509-4c93-ade0-61f5b496c963",
  "ownershipType": "corporate",
  "androidPolicyId": "8ef59086-c490-4c73-a7ed-6c17e4a417ad",
  "iosPolicyId": "f78afaa2-91d5-4f1d-8696-399af29a3941"
}`))
    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/settings/ixm-auto-enrollment", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "deviceGroupId": "d602034d-a509-4c93-ade0-61f5b496c963",
  "ownershipType": "corporate",
  "androidPolicyId": "8ef59086-c490-4c73-a7ed-6c17e4a417ad",
  "iosPolicyId": "f78afaa2-91d5-4f1d-8696-399af29a3941"
}),
});
const data = await response.json();
console.log(data);

Responses

201 — The new settings for Intercept X for Mobile auto enrollments.

Response fields

tenantobjectrequired
Tenant this resource belongs to.
Show child attributesHide child attributes
idstring (uuid)required
namestring
deviceGroupobjectrequired
A device group reference.
Show child attributesHide child attributes
idstring (uuid)required
Unique ID of the device group.
namestring
The device group name.
ownershipTypestring (enum)required
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.
createdAtstring (date-time)
Indicates when the policy was created.
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.
updatedAtstring (date-time)
Indicates when the policy was last updated.
androidPolicyobject
A policy reference.
Show child attributesHide child attributes
idstring (uuid)required
Unique ID of the device.
namestring
Unique name of the policy.
platformstring (enum)
The device platform, i.e. the operating system.
Must be one of: iOS, macOS, android, chrome, windows.
typestring
The policy type.
versionstring
The policy version.
iosPolicyobject
A policy reference.
Show child attributesHide child attributes
idstring (uuid)required
Unique ID of the device.
namestring
Unique name of the policy.
platformstring (enum)
The device platform, i.e. the operating system.
Must be one of: iOS, macOS, android, chrome, windows.
typestring
The policy type.
versionstring
The policy version.
connectionCodestring
The connection code required for automated enrollment on iOS and Android.

Errors

Status Meaning
400 Invalid request.
401 Unauthorized.
403 Forbidden.
404 Can't find configured setup data for Intercept X for Mobile auto enrollments.
409 Conflict.
422 Maximum number of Intercept X for Mobile auto-enrollment settings exceeded.
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

201

{
  "tenant": {
    "id": "b8a75c7d-7492-4009-9f95-8c815551dc55",
    "name": "The name of the tenant"
  },
  "deviceGroup": {
    "id": "d602034d-a509-4c93-ade0-61f5b496c963",
    "name": "A device group"
  },
  "ownershipType": "corporate",
  "androidPolicy": {
    "id": "ea1735cc-d321-4a39-a61a-7ec4a5975e1d",
    "name": "My Android policy",
    "platform": "android",
    "type": "threatDefense",
    "version": 1
  },
  "iosPolicy": {
    "id": "15539043-4ec1-4525-bf2d-646e4f5d8212",
    "name": "My iOS policy",
    "platform": "iOS",
    "type": "threatDefense",
    "version": 1
  },
  "connectionCode": "eyJ0b2tlbiI6ImZvb28iLCJjdXN0b21lcmlkIjoiNDgyNzY5Ii widXJsIjoic21jLWRldmljZS1pZi1jbG91ZHN0YXRpb24tZXUt d2VzdC0xLnRlc3QuaHlkcmEuc29waG9zLmNvbSIsImNoZWNraW 5VcmkiOiJodHRwczovL3NtYy1kZXZpY2UtaWYtY2xvdWRzdGF0 aW9uLWV1LXdlc3QtMS50ZXN0Lmh5ZHJhLnNvcGhvcy5jb20vY2 xpZW50LWFwaS9lbnJvbGwvYXV0by1jb25maWd1cmVkL2l4bS9i OGE3NWM3ZC03NDkyLTQwMDktOWY5NS04YzgxMjQ1NTFkYzU1L2 NoZWNraW4ifQ==",
  "createdAt": "2025-01-02T08:50:00.300Z",
  "createdBy": {
    "id": "dfa19b8f-5898-4be9-b0dc-45a320ce76b1",
    "type": "user",
    "accountType": "tenant",
    "accountId": "0ea17949-d95c-4f58-95b7-ba6d9860f5fc",
    "name": "john.smith@example.com"
  },
  "updatedAt": "2025-01-02T08:50:01.300Z",
  "updatedBy": {
    "id": "dfa19b8f-5898-4be9-b0dc-45a320ce76b1",
    "type": "user",
    "accountType": "tenant",
    "accountId": "0ea17949-d95c-4f58-95b7-ba6d9860f5fc",
    "name": "john.smith@example.com"
  }
}

See the guide for a narrative walkthrough of this API.