POST
https://api.applivery.io/v1/organizations/{organizationId}/mdm/windows/enterprise/enrollment-tokens/bulk
curl -X POST "https://api.applivery.io/v1/organizations/{organizationId}/mdm/windows/enterprise/enrollment-tokens/bulk" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"type": "object",
"children": {
"sendEmail": {},
"displayName": {},
"tags": {},
"duration": {},
"language": {},
"emailText": {},
"winPolicyId": {},
"winPolicyAssignments": {},
"segmentId": {}
},
"userEmails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}'const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/mdm/windows/enterprise/enrollment-tokens/bulk", {
method: "POST",
headers: {
Authorization: "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"type": "object",
"children": {
"sendEmail": {},
"displayName": {},
"tags": {},
"duration": {},
"language": {},
"emailText": {},
"winPolicyId": {},
"winPolicyAssignments": {},
"segmentId": {}
},
"userEmails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.applivery.io/v1/organizations/{organizationId}/mdm/windows/enterprise/enrollment-tokens/bulk",
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
json={
"type": "object",
"children": {
"sendEmail": {},
"displayName": {},
"tags": {},
"duration": {},
"language": {},
"emailText": {},
"winPolicyId": {},
"winPolicyAssignments": {},
"segmentId": {}
},
"userEmails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
},
)
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
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
winPolicyId
object
optional
type
string
optional
valids
string
optional
rules
object
optional
winPolicyAssignments
object
optional
type
string
optional
flags
object
optional
items
object
optional
segmentId
object
optional
type
string
optional
flags
object
optional
invalids
number
optional
rules
object
optional
userEmails
array [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
},
"invalids": null,
"rules": {
"name": "integer"
}
},
"language": {
"type": "string",
"flags": {
"allowOnly": true
},
"valids": "es",
"invalids": ""
},
"emailText": {
"type": "string",
"valids": ""
},
"winPolicyId": {
"type": "string",
"valids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"winPolicyAssignments": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "object",
"children": {
"winPolicyId": {
"type": "string",
"invalids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"priority": {
"type": "number",
"flags": {
"unsafe": true,
"presence": "required"
},
"invalids": null,
"rules": {
"name": "integer"
}
}
}
}
},
"segmentId": {
"type": "number",
"flags": {
"unsafe": true
},
"invalids": null,
"rules": {
"name": "integer"
}
}
},
"userEmails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
Responses
200 Response
application/json
status
boolean
optional
data
object
optional
total
number
required
success
number
required
fail
number
required
{
"status": true,
"data": {
"total": 10,
"success": 9,
"fail": 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"
}
}