Create enrollment token
Required Permission: mdm.apple.enrollmentToken.create
Creates a new enrollment token with specified configuration for device registration and management.
Request
authorization
Authorization: Bearer <token>
application/json
{
"type": "object",
"children": {
"sendEmail": {
"type": "boolean",
"flags": {
"insensitive": true,
"presence": "required"
},
"truthy": true,
"falsy": true
},
"displayName": {
"type": "string",
"valids": "",
"rules": {
"name": "max",
"arg": 128
}
},
"tags": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "string",
"valids": "",
"rules": {
"name": "max",
"arg": 128
}
}
},
"duration": {
"type": "number",
"flags": {
"unsafe": true
},
"description": "Number of seconds between 1m and 30d. 1d by default",
"invalids": null,
"rules": {
"name": "integer"
}
},
"language": {
"type": "string",
"flags": {
"allowOnly": true
},
"valids": "es",
"invalids": ""
},
"emailText": {
"type": "string",
"valids": ""
},
"policyId": {
"type": "string",
"valids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"admPolicyAssignments": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "object",
"children": {
"admPolicyId": {
"type": "string",
"invalids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"priority": {
"type": "number",
"flags": {
"unsafe": true,
"presence": "required"
},
"invalids": null,
"rules": {
"name": "integer"
}
}
}
}
},
"profiles": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "string",
"invalids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
}
},
"applications": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "object",
"children": {
"admApplication": {
"type": "string",
"flags": {
"presence": "required"
},
"invalids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"managed": {
"type": "boolean",
"flags": {
"insensitive": true
},
"truthy": true,
"falsy": true
},
"vpp": {
"type": "boolean",
"flags": {
"insensitive": true
},
"truthy": true,
"falsy": true
},
"iOSApp": {
"type": "boolean",
"flags": {
"insensitive": true
},
"truthy": true,
"falsy": true
},
"configuration": {
"type": "object"
},
"action": {
"type": "string",
"flags": {
"allowOnly": true
},
"valids": "forceInstall",
"invalids": ""
},
"actionStatus": {
"type": "string",
"flags": {
"allowOnly": true
},
"valids": "forceInstall",
"invalids": ""
},
"scripts": {
"type": "object",
"children": {
"preInstall": {
"type": "string",
"valids": ""
},
"postInstall": {
"type": "string",
"valids": ""
},
"audit": {
"type": "string",
"valids": ""
},
"enforce": {
"type": "string",
"valids": ""
},
"runner": {
"type": "string",
"valids": ""
}
}
},
"updatePolicy": {
"type": "object"
}
}
}
},
"admVppLocationId": {
"type": "string",
"valids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"segmentId": {
"type": "number",
"flags": {
"unsafe": true
},
"invalids": null,
"rules": {
"name": "integer"
}
}
},
"mdmUserId": "698f3bde457fafa13d088791"
}
Responses
application/json
{
"status": true,
"data": {
"id": "698f3bde457fafa13d088791",
"organization": "698f3bde457fafa13d088791",
"admEnterprise": "698f3bde457fafa13d088791",
"admDevice": "698f3bde457fafa13d088791",
"mdmUser": {
"id": "698f3bde457fafa13d088791",
"email": "[email protected]"
},
"displayName": "John Doe - iPhone 15 Pro",
"tags": [
"sales",
"executive",
"iphone"
],
"state": "PENDING",
"config": {},
"enroll": {
"serverExpirationDate": "2026-03-15T23: 59:59Z",
"mobileConfigSigned": true
},
"type": "user",
"subType": "standard",
"updatedAt": "2026-02-10T14: 22:00Z",
"createdAt": "2026-01-15T10: 30:00Z",
"expireAt": "2026-02-20T10: 30:00Z",
"enrollmentLink": "https://app.applivery.com/enroll/apple/ABC123DEF456",
"enrollCode": "ABC123DEF",
"admPolicy": null,
"admPolicyAssignments": [
{
"admPolicyId": "698f3bde457fafa13d088791",
"admPolicy": {},
"priority": 10
}
],
"admVppLocation": {
"id": "698f3bde457fafa13d088791",
"name": "US Corporate VPP",
"config": {
"countryISO2ACode": "US",
"defaultPlatform": "ios",
"locationName": "US Corporate Location"
}
},
"summary": {
"expirationTimestamp": "2026-02-20T10: 30:00Z"
},
"profiles": [
{
"id": "string",
"organization": "string",
"admEnterprise": "string",
"admPolicy": "string",
"targetType": "device",
"name": "string",
"config": {},
"certificates": [
{
"mdmAssetId": "string",
"format": {
"uuid": "uuid",
"base64": "base64"
},
"location": "string",
"password": "string",
"allowAllAppsAccess": true,
"keyIsExtractable": true
}
],
"type": "attached",
"UUID": "string",
"version": 0,
"updatedAt": "2024-01-01T00: 00:00Z",
"createdAt": "2024-01-01T00: 00:00Z",
"assignedTo": {
"policies": [
{
"id": "string",
"name": "string"
}
],
"devices": [
{
"id": "string",
"displayName": "string"
}
]
},
"useCustomFileVaultCertificates": true,
"parentAdmProfileId": "string"
}
],
"applications": [
{
"admApplication": "string",
"managed": true,
"vpp": true,
"iOSApp": true,
"configuration": {},
"action": "forceInstall",
"actionStatus": "forceInstall",
"scripts": {
"preInstall": "string",
"postInstall": "string",
"audit": "string",
"enforce": "string",
"runner": "string"
},
"updatePolicy": {}
}
],
"sendEmail": true,
"emailText": "Please enroll your device by following the instructions in this email.",
"configuration": {
"skipPersonalInfo": true
},
"segmentId": "1"
}
}
application/json
{
"status": false,
"error": {
"code": 5050,
"message": "Feature not allowed for you billing plan"
}
}
application/json
{
"status": false,
"error": {
"code": 4002,
"message": "No auth token"
}
}
application/json
{
"status": false,
"error": {
"code": 3001,
"message": "Entity not found"
}
}