Favicon

You are here: Home > API Reference > EnrollmentTokens > Create several emmEnrollmentTokens at once

Create several emmEnrollmentTokens at once

Create several emmEnrollmentTokens at once

POST /v1/organizations/:organizationId/mdm/android/enterprise/enrollment-tokens/bulk

Create several emmEnrollmentTokens at once

Create several emmEnrollmentTokens at once

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
userEmails array [string] required
{
    "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": ""
        }
    },
    "userEmails": [
        "user@example.com"
    ]
}

Responses

200 Response application/json
status boolean optional
data object optional
total number required
Format: float
success number required
Format: float
fail number required
Format: float
{
    "status": true,
    "data": {
        "total": 0,
        "success": 0,
        "fail": 0
    }
}
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"
    }
}