Favicon

You are here: Home > API Reference > EnrollmentTokens > Add new emmEnrollmentToken

Add new emmEnrollmentToken

Add new emmEnrollmentToken

POST
/v1/organizations/:organizationId/mdm/android/enterprise/enrollment-tokens/
Copy to clipboard

Add new emmEnrollmentToken

Add new emmEnrollmentToken

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Entity Id or Slug
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
Body Params application/json
type string optional
object
children object optional
policyId object optional
type string optional
string
description string optional
Entity Id
invalids string optional
rules object optional
name string optional
regex
arg object optional
pattern string optional
Match pattern: ^[a-fA-F0-9]{24}$
emmPolicyAssignments object optional
type string optional
array
flags object optional
sparse boolean optional
items object optional
type string optional
object
children object optional
emmPolicyId object optional
priority object optional
displayName object optional
type string optional
string
valids string optional
rules object optional
name string optional
max
arg number optional
Format: float
128
tags object optional
type string optional
array
flags object optional
sparse boolean optional
items object optional
type string optional
string
valids string optional
rules object optional
name string optional
max
arg number optional
Format: float
128
managementMode object optional
type string optional
string
flags object optional
allowOnly boolean optional
presence string optional
required
valids string optional
DEVICE_OWNER
invalids string optional
sendEmail object optional
type string optional
boolean
flags object optional
insensitive boolean optional
presence string optional
required
truthy boolean optional
falsy boolean optional
duration object optional
type string optional
number
flags object optional
unsafe boolean optional
description string optional
Number of seconds between 1m and 30d. 1d by default
invalids number optional
Format: float
null
rules object optional
name string optional
integer
language object optional
type string optional
string
flags object optional
allowOnly boolean optional
valids string optional
es
invalids string optional
emailText object optional
type string optional
string
valids string optional
mdmUserId string required
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
{
    "type": "object",
    "children": {
        "policyId": {
            "type": "string",
            "description": "Entity Id",
            "invalids": "",
            "rules": {
                "name": "regex",
                "arg": {
                    "pattern": "string"
                }
            }
        },
        "emmPolicyAssignments": {
            "type": "array",
            "flags": {
                "sparse": true
            },
            "items": {
                "type": "object",
                "children": {
                    "emmPolicyId": {
                        "type": "string",
                        "description": "Entity Id",
                        "invalids": "",
                        "rules": {
                            "name": "regex",
                            "arg": {
                                "pattern": "string"
                            }
                        }
                    },
                    "priority": {
                        "type": "number",
                        "flags": {
                            "unsafe": true,
                            "presence": "required"
                        },
                        "invalids": null,
                        "rules": {
                            "name": "integer"
                        }
                    }
                }
            }
        },
        "displayName": {
            "type": "string",
            "valids": "",
            "rules": {
                "name": "max",
                "arg": 128
            }
        },
        "tags": {
            "type": "array",
            "flags": {
                "sparse": true
            },
            "items": {
                "type": "string",
                "valids": "",
                "rules": {
                    "name": "max",
                    "arg": 128
                }
            }
        },
        "managementMode": {
            "type": "string",
            "flags": {
                "allowOnly": true,
                "presence": "required"
            },
            "valids": "DEVICE_OWNER",
            "invalids": ""
        },
        "sendEmail": {
            "type": "boolean",
            "flags": {
                "insensitive": true,
                "presence": "required"
            },
            "truthy": true,
            "falsy": true
        },
        "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": ""
        }
    },
    "mdmUserId": "string"
}

Responses

200 Response application/json
status boolean optional
data object optional
id string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
organization string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
emmEnterprise string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
emmPolicyAssignments array [object] optional
emmPolicyId string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
emmPolicy object optional
id string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
name string optional
≤ 128 characters
description string optional
≤ 256 characters
version string optional
≤ 128 characters
config object optional
_config object optional
packages object optional
emmEnterprise string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
private boolean optional
assets array [object] optional
mdmAssetId string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
location string optional
≤ 256 characters
assetName string optional
≤ 256 characters
scope string optional
user system all-users
assetsInfo array [object] optional
updatedAt string optional
Format: date-time
createdAt string optional
Format: date-time
agentConfiguration object optional
allowLocation boolean optional
allowPackageTime boolean optional
allowPackageTransfer boolean optional
allowNetworkStatus boolean optional
kioskLauncherConfiguration object optional
displayDeviceName boolean optional
settingAction any optional
whitelistedApps array [string] optional
escapeHatchPassword string optional
≤ 256 characters
backgroundUrl string optional
≤ 500 characters
iconSize any optional
screenAlwaysOn boolean optional
unlockPassword string optional
≤ 256 characters
inactivityLockTime integer optional
≥ 0
startingUpApps array [object] optional
appsLayout array [object] optional
header object optional
footer object optional
certificateProviderIds array [string] optional
applications array [object] optional
emmApplicationId string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
configuration string optional
action string optional
forceInstall available
updatePolicy object optional
customAppConfig object optional
applicationsInfo array [object] optional
emmApplicationId string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
emmApplication object optional
priority integer optional
≥ 0
mdmUser object optional
id string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
email string optional
≤ 128 characters
emmDevice string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
displayName string optional
≤ 128 characters
tags array [string] optional
status string optional
PENDING DONE DELETED EXPIRED
sendEmail boolean optional
managementMode string optional
DEVICE_OWNER PROFILE_OWNER COPE USERLESS
emailText string optional
config object optional
expirationTimestamp string optional
Format: date-time
code string optional
≤ 128 characters
_config object optional
Only available for platform admin users
summary object optional
managementMode string optional
≤ 128 characters
expirationTimestamp string optional
Format: date-time
type string optional
≤ 128 characters
subType string optional
≤ 128 characters
state string optional
PENDING DONE DELETED EXPIRED
perpetual boolean optional
updatedAt string optional
Format: date-time
createdAt string optional
Format: date-time
qrcodeUrl string optional
enrollmentLink string optional
≤ 256 characters
{
    "status": true,
    "data": {
        "id": "string",
        "organization": "string",
        "emmEnterprise": "string",
        "emmPolicyAssignments": [
            {
                "emmPolicyId": "string",
                "emmPolicy": {
                    "id": "string",
                    "name": "string",
                    "description": "string",
                    "version": "string",
                    "config": {},
                    "_config": {},
                    "packages": {},
                    "emmEnterprise": "string",
                    "private": true,
                    "assets": [
                        {
                            "mdmAssetId": "string",
                            "location": "string",
                            "assetName": "string",
                            "scope": "user"
                        }
                    ],
                    "assetsInfo": [
                        {}
                    ],
                    "updatedAt": "2024-01-01T00: 00:00Z",
                    "createdAt": "2024-01-01T00: 00:00Z",
                    "agentConfiguration": {
                        "allowLocation": true,
                        "allowPackageTime": true,
                        "allowPackageTransfer": true,
                        "allowNetworkStatus": true
                    },
                    "kioskLauncherConfiguration": {
                        "displayDeviceName": true,
                        "settingAction": "string",
                        "whitelistedApps": [
                            "string"
                        ],
                        "escapeHatchPassword": "string",
                        "backgroundUrl": "string",
                        "iconSize": "string",
                        "screenAlwaysOn": true,
                        "unlockPassword": "string",
                        "inactivityLockTime": 0,
                        "startingUpApps": [
                            {
                                "packageName": "string",
                                "config": {}
                            }
                        ],
                        "appsLayout": [
                            {
                                "type": "app",
                                "package": "string"
                            }
                        ],
                        "header": {
                            "text": "string",
                            "fontSize": "small"
                        },
                        "footer": {
                            "text": "string",
                            "fontSize": "small"
                        }
                    },
                    "certificateProviderIds": [
                        "string"
                    ],
                    "applications": [
                        {
                            "emmApplicationId": "string",
                            "configuration": "string",
                            "action": "forceInstall",
                            "updatePolicy": {},
                            "customAppConfig": {}
                        }
                    ],
                    "applicationsInfo": [
                        {
                            "emmApplicationId": "string",
                            "emmApplication": {}
                        }
                    ]
                },
                "priority": 0
            }
        ],
        "mdmUser": {
            "id": "string",
            "email": "string"
        },
        "emmDevice": "string",
        "displayName": "string",
        "tags": [
            "string"
        ],
        "status": "PENDING",
        "sendEmail": true,
        "managementMode": "DEVICE_OWNER",
        "emailText": "string",
        "config": {
            "expirationTimestamp": "2024-01-01T00: 00:00Z",
            "code": "string"
        },
        "_config": {},
        "summary": {
            "managementMode": "string",
            "expirationTimestamp": "2024-01-01T00: 00:00Z"
        },
        "type": "string",
        "subType": "string",
        "state": "PENDING",
        "perpetual": true,
        "updatedAt": "2024-01-01T00: 00:00Z",
        "createdAt": "2024-01-01T00: 00:00Z",
        "qrcodeUrl": "string",
        "enrollmentLink": "string"
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5017
message string optional
Limit Exceeded
{
    "status": false,
    "error": {
        "code": 5050,
        "message": "Feature not allowed for you billing plan"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}