---
updatedAt: 2026-07-26T08:39:46.000Z
agentTools:
  projectIndex: https://developers.mineos.ai/llms.txt
---

# Generate an MDM deployment package

Builds the deployment script that installs the MineOS AI-agent discovery scanner on your organization's devices
through your MDM (Intune, Jamf, Kandji, or any MDM that can run a script). The script is returned in the response
body: save `contents` to a file named `filename` and upload it to your MDM.
            
The package is tied to your organization by a packaging token. For every MDM except Jamf the token is embedded in
the script; for Jamf the script reads it from the policy's `$4` parameter and the token is returned separately
in `token.token`. Generating again returns the same token, so a package can be regenerated at any time.
The token can be revoked with `DELETE /api/aispm/v1/mdm-package/token`.
            
Supported targets:
- `generic` (default when `mdm` is omitted): `macos`, `windows`, `linux` — `os` is required
- `intune`: `macos`, `windows` — defaults to `windows`
- `jamf`: `macos`
- `kandji`: `macos`
            
Requires an Admin user of the organization. The environment and region are taken from the API host you call;
they are not request parameters.
            
Responses:
- `200` — the package (see the response schema)
- `400` — unknown `mdm`, unknown or unsupported `os`, or a missing `os` for `generic`; `error` names
the accepted values
- `403` — `reason: "tenant_not_onboarded"`: your organization is not yet enabled for AI-agent discovery; contact MineOS
support
- `503` — `status: "packaging_unavailable"`: packaging is temporarily unavailable in this environment; retry later
- `500` — the package could not be generated; retry, and contact support if it persists

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "MineOS API",
    "version": "v1.0"
  },
  "servers": [
    {
      "url": "https://api.portal.saymine.com/",
      "description": "MineOS EU API Endpoint"
    },
    {
      "url": "https://api.us.portal.saymine.com/",
      "description": "MineOS US API Endpoint"
    }
  ],
  "paths": {
    "/api/aispm/v1/mdm-package": {
      "post": {
        "tags": [
          "AISPM"
        ],
        "summary": "Generate an MDM deployment package",
        "description": "Builds the deployment script that installs the MineOS AI-agent discovery scanner on your organization's devices\r\nthrough your MDM (Intune, Jamf, Kandji, or any MDM that can run a script). The script is returned in the response\r\nbody: save `contents` to a file named `filename` and upload it to your MDM.\r\n            \r\nThe package is tied to your organization by a packaging token. For every MDM except Jamf the token is embedded in\r\nthe script; for Jamf the script reads it from the policy's `$4` parameter and the token is returned separately\r\nin `token.token`. Generating again returns the same token, so a package can be regenerated at any time.\r\nThe token can be revoked with `DELETE /api/aispm/v1/mdm-package/token`.\r\n            \r\nSupported targets:\r\n- `generic` (default when `mdm` is omitted): `macos`, `windows`, `linux` — `os` is required\r\n- `intune`: `macos`, `windows` — defaults to `windows`\r\n- `jamf`: `macos`\r\n- `kandji`: `macos`\r\n            \r\nRequires an Admin user of the organization. The environment and region are taken from the API host you call;\r\nthey are not request parameters.\r\n            \r\nResponses:\r\n- `200` — the package (see the response schema)\r\n- `400` — unknown `mdm`, unknown or unsupported `os`, or a missing `os` for `generic`; `error` names\r\nthe accepted values\r\n- `403` — `reason: \"tenant_not_onboarded\"`: your organization is not yet enabled for AI-agent discovery; contact MineOS\r\nsupport\r\n- `503` — `status: \"packaging_unavailable\"`: packaging is temporarily unavailable in this environment; retry later\r\n- `500` — the package could not be generated; retry, and contact support if it persists",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AispmMdmPackageRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AispmMdmPackageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AispmMdmPackageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AispmMdmPackageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AispmMdmPackageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AispmErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AispmNotOnboardedResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AispmErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AispmUnavailableResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AispmErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "What was wrong. For `400` it names the accepted values for the rejected field.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Error body for `400`, `404`, `409` and `500` responses across the AISPM endpoints."
      },
      "AispmMdmPackageRequest": {
        "type": "object",
        "properties": {
          "mdm": {
            "type": "string",
            "description": "The MDM to package for: `generic`, `intune`, `jamf`, or `kandji`, case-sensitive. Omitted means\r\n            `generic`. Any other value is rejected with `400`.",
            "nullable": true
          },
          "os": {
            "type": "string",
            "description": "The target operating system: `macos`, `windows`, or `linux`, case-sensitive. Required for\r\n            `generic`; for a named MDM it defaults to that MDM's default (`intune`: `windows`; `jamf` and\r\n            `kandji`: `macos`). A pair the MDM does not support is rejected with `400`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The deployment target. Your organization and the environment are derived from the call, not from the body."
      },
      "AispmMdmPackageResponse": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "description": "The file name to save `contents` as. It carries the script type, and the target OS unless the package kind has\r\n            only one (a Jamf package is always macOS).",
            "nullable": true
          },
          "mdm": {
            "type": "string",
            "description": "The MDM the package was generated for; `generic` when the request did not name one.",
            "nullable": true
          },
          "os": {
            "type": "string",
            "description": "The target operating system the package was generated for: `macos`, `windows`, or `linux`.",
            "nullable": true
          },
          "environment": {
            "type": "string",
            "description": "The MineOS environment the package enrolls devices into, derived from the API host you called.",
            "nullable": true
          },
          "contents": {
            "type": "string",
            "description": "The deployment script to upload to your MDM. For Jamf it reads the packaging token from the policy's `$4` parameter;\r\n            for every other MDM the token is already embedded.",
            "nullable": true
          },
          "tokenInFile": {
            "type": "boolean",
            "description": "`true` when the packaging token is embedded in `contents`; `false` for Jamf, where you supply\r\n            `token.token` as the policy's `$4` parameter."
          },
          "token": {
            "$ref": "#/components/schemas/AispmMdmPackageTokenInfo"
          }
        },
        "additionalProperties": false,
        "description": "The generated package. Save `contents` to a file named `filename` and upload it to your MDM."
      },
      "AispmMdmPackageTokenInfo": {
        "type": "object",
        "properties": {
          "tokenId": {
            "type": "string",
            "description": "The token's identifier. Safe to log; it is the prefix of `token`.",
            "nullable": true
          },
          "token": {
            "type": "string",
            "description": "The full token credential. Treat it as a secret: anyone holding it can enroll devices into your organization.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "How to use the token for the requested MDM.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The packaging token that ties generated packages to your organization."
      },
      "AispmNotOnboardedResponse": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Always `tenant_not_onboarded`: your organization is not yet enabled for AI-agent discovery. Contact MineOS\r\n            support.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of the response that says your organization is not enabled for AI-agent discovery yet: `403` when asking for\r\n            a package, `409` when asking for insights."
      },
      "AispmUnavailableResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Always `packaging_unavailable`.",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "A short explanation of why packaging is unavailable right now.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "`503` body: package generation is temporarily unavailable."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Authorization header using the Bearer scheme. \r\n\r\nEnter 'Bearer' [space] and then your API Key in the text input below.\r\n\r\nExample: 'Bearer 12345abcdef'",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ]
}
```