POST
https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/enrollment-tokens
curl -X POST "https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/enrollment-tokens" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"type": "object",
"children": {
"sendEmail": {},
"displayName": {},
"tags": {},
"duration": {},
"language": {},
"emailText": {},
"policyId": {},
"admPolicyAssignments": {},
"profiles": {},
"applications": {},
"admVppLocationId": {},
"segmentId": {}
},
"mdmUserId": "698f3bde457fafa13d088791"
}'const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/enrollment-tokens", {
method: "POST",
headers: {
Authorization: "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"type": "object",
"children": {
"sendEmail": {},
"displayName": {},
"tags": {},
"duration": {},
"language": {},
"emailText": {},
"policyId": {},
"admPolicyAssignments": {},
"profiles": {},
"applications": {},
"admVppLocationId": {},
"segmentId": {}
},
"mdmUserId": "698f3bde457fafa13d088791"
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/enrollment-tokens",
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
json={
"type": "object",
"children": {
"sendEmail": {},
"displayName": {},
"tags": {},
"duration": {},
"language": {},
"emailText": {},
"policyId": {},
"admPolicyAssignments": {},
"profiles": {},
"applications": {},
"admVppLocationId": {},
"segmentId": {}
},
"mdmUserId": "698f3bde457fafa13d088791"
},
)
data = response.json()Request
Send your API key in the request header
authorization
Example:
Authorization: Bearer <token>
organizationId
string
required
Body Params
application/json
type
string
optional
children
object
optional
sendEmail
object
optional
type
string
optional
flags
object
optional
truthy
boolean
optional
falsy
boolean
optional
displayName
object
optional
type
string
optional
valids
string
optional
rules
object
optional
tags
object
optional
type
string
optional
flags
object
optional
items
object
optional
duration
object
optional
type
string
optional
flags
object
optional
description
string
optional
invalids
number
optional
rules
object
optional
language
object
optional
type
string
optional
flags
object
optional
valids
string
optional
invalids
string
optional
emailText
object
optional
type
string
optional
valids
string
optional
policyId
object
optional
type
string
optional
valids
string
optional
rules
object
optional
admPolicyAssignments
object
optional
type
string
optional
flags
object
optional
items
object
optional
profiles
object
optional
type
string
optional
flags
object
optional
items
object
optional
applications
object
optional
type
string
optional
flags
object
optional
items
object
optional
admVppLocationId
object
optional
type
string
optional
valids
string
optional
rules
object
optional
segmentId
object
optional
type
string
optional
flags
object
optional
invalids
number
optional
rules
object
optional
mdmUserId
string
required
{
"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"
},
"description": "Apple application assignment target referencing the admApplication entity to install or expose on the device, policy, or enrollment token.",
"examples": {
"value": "698f42e5457fafa13d088794"
},
"invalids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"managed": {
"type": "boolean",
"flags": {
"insensitive": true
},
"description": "Controls Apple managed-install semantics for this app assignment. This field still drives InstallAsManaged and ChangeManagementState.",
"examples": {
"value": true
},
"truthy": true,
"falsy": true
},
"managementFlags": {
"type": "number",
"flags": {
"unsafe": true,
"allowOnly": true
},
"description": "Optional Apple MDM InstallApplication.ManagementFlags override for this app assignment. Supported values are 1 (remove app when the MDM profile is removed), 4 (prevent backup of app documents and data), and 5 (both behaviors). If omitted, backend behavior stays unchanged: managed=true sends 5; otherwise the field is omitted. This field only overrides Apple ManagementFlags and does not imply managed=true.",
"examples": {
"value": 5
},
"valids": 0,
"invalids": null
},
"vpp": {
"type": "boolean",
"flags": {
"insensitive": true
},
"description": "Enables Apple Volume Purchase Program purchase handling for this assignment when the app should be installed through VPP licensing.",
"examples": {
"value": true
},
"truthy": true,
"falsy": true
},
"iOSApp": {
"type": "boolean",
"flags": {
"insensitive": true
},
"description": "Apple InstallApplication iOSApp flag passed for this assignment when the target app should be treated as an iOS app payload.",
"examples": {
"value": true
},
"truthy": true,
"falsy": true
},
"configuration": {
"type": "object",
"description": "Managed app configuration object sent with the Apple app assignment when the application supports configuration keys.",
"examples": {
"value": {}
}
},
"action": {
"type": "string",
"flags": {
"allowOnly": true
},
"description": "Assignment action defining whether the app is force-installed, available for optional install, or required during setup.",
"examples": {
"value": "forceInstall"
},
"valids": "forceInstall",
"invalids": ""
},
"actionStatus": {
"type": "string",
"flags": {
"allowOnly": true
},
"description": "Read-only effective assignment status shown in responses. Devices may report available assignments as either available or available-install depending on the device request state.",
"examples": {
"value": "forceInstall"
},
"valids": "forceInstall",
"invalids": ""
},
"scripts": {
"type": "object",
"description": "Optional agent-side install lifecycle scripts associated with this assignment for Apple agent-managed application flows.",
"examples": {
"value": {}
},
"children": {
"preInstall": {
"type": "string",
"valids": ""
},
"postInstall": {
"type": "string",
"valids": ""
},
"audit": {
"type": "string",
"valids": ""
},
"enforce": {
"type": "string",
"valids": ""
},
"runner": {
"type": "string",
"valids": ""
}
}
},
"updatePolicy": {
"type": "object",
"description": "Additional update-policy configuration stored with the app assignment for downstream deployment or agent-handled behaviors.",
"examples": {
"value": {}
}
}
}
}
},
"admVppLocationId": {
"type": "string",
"valids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"segmentId": {
"type": "number",
"flags": {
"unsafe": true
},
"invalids": null,
"rules": {
"name": "integer"
}
}
},
"mdmUserId": "698f3bde457fafa13d088791"
}
Responses
200 Response
application/json
status
boolean
optional
data
object
optional
id
string
optional
organization
string
optional
admEnterprise
string
optional
admDevice
string
optional
mdmUser
object
optional
id
string
optional
email
string
optional
displayName
string
optional
tags
array [string]
optional
state
string
optional
config
object
optional
enroll
object
optional
serverExpirationDate
string
optional
mobileConfigSigned
boolean
optional
type
string
optional
subType
string
optional
updatedAt
string
optional
createdAt
string
optional
expireAt
string
optional
enrollmentLink
string
optional
enrollCode
string
optional
admPolicy
object
optional
id
string
optional
organization
string
optional
admEnterprise
string
optional
targetType
string
optional
attachedProfile
object
optional
name
string
optional
profiles
array [object]
optional
applications
array [object]
optional
applicationsInfo
array [object]
optional
books
array [object]
optional
booksInfo
array [object]
optional
scripts
array [object]
optional
scriptsInfo
array [object]
optional
bookmarks
array [object]
optional
assets
array [object]
optional
assetsInfo
array [object]
optional
version
integer
optional
updatedAt
string
optional
createdAt
string
optional
agentConfiguration
object
optional
segmentId
integer
optional
exposeToChildren
boolean
optional
admPolicyAssignments
array [object]
optional
admPolicyId
string
optional
admPolicy
object
optional
priority
integer
optional
admVppLocation
object
optional
id
string
optional
name
string
optional
config
object
optional
summary
object
optional
expirationTimestamp
string
optional
profiles
array [object]
optional
id
string
optional
organization
string
optional
admEnterprise
string
optional
admPolicy
string
optional
targetType
string
optional
name
string
optional
config
object
optional
certificates
array [object]
optional
type
string
optional
UUID
string
optional
version
integer
optional
updatedAt
string
optional
createdAt
string
optional
assignedTo
object
optional
useCustomFileVaultCertificates
boolean
optional
parentAdmProfileId
string
optional
applications
array [object]
optional
admApplication
string
required
managed
boolean
optional
managementFlags
number
optional
vpp
boolean
optional
iOSApp
boolean
optional
configuration
object
optional
action
string
optional
actionStatus
string
optional
scripts
object
optional
updatePolicy
object
optional
sendEmail
boolean
optional
emailText
string
optional
configuration
object
optional
skipPersonalInfo
boolean
optional
segmentId
integer
optional
{
"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": "698f42e5457fafa13d088794",
"managed": true,
"managementFlags": 5,
"vpp": true,
"iOSApp": true,
"configuration": {},
"action": "forceInstall",
"actionStatus": "forceInstall",
"scripts": {},
"updatePolicy": {}
}
],
"sendEmail": true,
"emailText": "Please enroll your device by following the instructions in this email.",
"configuration": {
"skipPersonalInfo": true
},
"segmentId": "1"
}
}
400 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 5050,
"message": "Feature not allowed for you billing plan"
}
}
401 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 4002,
"message": "No auth token"
}
}
404 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 3001,
"message": "Entity not found"
}
}