Favicon

You are here: Home > API Reference > AOSP > Android Non Gms Enrollment Tokens > Create bulk non-GMS Android enrollment tokens

POST /organizations/:organizationId/mdm/aosp/enterprise/enrollment-tokens/bulk

Required Permission: mdm.aosp.enrollmentToken.create

Create multiple non-GMS Android enrollment tokens for device onboarding

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

Create bulk non-GMS Android enrollment tokens

Required Permission: mdm.aosp.enrollmentToken.create

Create multiple non-GMS Android enrollment tokens for device onboarding

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
Body Params application/json
displayName string optional
Optional human-friendly label shown in the dashboard.
≤ 256 characters
tags array [string] optional
Free-form labels used to group and filter AOSP resources in the dashboard.
managementMode string required
Provisioning mode requested for enrolled devices.
DEVICE_OWNER MANAGEMENT_MODE_UNSPECIFIED
sendEmail boolean optional
Whether the backend should send the enrollment invitation email after creation.
language string optional
Optional language for the invitation email content.
es en fr de it zh pt ru
emailText string optional
Optional custom invitation email body text.
perpetual boolean optional
Whether the token should remain reusable after successful enrollment.
aosPolicyAssignments array [object] optional
Ordered AOSP policy assignments that will apply to enrolled devices.
aosPolicyId string required
Match pattern: ^[a-fA-F0-9]{24}$
priority integer required
≥ -9007199254740991 · ≤ 9007199254740991
dpcBuildTag string optional
Optional DPC build tag used to select a specific AOSP agent build for onboarding.
≤ 256 characters
duration integer required
Token validity duration in seconds for non-perpetual tokens.
≥ 0 · ≤ 9007199254740991
pushNotificationProvider string optional
Optional push notification provider override used for this enterprise or resource.
Match pattern: ^[a-fA-F0-9]{24}$
segmentId integer optional
Optional segment identifier used to scope the resource within the organization.
≥ 0 · ≤ 9007199254740991
userEmails array [string] required
List of user email addresses for which enrollment tokens should be created.
{
    "displayName": "string",
    "tags": [
        "string"
    ],
    "managementMode": "DEVICE_OWNER",
    "sendEmail": true,
    "language": "es",
    "emailText": "string",
    "perpetual": true,
    "aosPolicyAssignments": [
        {
            "aosPolicyId": "string",
            "priority": 0
        }
    ],
    "dpcBuildTag": "string",
    "duration": 0,
    "pushNotificationProvider": "string",
    "segmentId": 0,
    "userEmails": [
        "[email protected]"
    ]
}

Responses

200 Response application/json
status boolean required
data object required
total number required
Total number of requested enrollment tokens in the bulk operation.
success number required
Number of tokens created successfully.
fail number required
Number of token creations that failed.
{
    "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": 5017,
        "message": "Limit Exceeded"
    }
}
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"
    }
}